Version: 3.0.3
wxWCharBuffer Class Reference

#include <wx/buffer.h>

+ Inheritance diagram for wxWCharBuffer:

Detailed Description

This is a specialization of wxCharTypeBuffer<T> for wchar_t type.

Library:  None; this class implementation is entirely header-based.
Category:  Data Structures

Public Types

typedef wxCharTypeBuffer< wchar_t > wxCharTypeBufferBase
 
typedef wxScopedCharTypeBuffer
< wchar_t > 
wxScopedCharTypeBufferBase
 
- Public Types inherited from wxScopedCharTypeBuffer< wchar_t >
typedef wchar_t CharType
 Stored characters type. More...
 

Public Member Functions

 wxWCharBuffer (const wxCharTypeBufferBase &buf)
 
 wxWCharBuffer (const wxScopedCharTypeBufferBase &buf)
 
 wxWCharBuffer (const CharType *str=NULL)
 
 wxWCharBuffer (size_t len)
 
 wxWCharBuffer (const wxCStrData &cstr)
 
- Public Member Functions inherited from wxCharTypeBuffer< wchar_t >
 wxCharTypeBuffer (const CharType *str=NULL, size_t len=wxNO_LEN)
 Creates (owned) buffer from str and takes ownership of it. More...
 
 wxCharTypeBuffer (size_t len)
 Creates (owned) buffer of size len. More...
 
 wxCharTypeBuffer (const wxCharTypeBuffer &src)
 Copy constructor. More...
 
 wxCharTypeBuffer (const wxScopedCharTypeBuffer< wchar_t > &src)
 Makes a copy of scoped buffer src. More...
 
wxCharTypeBufferoperator= (const CharType *str)
 Assigns str to this buffer and takes ownership of it (i.e. the buffer becomes "owned"). More...
 
wxCharTypeBufferoperator= (const wxCharTypeBuffer &src)
 Assignment operator behaves in the same way as the copy constructor. More...
 
wxCharTypeBufferoperator= (const wxScopedCharTypeBuffer< wchar_t > &src)
 Assigns a scoped buffer to this buffer. More...
 
bool extend (size_t len)
 Extends the buffer to have size len. More...
 
bool shrink (size_t len)
 Shrinks the buffer to have size len and NUL-terminates the string at this length. More...
 
- Public Member Functions inherited from wxScopedCharTypeBuffer< wchar_t >
 wxScopedCharTypeBuffer ()
 Default constructor, creates NULL buffer. More...
 
 wxScopedCharTypeBuffer (const wxScopedCharTypeBuffer &src)
 Copy constructor. More...
 
wxScopedCharTypeBufferoperator= (const wxScopedCharTypeBuffer &src)
 Assignment operator behaves in the same way as the copy constructor. More...
 
 ~wxScopedCharTypeBuffer ()
 Destructor. More...
 
void reset ()
 Resets the buffer to NULL, freeing the data if necessary. More...
 
CharTypedata ()
 Returns pointer to the stored data. More...
 
const CharTypedata () const
 Returns const pointer to the stored data. More...
 
size_t length () const
 Returns length of the string stored. More...
 
 operator const CharType * () const
 Implicit conversion to C string. More...
 
CharType operator[] (size_t n) const
 Random access to the stored C string. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from wxScopedCharTypeBuffer< wchar_t >
static const wxScopedCharTypeBuffer CreateNonOwned (const CharType *str, size_t len=wxNO_LEN)
 Creates non-owned buffer from string data str. More...
 
static const wxScopedCharTypeBuffer CreateOwned (CharType *str, size_t len=wxNO_LEN)
 Creates owned buffer from str and takes ownership of it. More...
 

Member Typedef Documentation

Constructor & Destructor Documentation

wxWCharBuffer::wxWCharBuffer ( const wxCharTypeBufferBase buf)
wxWCharBuffer::wxWCharBuffer ( const wxScopedCharTypeBufferBase buf)
wxWCharBuffer::wxWCharBuffer ( const CharType str = NULL)
wxWCharBuffer::wxWCharBuffer ( size_t  len)
wxWCharBuffer::wxWCharBuffer ( const wxCStrData &  cstr)