~brian-sidebotham/wxwidgets-cmake/wxpython-2.9.4

« back to all changes in this revision

Viewing changes to docs/doxygen/overviews/bufferclasses.h

  • Committer: Brian Sidebotham
  • Date: 2013-08-03 14:30:08 UTC
  • Revision ID: brian.sidebotham@gmail.com-20130803143008-c7806tkych1tp6fc
Initial import into Bazaar

Show diffs side-by-side

added added

removed removed

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