CString_adaptor_base Class Template Reference
[Collections Library]

#include <mfcstl/collections/cstring_adaptors.hpp>

Inheritance diagram for CString_adaptor_base:

stl_collection_tag collection_tag const_CString_iadaptor CString_cadaptor CString_iadaptor

List of all members.


Detailed Description

template<typename I>
class mfcstl::CString_adaptor_base< I >

Applies standard string (std::basic_string) interface to the CString class.

This class adapts the MFC CString type to express a standard String-like interface

Member Types

typedef TCHAR value_type
 The value type.
typedef afx_allocator< value_typeallocator_type
 The allocator type.
typedef LPTSTR pointer
 The pointer type.
typedef LPCTSTR const_pointer
 The pointer-to-const type.
typedef TCHAR & reference
 The reference type.
typedef TCHAR const & const_reference
 The reference-to-const type.
typedef size_t size_type
 The size type.
typedef ms_ptrdiff_t difference_type
 The difference type.
typedef LPTSTR iterator
 The mutating iterator type.
typedef LPCTSTR const_iterator
 The non-mutating (const) iterator type.
typedef bool bool_type
 The Boolean type.

Element Access

reference at (size_type index)
 Returns a mutable (non-const) reference to the element at index.
const_reference at (size_type index) const
 Returns a non-mutable (const) reference to the element at index.
reference subscript_ (size_type index)
const_reference subscript_ (size_type index) const

Public Member Functions

Construction
allocator_type get_allocator () const
Underlying container
CString & get_CString ()
 Returns a mutating (non-const) reference to the underlying CString.
CString const & get_CString () const
 Returns a non-mutating (const) reference to the underlying CString.
Assignment
class_typeassign (LPCSTR s)
 Replaces the string contents with s.
class_typeassign (LPCWSTR s)
 Replaces the string contents with s.
class_typeassign (unsigned char const *s)
 Replaces the string contents with s.
class_typeassign (LPCSTR s, size_type n)
 Replaces the string contents with the first n characters from s.
class_typeassign (LPCWSTR s, size_type n)
 Replaces the string contents with the first n characters from s.
class_typeassign (unsigned char const *s, size_type n)
 Replaces the string contents with the first n characters from s.
class_typeassign (class_type const &s)
 Replaces the string contents with s.
class_typeassign (class_type const &str, size_type pos, size_type n)
 Replaces the string contents with n characters of s, starting from offset pos.
class_typeassign (size_type n, value_type ch)
 Replaces the string contents with n elements of ch.
class_typeassign (const_iterator first, const_iterator last)
 Replaces the string contents with the contents of the range [first, last).
Iteration
iterator begin ()
 Begins the iteration.
iterator end ()
 Ends the iteration.
const_iterator begin () const
 Begins the iteration.
const_iterator end () const
 Ends the iteration.
Attributes
size_type length () const
 Returns the number of elements in the sequence.
size_type size () const
 Returns the number of elements in the sequence.
bool_type empty () const
 Indicates whether the sequence is empty.
const_pointer c_str () const
 Returns a pointer to constant data representing the managed string.
const_pointer data () const
 Returns a possibly unterminated pointer to constant data representing the managed string.


Member Typedef Documentation

typedef TCHAR value_type

The value type.

The allocator type.

typedef LPTSTR pointer

The pointer type.

typedef LPCTSTR const_pointer

The pointer-to-const type.

typedef TCHAR& reference

The reference type.

typedef TCHAR const& const_reference

The reference-to-const type.

typedef size_t size_type

The size type.

typedef ms_ptrdiff_t difference_type

The difference type.

typedef LPTSTR iterator

The mutating iterator type.

typedef LPCTSTR const_iterator

The non-mutating (const) iterator type.

typedef bool bool_type

The Boolean type.


Member Function Documentation

CString& get_CString (  )  [inline]

Returns a mutating (non-const) reference to the underlying CString.

CString const& get_CString (  )  const [inline]

Returns a non-mutating (const) reference to the underlying CString.

class_type& assign ( LPCSTR  s  ) 

Replaces the string contents with s.

class_type& assign ( LPCWSTR  s  ) 

Replaces the string contents with s.

class_type& assign ( unsigned char const *  s  ) 

Replaces the string contents with s.

class_type& assign ( LPCSTR  s,
size_type  n 
)

Replaces the string contents with the first n characters from s.

class_type& assign ( LPCWSTR  s,
size_type  n 
)

Replaces the string contents with the first n characters from s.

class_type& assign ( unsigned char const *  s,
size_type  n 
)

Replaces the string contents with the first n characters from s.

class_type& assign ( class_type const &  s  ) 

Replaces the string contents with s.

class_type& assign ( class_type const &  str,
size_type  pos,
size_type  n 
)

Replaces the string contents with n characters of s, starting from offset pos.

class_type& assign ( size_type  n,
value_type  ch 
)

Replaces the string contents with n elements of ch.

class_type& assign ( const_iterator  first,
const_iterator  last 
)

Replaces the string contents with the contents of the range [first, last).

iterator begin (  ) 

Begins the iteration.

Returns:
A mutating (non-const) iterator representing the start of the sequence

iterator end (  ) 

Ends the iteration.

Returns:
A mutating (non-const) iterator representing the end of the sequence

const_iterator begin (  )  const

Begins the iteration.

Returns:
A non-mutating (const) iterator representing the start of the sequence

const_iterator end (  )  const

Ends the iteration.

Returns:
A non-mutating (const) iterator representing the end of the sequence

reference at ( size_type  index  ) 

Returns a mutable (non-const) reference to the element at index.

Note:
Throws an instance of std::out_of_range if index >= size()

const_reference at ( size_type  index  )  const

Returns a non-mutable (const) reference to the element at index.

Note:
Throws an instance of std::out_of_range if index >= size()

size_type length (  )  const

Returns the number of elements in the sequence.

size_type size (  )  const

Returns the number of elements in the sequence.

bool_type empty (  )  const

Indicates whether the sequence is empty.

const_pointer c_str (  )  const

Returns a pointer to constant data representing the managed string.

const_pointer data (  )  const

Returns a possibly unterminated pointer to constant data representing the managed string.


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

Generated on Thu Jun 10 08:58:32 2010 for STLSoft by  doxygen 1.5.6