Puma Reference Manual Puma::DString Class Reference



Puma::DString Class Reference

Global hash table based string container. More...

#include <Puma/DString.h>

Public Member Functions

 DString ()
 Constructor. More...
 
 DString (const char *s)
 Constructor. More...
 
 DString (const DString &s)
 Copy constructor. More...
 
 ~DString ()
 Destructor. More...
 
DStringoperator= (const DString &s)
 Assignment operator. More...
 
DStringoperator= (const char *s)
 Assignment operator. More...
 
bool operator== (const DString &s) const
 Check if the given string equals this string. More...
 
bool operator!= (const DString &s) const
 Check if the given string not equals this string. More...
 
const char * c_str () const
 Get the contained C string. More...
 
unsigned int length () const
 Get the length of the string. More...
 
bool empty () const
 Check if the string is empty (length=0). More...
 
unsigned int magic () const
 Get the magic number of the string. More...
 
 operator const char * () const
 Get the contained C string. More...
 

Static Public Member Functions

static void clearDict ()
 Clear the global string hash table. More...
 

Detailed Description

Global hash table based string container.

Constructor & Destructor Documentation

Puma::DString::DString ( )
inline

Constructor.

Puma::DString::DString ( const char *  s)
inline

Constructor.

Parameters
sThe string, is put into the hash table.
Puma::DString::DString ( const DString s)
inline

Copy constructor.

Parameters
sThe string to copy.
Puma::DString::~DString ( )
inline

Destructor.

Member Function Documentation

const char* Puma::DString::c_str ( ) const
inline

Get the contained C string.

static void Puma::DString::clearDict ( )
inlinestatic

Clear the global string hash table.

bool Puma::DString::empty ( ) const
inline

Check if the string is empty (length=0).

unsigned int Puma::DString::length ( ) const
inline

Get the length of the string.

unsigned int Puma::DString::magic ( ) const
inline

Get the magic number of the string.

Puma::DString::operator const char * ( ) const
inline

Get the contained C string.

bool Puma::DString::operator!= ( const DString s) const
inline

Check if the given string not equals this string.

Parameters
sThe string to compare with.
DString& Puma::DString::operator= ( const DString s)
inline

Assignment operator.

Parameters
sThe string to copy.
DString& Puma::DString::operator= ( const char *  s)
inline

Assignment operator.

Parameters
sThe string to copy.
bool Puma::DString::operator== ( const DString s) const
inline

Check if the given string equals this string.

Parameters
sThe string to compare with.



Puma Reference Manual. Created on Tue Oct 28 2014.