Descriptors are a family of classes that are used in EPOC for string handling. They are used in preference to NULL-terminated C strings. The same classes are used for general binary data.
The basic classification of descriptor types is given below. Concrete descriptor classes implement variations on these basic types for different data widths and for different abilities to modify the data. The names of the concrete classes follow certain naming conventions that modify the basic name given in the table.
|
Descriptor types can store 8-bit or 16-bit data. These types are
indicated by the convention of appending 8 or 16 on the basic name, e.g.
TDes8
. In Unicode EPOC builds, the basic names
correspond to 16-bit types, for example
TBuf
is defined to be
TBuf16
.
Modifiable descriptor types have an interface that allows callers to alter their contents, such as appending characters.
Non-modifiable descriptor types can have their contents reset,
but not modified. The convention is for non-modifiable types to append a C on
the basic name, e.g.
TBufC
.
Heap type descriptors are an exceptional case: they are available
only in the non-modifiable form, but can, nevertheless, be modified through use
of a pointer: see HBufC::Des()
.