The Nebula Device 3: Util::StringAtom Class Reference

The Nebula Device 3

Util::StringAtom Class Reference

#include <stringatom.h>


Detailed Description

A StringAtom. See StringAtomTableBase for details about the StringAtom system in N3.

TODO: WARNING/STATISTICS for creation from char* or String and converting back to String!

(C) 2007 Radon Labs GmbH

Public Member Functions

 StringAtom ()
 default constructor
 StringAtom (const StringAtom &rhs)
 copy constructor
 StringAtom (char *ptr)
 construct from char ptr
 StringAtom (const char *ptr)
 construct from char ptr
 StringAtom (unsigned char *ptr)
 construct from char ptr
 StringAtom (const unsigned char *ptr)
 construct from char ptr
 StringAtom (const String &str)
 construct from string object
void operator= (const StringAtom &rhs)
 assignment
void operator= (const char *ptr)
 assignment from char ptr
void operator= (const String &str)
 assignment from string object
bool operator== (const StringAtom &rhs) const
 equality operator
bool operator!= (const StringAtom &rhs) const
 inequality operator
bool operator> (const StringAtom &rhs) const
 greater-then operator
bool operator< (const StringAtom &rhs) const
 less-then operator
bool operator>= (const StringAtom &rhs) const
 greater-or-equal operator
bool operator<= (const StringAtom &rhs) const
 less-or-equal operator
bool operator== (const char *rhs) const
 equality with char* (SLOW!)
bool operator!= (const char *rhs) const
 inequality with char* (SLOW!)
bool operator== (const String &rhs) const
 equality with string object (SLOW!)
bool operator!= (const String &rhs) const
 inequality with string object (SLOW!)
void Clear ()
 clear content (becomes invalid)
bool IsValid () const
 return true if valid (contains a non-empty string)
const char * Value () const
 get contained string as char ptr (fast)
String AsString () const
 get containted string as string object (SLOW!!!)

Member Function Documentation

bool Util::StringAtom::operator== ( const char *  rhs  )  const

equality with char* (SLOW!)

Compare with raw string. Careful, slow!

bool Util::StringAtom::operator!= ( const char *  rhs  )  const

inequality with char* (SLOW!)

Compare with raw string. Careful, slow!

bool Util::StringAtom::operator== ( const String rhs  )  const [inline]

equality with string object (SLOW!)

Compare with String object. Careful, slow!

bool Util::StringAtom::operator!= ( const String rhs  )  const [inline]

inequality with string object (SLOW!)

Compare with String object. Careful, slow!

String Util::StringAtom::AsString (  )  const [inline]

get containted string as string object (SLOW!!!)

SLOW!!!