STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - Template Software for the Active Template Library COMSTL - The Standard Template Library meets the Component Object Model .netSTL - Standard Template Library meets the Microsoft.NET Common Language Runtime InetSTL - The Standard Template Library meets WinInet MFCSTL - Template Software for the Microsoft Foundation Classes UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

String Library (MFCSTL)
[MFCSTLString Library]

This library provides facilities for defining and manipulating MFC string types. More...

Compounds

class  grab_cstring_buffer
 Scopes the aquisition and release of a CString buffer. More...

class  resource_string
 Instances of this class represent Windows string resources, and are constructed from instance identifiers. More...


Functions

 grab_cstring_buffer (CString &str, int length) stlsoft_throw_1(CMemoryException *)
 Acquires the requested length on the given managed string.

 ~grab_cstring_buffer () stlsoft_throw_0()
 Releases the managed string.

LPCTSTR c_str () const
 Returns a pointer to a nul-terminated string.

 operator LPTSTR ()
 Provides mutating access to the managed string's internal buffer.

 operator LPCTSTR () const
 Provides non-mutating access to the managed string's internal buffer.

int length () const
 Returns the length of the managed string.

int original_length () const
 Returns the original length of the managed string.

 resource_string (ms_uint_t id)
 Constructs an around the string loaded from the given id.

 resource_string (HINSTANCE hinst, ms_uint_t id)
 Constructs an around the string loaded from the given id and hinst.

 resource_string (resource_string const &rhs)
 Copy constructor.

 resource_string (CString const &rhs)
 Copy constructor.

resource_string const & operator= (resource_string const &rhs)
 Copy assignment operator.

resource_string const & operator= (CString const &rhs)
 Copy assignment operator.

const_iterator begin () const
 Begins the iteration.

const_iterator end () const
 Ends the iteration.

size_type size () const
 Returns the number of elements in the sequence.

size_type length () const
 Returns the number of elements in the sequence.

ms_bool_t empty () const
 Indicates whether the string is empty.

LPCTSTR c_str () const
 Returns a pointer to constant data representing the managed string.


Detailed Description

This library provides facilities for defining and manipulating MFC string types.


Function Documentation

resource_string::const_iterator begin   [inline, inherited]
 

Begins the iteration.

Returns:
An iterator representing the start of the sequence

LPCTSTR c_str   [inline, inherited]
 

Returns a pointer to constant data representing the managed string.

LPCTSTR c_str   [inherited]
 

Returns a pointer to a nul-terminated string.

ms_bool_t empty   [inline, inherited]
 

Indicates whether the string is empty.

resource_string::const_iterator end   [inline, inherited]
 

Ends the iteration.

Returns:
An iterator representing the end of the sequence

grab_cstring_buffer CString &    str,
int    length
[inline, inherited]
 

Acquires the requested length on the given managed string.

Calls GetBuffer(length) on the given string, after recording the original length. If acquisition fails then a CMemoryException is thrown.

resource_string::size_type length   [inline, inherited]
 

Returns the number of elements in the sequence.

int length   [inline, inherited]
 

Returns the length of the managed string.

operator LPCTSTR   [inline, inherited]
 

Provides non-mutating access to the managed string's internal buffer.

operator LPTSTR   [inline, inherited]
 

Provides mutating access to the managed string's internal buffer.

resource_string const & operator= CString const &    rhs [inline, inherited]
 

Copy assignment operator.

Parameters:
rhs  The instance from which to copy-assign

resource_string const & operator= resource_string const &    rhs [inline, inherited]
 

Copy assignment operator.

Parameters:
rhs  The instance from which to copy-assign

int original_length   [inline, inherited]
 

Returns the original length of the managed string.

resource_string CString const &    rhs [inline, inherited]
 

Copy constructor.

Parameters:
rhs  The instance from which to copy-construct

resource_string resource_string const &    rhs [inline, inherited]
 

Copy constructor.

Parameters:
rhs  The instance from which to copy-construct

resource_string HINSTANCE    hinst,
ms_uint_t    id
[inline, inherited]
 

Constructs an around the string loaded from the given id and hinst.

Parameters:
hinst  The module from which to load the string
id  identifier of the string resource to load

resource_string ms_uint_t    id [inline, explicit, inherited]
 

Constructs an around the string loaded from the given id.

Parameters:
id  identifier of the string resource to load

resource_string::size_type size   [inline, inherited]
 

Returns the number of elements in the sequence.

~grab_cstring_buffer   [inline, inherited]
 

Releases the managed string.


STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004