]> git.saurik.com Git - wxWidgets.git/blame - docs/doxygen/overviews/bufferclasses.h
Fix broken and missing DataView interface items for Phoenix
[wxWidgets.git] / docs / doxygen / overviews / bufferclasses.h
CommitLineData
15b6757b 1/////////////////////////////////////////////////////////////////////////////
59c0db6a 2// Name: bufferclasses.h
15b6757b
FM
3// Purpose: topic overview
4// Author: wxWidgets team
5// RCS-ID: $Id$
526954c5 6// Licence: wxWindows licence
15b6757b
FM
7/////////////////////////////////////////////////////////////////////////////
8
880efa2a 9/**
36c9828f 10
880efa2a 11@page overview_bufferclasses Buffer Classes
36c9828f 12
e7054054
BP
13@tableofcontents
14
880efa2a 15wxWidgets uses two classes of classes for dealing with buffers in memory.
36c9828f 16
880efa2a
BP
17The first is one for dealing with character buffers, namely wxCharBuffer for
18char pointer or multi-byte c strings and wxWCharBuffer for wchar_t pointer or
19wide character c strings.
36c9828f 20
880efa2a
BP
21Secondly, wxWidgets uses, although only rarely currently, wxMemoryBuffer for
22dealing with raw buffers in memory.
59c0db6a 23
59c0db6a
FM
24
25
880efa2a 26@section overview_bufferclasses_xcb wxXCharBuffer
3b88355f 27
880efa2a 28@subsection overview_bufferclasses_xcb_general General Usage
36c9828f 29
880efa2a
BP
30As mentioned, wxCharBuffer and its wide character variant wxWCharBuffer deal
31with c strings in memory. They have two constructors, one in which you pass
32the c string you want them to have a copy of, and another where you specify the
33size of the buffer in memory in characters you want.
36c9828f 34
880efa2a
BP
35wxCharBuffer and its variant only contain the c string as a member, so they can
36be used safely to c functions with variable arguments such as printf. They also
37contain standard assignment, character access operators and a copy constructor.
59c0db6a 38
880efa2a 39@subsection overview_bufferclasses_xcb_destruct Destruction
3b88355f 40
880efa2a
BP
41It should be noted that on destruction wxCharBuffer and its wide character
42variant delete the c string that hold onto. If you want to get the pointer to
43the buffer and don't want wxCharBuffer to delete it on destruction, use the
44member function release to do so.
36c9828f 45
59c0db6a 46*/