Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages
csStringHash Class Reference
A string-to-ID hash table. More...
#include <csutil/strhash.h>
Public Member Functions | |
csStringHash (int size=23) | |
Constructor. | |
~csStringHash () | |
Destructor. | |
const char * | Register (const char *s, csStringID id) |
Register a string with an ID. | |
csStringID | Request (const char *s) const |
Request the ID for the given string. | |
const char * | Request (csStringID id) const |
Request the string for a given ID. | |
void | Clear () |
Delete all stored strings. | |
Friends | |
class | csStringHashIterator |
Detailed Description
A string-to-ID hash table.Useful when you need to work with strings but want the performance characteristics of simple numeric comparisons. Register a string with a unique numeric ID and then compare ID's rather than comparing strings. You can fetch a string's ID via Request().
- See also:
- csStringSet
Definition at line 48 of file strhash.h.
Constructor & Destructor Documentation
|
Constructor.
|
|
Destructor.
|
Member Function Documentation
|
Delete all stored strings.
|
|
Register a string with an ID.
|
|
Request the string for a given ID.
|
|
Request the ID for the given string.
|
The documentation for this class was generated from the following file:
- csutil/strhash.h
Generated for Crystal Space by doxygen 1.3.9.1