#include <string.h>
Inheritance diagram for ucommon::memstring:
Public Member Functions | |
memstring (void *memory, strsize_t size, char fill=0) | |
Create an instance of a memory string. | |
void | operator= (char *text) |
Assign null terminated text to our object. | |
void | operator= (String &object) |
Assign the text of a string to our object. | |
~memstring () | |
Destroy memory string. | |
Static Public Member Functions | |
static memstring * | create (MemoryProtocol *pager, strsize_t size, char fill=0) |
Create a memory string with memory allocated from a pager. | |
static memstring * | create (strsize_t size, char fill=0) |
Create a memory string with memory allocated from the heap. | |
Static Public Attributes | |
static size_t | header |
Protected Member Functions | |
cstring * | c_copy (void) |
Return cstring to use in copy constructors. |
This allows one to manipulate a fixed buffer of text in memory through the string class. The size of the memory used must include space for the overhead() size needed for the cstring object control data.
Definition at line 1403 of file string.h.
ucommon::memstring::memstring | ( | void * | memory, | |
strsize_t | size, | |||
char | fill = 0 | |||
) |
Create an instance of a memory string.
memory | to use for cstring object. | |
size | of string. Total size must include space for overhead. | |
fill | character for fixed character fields. |
cstring* ucommon::memstring::c_copy | ( | void | ) | [protected, virtual] |
Return cstring to use in copy constructors.
Is virtual for memstring.
Reimplemented from ucommon::String.
static memstring* ucommon::memstring::create | ( | MemoryProtocol * | pager, | |
strsize_t | size, | |||
char | fill = 0 | |||
) | [static] |
Create a memory string with memory allocated from a pager.
pager | to allocate memory from. | |
size | of string to allocate. Automatically adds control size. | |
fill | character for fixed field strings. |
Create a memory string with memory allocated from the heap.
size | of string to allocate. Automatically adds control size. | |
fill | character for fixed field strings. |
Reimplemented from ucommon::String.
void ucommon::memstring::operator= | ( | char * | text | ) | [inline] |
Assign null terminated text to our object.
text | to copy. |
Reimplemented from ucommon::String.
Reimplemented in ucommon::stringbuf< S >.
Definition at line 1432 of file string.h.
References ucommon::String::set().
Here is the call graph for this function:
void ucommon::memstring::operator= | ( | String & | object | ) | [inline] |
Assign the text of a string to our object.
object | to copy text from. |
Reimplemented from ucommon::String.
Reimplemented in ucommon::stringbuf< S >.
Definition at line 1425 of file string.h.
References ucommon::String::c_str(), and ucommon::String::set().
Here is the call graph for this function: