newspeoplefor developersdocumentationdownloads

nAtomTable Class Reference
[Nebula Kernel]

#include <natomtable.h>

List of all members.


Detailed Description

An atom table is where atoms store their strings.

FIXME: hmm, the table can not shrink, is this even desirable??? (shrinking the table would invalidate all nAtoms out there!).

May be manually, expensive garbage collection pass would help? But in this case Atoms would need to become invalid some (and need to be able to revalidates themselves). This is only possible if the atom table stores pointers to all its atoms.... hmm hmm hmm...

(C) 2004 RadonLabs GmbH

Definition at line 25 of file natomtable.h.


Public Member Functions

 nAtomTable ()
 constructor
 ~nAtomTable ()
 destructor
ushort StringToKey (const char *str)
 convert a string into an index
const nStringKeyToString (ushort key) const
 convert an index into a string

Static Public Member Functions

static nAtomTableInstance ()
 return pointer to singleton instance

Constructor & Destructor Documentation

nAtomTable::nAtomTable  ) 
 

constructor

nAtomTable constructor. Note that nAtomTable is a Singleton.

Definition at line 13 of file natomtable.cc.

nAtomTable::~nAtomTable  ) 
 

destructor

nAtomTable destructor.

Definition at line 24 of file natomtable.cc.


Member Function Documentation

nAtomTable * nAtomTable::Instance  )  [inline, static]
 

return pointer to singleton instance

Definition at line 49 of file natomtable.h.

ushort nAtomTable::StringToKey const char *  str  )  [inline]
 

convert a string into an index

Map string to 16 bit key.

Definition at line 61 of file natomtable.h.

const nString & nAtomTable::KeyToString ushort  key  )  const [inline]
 

convert an index into a string

Convert 16 bit key to string.

Definition at line 72 of file natomtable.h.


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

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