Compounds | |
| struct | Node |
| This is internal to the _StringTable class. More... | |
Implementation details | |
| enum | { InitialHashTableSize = 1237, InitialNodeListSize = 2048, CompactThreshold = 32768 } |
| void | resizeHashTable (const U32 newSize) |
| Resize the StringTable to be able to hold newSize items. | |
| void | compact () |
| compacts the string data associated with the string table. | |
| U32 | hashString (const char *str) |
| Hash a string into a U32. | |
| U32 | hashStringn (const char *str, S32 len) |
| Hash a string of given length into a U32. | |
| StringTableEntryId | insert (const char *val, const bool caseSens) |
| Adds a string to the string table, and returns the id of the string. | |
| StringTableEntryId | insertn (const char *val, S32 len, const bool caseSens) |
| Adds a string to the string table, and returns the id of the string. | |
| StringTableEntryId | lookup (const char *val, const bool caseSens) |
| Determines if a string is in the string table, and returns the id of the string, or 0 if the string is not in the table. | |
| StringTableEntryId | lookupn (const char *val, S32 len, const bool caseSens) |
| Determines if a string is in the string table, and returns the id of the string, or 0 if the string is not in the table. | |
| Node ** | mNodeList = NULL |
| Master list of string table entry nodes. | |
| StringTableEntryId * | mBuckets = NULL |
| Hash table buckets, organized by string index. | |
| U32 | mNumBuckets = 0 |
| number of hash buckets in the table | |
| U32 | mNodeListSize = 0 |
| number of elements in the node list | |
| StringTableEntryId | mNodeListFreeEntry = 0 |
| index of first free entry in the node list | |
| U32 | mItemCount = 0 |
| number of strings in the table | |
| DataChunker * | mMemPool = NULL |
| memory pool from which string table data is allocated | |
| U32 | mFreeStringDataSize = 0 |
| number of bytes freed by deallocated strings. When this number exceeds CompactThreshold, the table is compacted. | |
|
|
Definition at line 53 of file netStringTable.cpp. |
|
||||||||||||
|
Adds a string to the string table, and returns the id of the string.
Definition at line 182 of file netStringTable.cpp. References insertn(). |
|
||||||||||||||||
|
Adds a string to the string table, and returns the id of the string.
Definition at line 227 of file netStringTable.cpp. References TNL::DataChunker::alloc(), TNL::StringTable::Node::hash, hashStringn(), InitialNodeListSize, TNL::StringTable::Node::masterIndex, mBuckets, mItemCount, mNodeListFreeEntry, mNodeListSize, mNumBuckets, TNL::StringTable::Node::nextIndex, TNL::StringTable::Node::refCount, resizeHashTable(), TNL::StringTable::Node::stringData, TNL::StringTable::Node::stringLen, and TNL::U32. Referenced by insert(). |
|
||||||||||||
|
Determines if a string is in the string table, and returns the id of the string, or 0 if the string is not in the table.
Definition at line 292 of file netStringTable.cpp. References hashString(), mBuckets, mNumBuckets, TNL::StringTable::Node::nextIndex, TNL::StringTable::Node::stringData, and TNL::U32. |
|
||||||||||||||||
|
Determines if a string is in the string table, and returns the id of the string, or 0 if the string is not in the table.
Definition at line 310 of file netStringTable.cpp. References hashStringn(), mBuckets, mNumBuckets, TNL::StringTable::Node::nextIndex, TNL::StringTable::Node::stringData, and TNL::U32. |
|
|
Resize the StringTable to be able to hold newSize items. This is called automatically by the StringTable when the table is full past a certain threshhold.
Definition at line 328 of file netStringTable.cpp. References TNL::StringTable::Node::hash, TNL::StringTable::Node::masterIndex, mBuckets, mNumBuckets, TNL::StringTable::Node::nextIndex, and TNL::U32. Referenced by insertn(). |
1.2.18