#include <oscl_string_containers.h>
Inheritance diagram for OSCL_FastString:
Public Types | |
typedef OSCL_String::chartype | chartype |
Public Methods | |
OSCL_IMPORT_REF | OSCL_FastString () |
OSCL_IMPORT_REF | OSCL_FastString (const OSCL_FastString &src) |
OSCL_IMPORT_REF | OSCL_FastString (const chartype *cstr) |
OSCL_IMPORT_REF | OSCL_FastString (chartype *buf, uint32 maxlen) |
OSCL_IMPORT_REF | ~OSCL_FastString () |
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_FastString & | operator= (const OSCL_FastString &src) |
OSCL_IMPORT_REF OSCL_FastString & | operator= (const chartype *cstr) |
OSCL_IMPORT_REF void | set (chartype *cstr, uint32 maxlen) |
OSCL_IMPORT_REF void | set_length () |
Friends | |
class | OSCL_String |
This class does not allocate internal memory for the string but acts as a container for a user-defined buffer. This means no copying of the string is done and provides a faster way of manipulating strings. Depending on initialization, this container provides either read-only or read-write access to the string.
Implementation assumes the input string is null-terminated.
C: | type of character. |
|
Reimplemented from OSCL_String. |
|
Default constructor. |
|
Creates a fast string that contains a copy of the input string. The string inherits the writable-ness of the source string.
|
|
Create the string and initialize it to contain the input string. The string is not writable.
|
|
Create the string and initialize it to contain the input string. The string is writable.
|
|
|
|
This function returns the C-style string for read access. Implements OSCL_String. |
|
This function returns the maximum available storage size, not including null terminator. The maximum size may be larger than the current string size. Implements OSCL_String. |
|
Pure virtuals from OSCL_String Implements OSCL_String. |
|
This function returns the C-style string for write access. If the string is not writable it returns NULL. Implements OSCL_String. |
|
Assignment operator
Reimplemented from OSCL_String. |
|
Assignment operators |
|
This function can be used to reassign the string to a new writable string. If input string is not null-terminated, the function leaves. |
|
This function can be used to refresh the string size in case the contents of the string buffer have been modified since the container was created. |
|
|