CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

iStringSet Struct Reference
[Utilities]

The string set is a list of strings, all with different content. More...

#include <iutil/strset.h>

Inheritance diagram for iStringSet:

iBase csScfStringSet List of all members.

Public Member Functions

virtual csStringID Request (const char *s)=0
 Request the ID for the given string.
virtual const char * Request (csStringID id)=0
 Request the string for a given ID.
virtual void Clear ()=0
 Delete all stored strings.

Detailed Description

The string set is a list of strings, all with different content.

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 list if it is not already there.

To obtain the default string set (to be used when string ID are shared by multiple plugins, e.g. as done in the shader system) use a code snipped similar to the following:

 iObjectRegistry* object_reg = ...;
 csRef<iStringSet> Strings = CS_QUERY_REGISTRY_TAG_INTERFACE (
   object_reg, "crystalspace.shared.stringset", iStringSet);

Definition at line 49 of file strset.h.


Member Function Documentation

virtual void iStringSet::Clear  )  [pure virtual]
 

Delete all stored strings.

When new strings are registered again, new ID values will be used, not the old ones reused.

Implemented in csScfStringSet.

virtual const char* iStringSet::Request csStringID  id  )  [pure virtual]
 

Request the string for a given ID.

Return 0 if the string has not been requested (yet).

Implemented in csScfStringSet.

virtual csStringID iStringSet::Request const char *  s  )  [pure virtual]
 

Request the ID for the given string.

Create a new ID if the string was never requested before.

Implemented in csScfStringSet.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.3.9.1