newspeoplefor developersdocumentationdownloads

nAtom Class Reference

#include <natom.h>

List of all members.


Detailed Description

Atoms are shared read-only strings which only require 2 bytes of memory per instance and have extremly fast compare and copy operations.

(C) 2004 RadonLabs GmbH

Definition at line 16 of file natom.h.


Public Member Functions

 nAtom ()
 default constructor
 nAtom (const char *str)
 constructor from char pointer, in default global table
 nAtom (const nAtom &rhs)
 copy constructor
 ~nAtom ()
 destructor
void operator= (const nAtom &rhs)
 assignment operator
void operator= (const char *rhs)
 assignment operator with char pointer
bool operator== (const nAtom &rhs) const
 equality operator
bool operator== (const char *rhs) const
 equality operator with char pointer
bool operator!= (const nAtom &rhs) const
 inequality operator
bool operator!= (const char *rhs) const
 inequality operator with char pointer
const char * AsChar () const
 return string as const char*
const nStringAsString () const
 return string as const nString&
const nStringoperator * () const
 cast to nString

Protected Types

enum  { InvalidKey = 0xffff }

Protected Attributes

ushort key

Member Enumeration Documentation

anonymous enum [protected]
 

Enumerator:
InvalidKey 

Definition at line 47 of file natom.h.


Constructor & Destructor Documentation

nAtom::nAtom  )  [inline]
 

default constructor

Definition at line 58 of file natom.h.

nAtom::nAtom const char *  str  )  [inline]
 

constructor from char pointer, in default global table

Definition at line 68 of file natom.h.

nAtom::nAtom const nAtom rhs  )  [inline]
 

copy constructor

Definition at line 77 of file natom.h.

nAtom::~nAtom  )  [inline]
 

destructor

Definition at line 86 of file natom.h.


Member Function Documentation

void nAtom::operator= const nAtom rhs  )  [inline]
 

assignment operator

Definition at line 96 of file natom.h.

void nAtom::operator= const char *  rhs  )  [inline]
 

assignment operator with char pointer

Definition at line 106 of file natom.h.

bool nAtom::operator== const nAtom rhs  )  const [inline]
 

equality operator

Definition at line 116 of file natom.h.

bool nAtom::operator== const char *  rhs  )  const [inline]
 

equality operator with char pointer

WARNING: this ends up as a normal string compare!

Definition at line 127 of file natom.h.

bool nAtom::operator!= const nAtom rhs  )  const [inline]
 

inequality operator

Definition at line 138 of file natom.h.

bool nAtom::operator!= const char *  rhs  )  const [inline]
 

inequality operator with char pointer

WARNING: this ends up as a normal string compare!

Definition at line 149 of file natom.h.

const char * nAtom::AsChar  )  const [inline]
 

return string as const char*

Return string as const char*

Definition at line 161 of file natom.h.

const nString & nAtom::AsString  )  const [inline]
 

return string as const nString&

Return string as const nString&

Definition at line 172 of file natom.h.

const nString & nAtom::operator *  )  const [inline]
 

cast to nString

Cast to "const nString&".

Definition at line 183 of file natom.h.


Member Data Documentation

ushort nAtom::key [protected]
 

Definition at line 51 of file natom.h.


The documentation for this class was generated from the following file:

Copyright © 1999-2005 by the contributing authors. Ideas, requests, problems: Send feedback.