|
Public Types |
| typedef char * | iterator |
| | Defines a typesafe iterator for the template instance.
|
| typedef const char * | const_iterator |
Public Member Functions |
| | StringData (const char *text) |
| | StringData (const char *text, int len) |
| | StringData (int size) |
| | StringData (const StringData &other) |
| virtual | ~StringData () |
| void | add (const char &val) |
| | Adds an element to the end of the Vector.
|
| void | add (const char *ptr, int num) |
| | Adds several elements to the end of the Vector.
|
| void | remove (iterator i) |
| | Removes the element pointed to by iterator i.
|
| void | remove (int index) |
| | Removes the element at index.
|
| void | insert (int index, chart) |
| | Inserts the element at index, moving all existing elements beginning at 'index' one step forward.
|
| int | size () const |
| | Returns the number of elements.
|
| void | resize (int newSize) |
| | Resizes the Vector to contain size elements.
|
| void | reserve (int newCapacity) |
| | Reserves space in the Vector.
|
| void | clear () |
| | Clears the Vector, setting its size to 0 but not altering its capacity.
|
| bool | empty () const |
| | Returns true iff the Vector is empty().
|
| int | capacity () const |
| | Returns the Vector's current capacity.
|
| iterator | begin () |
| | Returns an iterator pointing to the first element of the Vector.
|
| const_iterator | begin () const |
| | Returns an iterator pointing to the first element of the Vector.
|
| iterator | end () |
| | Returns an iterator pointing beyond the last element of the Vector.
|
| const_iterator | end () const |
| | Returns an iterator pointing beyond the last element of the Vector.
|
| char & | operator[] (int index) |
| | Returns a reference to the element at index. No range-checking is done.
|
| const char & | operator[] (int index) const |
| | Returns a const reference to the element at index. No range-checking is done.
|
| const char * | pointer () const |
| | Returns a const pointer to the Vector's storage array.
|
| char * | pointer () |
| | Returns a pointer to the Vector's storage array.
|
| void | addRef () |
| | Increments the reference count by one.
|
| void | release () |
| | Decrements the reference count by one.
|
| int | getRefCount () |
| | Returns the current reference count.
|
Protected Attributes |
| int | mSize |
| int | mCapacity |
| char * | mData |
Friends |
| class | String |