fs::ut::str::WStrHldr_t Class Reference

#include <fsStrUt.h>

Collaboration diagram for fs::ut::str::WStrHldr_t:

Collaboration graph
[legend]
List of all members.

Detailed Description

Wide-character 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 69 of file fsStrUt.h.

Public Member Functions

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

Private Member Functions

 WStrHldr_t ()
 No def ctor.
 WStrHldr_t (const WStrHldr_t &)
 No copy.
WStrHldr_toperator= (const WStrHldr_t &)
 No assignment.

Private Attributes

wchar_t * m_pwszWStr


Constructor & Destructor Documentation

WStrHldr_t::WStrHldr_t ( wchar_t *  pwszWStr  )  [explicit]

Stores the given wide-character string.

Definition at line 128 of file fsStrUt.cpp.

References FS_VERIFY_RETURN, and m_pwszWStr.

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

Converts from the given single-byte string and stores the result.

Definition at line 138 of file fsStrUt.cpp.

References FS_VERIFY_RETURN, m_pwszWStr, and fs::ut::str::Str2WStr().

Here is the call graph for this function:

WStrHldr_t::~WStrHldr_t (  ) 

Definition at line 148 of file fsStrUt.cpp.

References m_pwszWStr.

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

No def ctor.

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

No copy.


Member Function Documentation

const wchar_t * WStrHldr_t::GetWStr (  )  const

Returns the stored wide-character string (can be 0).

Examples:
_tests/fsStrUt/main.cpp.

Definition at line 153 of file fsStrUt.cpp.

References m_pwszWStr.

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

No assignment.


Member Data Documentation

wchar_t* fs::ut::str::WStrHldr_t::m_pwszWStr [private]

Definition at line 88 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 ]