GL Studio SCECpp Runtime Library
|
#include <gls_string.h>
Public Member Functions | |
GlsString (const GlsUInt32 size) | |
virtual | ~GlsString () |
const GlsChar * | GetString (void) const |
void | SetString (const GlsChar *const src) |
GlsUInt32 | GetLength (void) const |
Static Public Attributes | |
static const GlsUInt32 | MAX_STRING_SIZE = ( GLSUINT32_MAX - 3u ) |
Protected Attributes | |
GlsChar *const | _charBuffer |
const GlsUInt32 | _size |
GlsUInt32 | _length |
Static Protected Attributes | |
static const GlsChar | STRING_TERMINATOR = '\0' |
This class is a simple fixed size string wrapper.
GlsString::GlsString | ( | const GlsUInt32 | size | ) |
Constructor - create an instance
size | number of characters to hold (not including NULL terminator) |
|
virtual |
Destructor - shall never be called
GlsUInt32 GlsString::GetLength | ( | void | ) | const |
Get the length of the string
const GlsChar* GlsString::GetString | ( | void | ) | const |
Get a const pointer to the string
void GlsString::SetString | ( | const GlsChar *const | src | ) |
Set string value
src | new desired value for string ( src != GLS_NULL ) |
|
protected |
NULL terminated string, buffer size = _size + 1, extra char for NULL terminator
|
protected |
length of string contained in char buffer number of characters before terminating NULL
|
protected |
number of characters that can be held in _charBuffer not including NULL terminator
|
static |
maximum number of characters that can be stored ( not including NULL terminator
|
staticprotected |
string terminator (NULL character)