fs::ut::str::StrHldr_t Class Reference

#include <fsStrUt.h>

Collaboration diagram for fs::ut::str::StrHldr_t:

Collaboration graph
[legend]
List of all members.

Detailed Description

String holder.

The class especially serves as a lightweight string converter / holder. It is useful for example when an API which requires a different string format is called, so the converted string can be temporarily stored on the stack and automatically destroyed at the end of the scope.

Examples:

_tests/fsStrUt/main.cpp.

Definition at line 40 of file fsStrUt.h.

Public Member Functions

 StrHldr_t (const char *pszStr)
 Stores the given string.
 StrHldr_t (const wchar_t *pwszWStr)
 Converts from the given wide-character string and stores the result.
 ~StrHldr_t ()
const char * GetStr () const
 Returns the stored string (can be 0).

Private Member Functions

 StrHldr_t ()
 No def ctor.
 StrHldr_t (const StrHldr_t &)
 No copy.
StrHldr_toperator= (const StrHldr_t &)
 No assignment.

Private Attributes

char * m_pszStr


Constructor & Destructor Documentation

StrHldr_t::StrHldr_t ( const char *  pszStr  )  [explicit]

Stores the given string.

Definition at line 96 of file fsStrUt.cpp.

References FS_VERIFY_RETURN, and m_pszStr.

StrHldr_t::StrHldr_t ( const wchar_t *  pwszWStr  )  [explicit]

Converts from the given wide-character string and stores the result.

Definition at line 106 of file fsStrUt.cpp.

References FS_VERIFY_RETURN, m_pszStr, and fs::ut::str::WStr2Str().

Here is the call graph for this function:

StrHldr_t::~StrHldr_t (  ) 

Definition at line 116 of file fsStrUt.cpp.

References m_pszStr.

fs::ut::str::StrHldr_t::StrHldr_t (  )  [private]

No def ctor.

fs::ut::str::StrHldr_t::StrHldr_t ( const StrHldr_t  )  [private]

No copy.


Member Function Documentation

const char * StrHldr_t::GetStr (  )  const

Returns the stored string (can be 0).

Examples:
_tests/fsStrUt/main.cpp.

Definition at line 121 of file fsStrUt.cpp.

References m_pszStr.

StrHldr_t& fs::ut::str::StrHldr_t::operator= ( const StrHldr_t  )  [private]

No assignment.


Member Data Documentation

char* fs::ut::str::StrHldr_t::m_pszStr [private]

Definition at line 59 of file fsStrUt.h.


The documentation for this class was generated from the following files:

FipS' Code (Thu Feb 15 22:43:56 2007) - (c) Filip STOKLAS (FipS) - [ www ] [ Guest Book ]