Public Member Functions |
void | Clear () |
| Remove all stored strings.
|
bool | Contains (char const *s) const |
| Check if the set contains a particular string.
|
bool | Contains (CS::StringID< Tag > id) const |
| Check if the set contains a string with a particular ID.
|
bool | Delete (char const *s) |
| Remove specified string.
|
bool | Delete (CS::StringID< Tag > id) |
| Remove a string with the specified ID.
|
void | Empty () |
| Remove all stored strings.
|
GlobalIterator | GetIterator () const |
| Return an iterator for the set which iterates over all strings.
|
size_t | GetSize () const |
| Get the number of elements in the hash.
|
bool | IsEmpty () const |
| Return true if the hash is empty.
|
StringSet & | operator= (StringSet const &s) |
| Assignment operator.
|
CS::StringID< Tag > | Request (const char *s) |
| Request the numeric ID for the given string.
|
char const * | Request (CS::StringID< Tag > id) const |
| Request the string corresponding to the given ID.
|
| StringSet (size_t size=23) |
| Constructor.
|
| StringSet (StringSet const &s) |
| Copy constructor.
|
| ~StringSet () |
| Destructor.
|
template<typename Tag, bool Locked = false>
class CS::Utility::StringSet< Tag, Locked >
The string set is a collection of unique strings.
Each string has an ID number. The most important operation is to request a string, which means to return the ID for the string, adding it to the collection if not already present. This is useful when you need to work with strings but want the performance characteristics of simple numeric comparisons. Rather than performing string comparisons, you instead compare the numeric string ID's.
If Locked is true operations on an instance of the set are locked are for concurrent accesses.
- See also:
- csStringHash
-
iStringSet
Definition at line 48 of file strset.h.