Main Page   Modules   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

OSCL_HeapString< Alloc > Class Template Reference
[OSCL Util]

#include <oscl_string_containers.h>

Inheritance diagram for OSCL_HeapString< Alloc >:

OSCL_String HeapBase _OsclHeapBase

Public Types

typedef OSCL_String::chartype chartype

Public Methods

 OSCL_HeapString ()
 OSCL_HeapString (const OSCL_HeapString &src)
 OSCL_HeapString (const OSCL_String &src)
 OSCL_HeapString (const chartype *cstr)
 OSCL_HeapString (const chartype *buf, uint32 length)
 ~OSCL_HeapString ()
uint32 get_size () const
uint32 get_maxsize () const
const chartypeget_cstr () const
chartypeget_str () const
OSCL_HeapString & operator= (const OSCL_HeapString &src)
OSCL_HeapString & operator= (const OSCL_String &src)
OSCL_HeapString & operator= (const chartype *cstr)
void set (const chartype *buf, uint32 length)

Friends

class OSCL_String

Detailed Description

template<class Alloc>
class OSCL_HeapString< Alloc >

OSCL_HeapString is a simple string class, compatible with regular character array strings.

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.

Parameters:
Alloc:  memory allocator, derived from Oscl_DefAlloc.


Member Typedef Documentation

template<class Alloc>
typedef OSCL_String::chartype OSCL_HeapString< Alloc >::chartype
 

Reimplemented from OSCL_String.


Friends And Related Function Documentation

template<class Alloc>
friend class OSCL_String [friend]
 


The documentation for this class was generated from the following file:
OSCL API
Posting Version: OPENCORE_20090310