You may return to the Cvo Object Documenation Index from this document. This document contains the following sections describing the Cvo_CharacterBuffer object:
Cvo_CharacterBuffer
#include
<Cvo/Buffer.h++>
Cvo_CharacterBuffer cb( [ { char | wchar_t } *string, [ int length ] ] )
The Cvo_CharacterBuffer object is the universal mechanism used by Cvo
to store character strings. This object can take and produce both
wide character (wchar_t *
) strings and multi-byte (char *
)
strings. If passed the optional string argument, the buffer will
be initialized with the data pointed to by string. The string
argument is assumed to be NULL
terminated if length is not
passed, or of length units if it is provided.
This object defines the following member functions.
Set (
{ char | wchar_t } *string,
[ int length ] )
Assign string, which is either length units long or NULL
terminated, to the buffer.
Append (
{ char | wchar_t } *string,
[ int length ] )
Append string, which is either length units long or NULL
terminated, to the buffer.
wchar_t *wcValue (
)
Return the value of the buffer as a wide character string. Note that
this value is only valid so long as the buffer is not assigned a new
value by either the Set()
or Append()
functions.
int wcLength (
)
Return the number of wide character elements in the buffer.
char *mcValue (
)
Return the value of the buffer as a multi-byte string. Note that this
value is only valid as long as the buffer is not assigned a new value
by either the Set()
or Append()
functions.
int mbLength (
)
Return the number of character elements in the buffer.
See the legend for information about the conventions used in this documentation.