SimFieldDictionary Class Reference

#include <simFieldDictionary.h>

List of all members.


Detailed Description

Dictionary to keep track of dynamic fields on SimObject.


Public Member Functions

const U32 getVersion () const
 SimFieldDictionary ()
 ~SimFieldDictionary ()
void setFieldType (StringTableEntry slotName, const char *typeString)
void setFieldType (StringTableEntry slotName, const U32 typeId)
void setFieldType (StringTableEntry slotName, ConsoleBaseType *type)
void setFieldValue (StringTableEntry slotName, const char *value)
const char * getFieldValue (StringTableEntry slotName)
U32 getFieldType (StringTableEntry slotName) const
EntryfindDynamicField (const String &fieldName) const
void writeFields (SimObject *obj, Stream &strem, U32 tabStop)
void printFields (SimObject *obj)
void assignFrom (SimFieldDictionary *dict)
U32 getNumFields () const
Entryoperator[] (U32 index)

Private Types

 HashTableSize = 19
enum  { HashTableSize = 19 }

Private Member Functions

void freeEntry (Entry *entry)
EntryaddEntry (U32 bucket, StringTableEntry slotName, ConsoleBaseType *type, char *value=0)

Static Private Member Functions

static U32 getHashValue (StringTableEntry slotName)
static U32 getHashValue (const String &fieldName)

Private Attributes

EntrymHashTable [HashTableSize]
U32 mNumFields
U32 mVersion
 In order to efficiently detect when a dynamic field has been added or deleted, we increment this every time we add or remove a field.

Static Private Attributes

static EntrysmFreeList

Friends

class SimFieldDictionaryIterator

Classes

struct  Entry


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
HashTableSize 


Constructor & Destructor Documentation

SimFieldDictionary::SimFieldDictionary (  ) 

SimFieldDictionary::~SimFieldDictionary (  ) 


Member Function Documentation

void SimFieldDictionary::freeEntry ( Entry entry  )  [private]

Entry* SimFieldDictionary::addEntry ( U32  bucket,
StringTableEntry  slotName,
ConsoleBaseType type,
char *  value = 0 
) [private]

static U32 SimFieldDictionary::getHashValue ( StringTableEntry  slotName  )  [static, private]

static U32 SimFieldDictionary::getHashValue ( const String fieldName  )  [static, private]

const U32 SimFieldDictionary::getVersion (  )  const [inline]

void SimFieldDictionary::setFieldType ( StringTableEntry  slotName,
const char *  typeString 
)

void SimFieldDictionary::setFieldType ( StringTableEntry  slotName,
const U32  typeId 
)

void SimFieldDictionary::setFieldType ( StringTableEntry  slotName,
ConsoleBaseType type 
)

void SimFieldDictionary::setFieldValue ( StringTableEntry  slotName,
const char *  value 
)

const char* SimFieldDictionary::getFieldValue ( StringTableEntry  slotName  ) 

U32 SimFieldDictionary::getFieldType ( StringTableEntry  slotName  )  const

Entry* SimFieldDictionary::findDynamicField ( const String fieldName  )  const

void SimFieldDictionary::writeFields ( SimObject obj,
Stream strem,
U32  tabStop 
)

void SimFieldDictionary::printFields ( SimObject obj  ) 

void SimFieldDictionary::assignFrom ( SimFieldDictionary dict  ) 

U32 SimFieldDictionary::getNumFields (  )  const [inline]

Entry* SimFieldDictionary::operator[] ( U32  index  ) 


Friends And Related Function Documentation

friend class SimFieldDictionaryIterator [friend]


Member Data Documentation

Entry* SimFieldDictionary::mHashTable[HashTableSize] [private]

In order to efficiently detect when a dynamic field has been added or deleted, we increment this every time we add or remove a field.