Stefan Scholz / ETL
Embed: (wiki syntax)

« Back to documentation index

string_base Class Reference

The base class for all templated string types. More...

#include <basic_string.h>

Inherited by ibasic_string< T >.

Public Member Functions

size_type size () const
 Gets the current size of the string.
size_type length () const
 Gets the current size of the string.
bool empty () const
 Checks the 'empty' state of the string.
bool full () const
 Checks the 'full' state of the string.
size_type capacity () const
 Returns the capacity of the string.
size_type max_size () const
 Returns the maximum possible size of the string.
size_t available () const
 Returns the remaining capacity.
size_t truncated () const
 Returns whether the string was truncated by the last operation.

Protected Member Functions

 string_base (size_type max_size_)
 Constructor.

Protected Attributes

bool is_truncated
 Set to true if the operation truncated the string.
size_type current_size
 The current number of elements in the string.
const size_type CAPACITY
 The maximum number of elements in the string.

Detailed Description

The base class for all templated string types.

Definition at line 143 of file basic_string.h.


Constructor & Destructor Documentation

string_base ( size_type  max_size_ ) [protected]

Constructor.

Definition at line 231 of file basic_string.h.


Member Function Documentation

size_t available (  ) const

Returns the remaining capacity.

Returns:
The remaining capacity.

Definition at line 212 of file basic_string.h.

size_type capacity (  ) const

Returns the capacity of the string.

Returns:
The capacity of the string.

Definition at line 194 of file basic_string.h.

bool empty (  ) const

Checks the 'empty' state of the string.

Returns:
true if empty.

Definition at line 176 of file basic_string.h.

bool full (  ) const

Checks the 'full' state of the string.

Returns:
true if full.

Definition at line 185 of file basic_string.h.

size_type length (  ) const

Gets the current size of the string.

Returns:
The current size of the string.

Definition at line 167 of file basic_string.h.

size_type max_size (  ) const

Returns the maximum possible size of the string.

Returns:
The maximum size of the string.

Definition at line 203 of file basic_string.h.

size_type size (  ) const

Gets the current size of the string.

Returns:
The current size of the string.

Definition at line 158 of file basic_string.h.

size_t truncated (  ) const

Returns whether the string was truncated by the last operation.

Returns:
Whether the string was truncated by the last operation.

Definition at line 221 of file basic_string.h.


Field Documentation

const size_type CAPACITY [protected]

The maximum number of elements in the string.

Definition at line 240 of file basic_string.h.

size_type current_size [protected]

The current number of elements in the string.

Definition at line 239 of file basic_string.h.

bool is_truncated [protected]

Set to true if the operation truncated the string.

Definition at line 238 of file basic_string.h.