|
Public Types |
typedef OSCL_String::chartype | chartype |
Public Methods |
OSCL_IMPORT_REF | OSCL_HeapStringA () |
OSCL_IMPORT_REF | OSCL_HeapStringA (Oscl_DefAlloc *alloc, OsclRefCounter *ref=NULL) |
OSCL_IMPORT_REF | OSCL_HeapStringA (const OSCL_HeapStringA &src) |
OSCL_IMPORT_REF | OSCL_HeapStringA (const OSCL_HeapStringA &src, Oscl_DefAlloc *alloc, OsclRefCounter *ref=NULL) |
OSCL_IMPORT_REF | OSCL_HeapStringA (const OSCL_String &src, Oscl_DefAlloc *alloc=NULL, OsclRefCounter *ref=NULL) |
OSCL_IMPORT_REF | OSCL_HeapStringA (const chartype *cstr, Oscl_DefAlloc *alloc=NULL, OsclRefCounter *ref=NULL) |
OSCL_IMPORT_REF | OSCL_HeapStringA (const chartype *buf, uint32 length, Oscl_DefAlloc *alloc=NULL, OsclRefCounter *ref=NULL) |
OSCL_IMPORT_REF | ~OSCL_HeapStringA () |
OSCL_IMPORT_REF uint32 | get_size () const |
OSCL_IMPORT_REF uint32 | get_maxsize () const |
OSCL_IMPORT_REF const chartype * | get_cstr () const |
OSCL_IMPORT_REF chartype * | get_str () const |
OSCL_IMPORT_REF OSCL_HeapStringA & | operator= (const OSCL_HeapStringA &src) |
OSCL_IMPORT_REF OSCL_HeapStringA & | operator= (const OSCL_String &src) |
OSCL_IMPORT_REF OSCL_HeapStringA & | operator= (const chartype *cstr) |
OSCL_IMPORT_REF void | set (const chartype *buf, uint32 length) |
Friends |
class | OSCL_String |
The string array is variable length, is allocated from the heap, and is modifiable. A copy-on-write mechanism is used to minimize unnecessary copying when multiple instances of a string are created for reading. Allocated memory is automatically freed by the class destructor when the last string referencing the memory is destroyed.
The class HAS NO thread synchronization built-in, so it is NOT MT-SAFE. External locks should be used if the class is to be shared across threads.