CrystalSpace

Public API Reference

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

csStringHash Class Reference

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

#include <strhash.h>

List of all members.

Public Methods

 csStringHash (uint32 size=211)
 Constructor.

 ~csStringHash ()
 Destructor.

const char * Register (const char *s, csStringID id)
 Register a string with an id.

csStringID Request (const char *s)
 Request the ID for the given string.

const char * Request (csStringID id)
 Request the string for a given ID.

void Clear ()
 Delete all stored strings.


Detailed Description

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

Each string has an ID number.

Definition at line 70 of file strhash.h.


Constructor & Destructor Documentation

csStringHash::csStringHash uint32    size = 211
 

Constructor.

csStringHash::~csStringHash  
 

Destructor.


Member Function Documentation

void csStringHash::Clear  
 

Delete all stored strings.

const char* csStringHash::Register const char *    s,
csStringID    id
 

Register a string with an id.

Returns the pointer to the copy of the string in this hash.

const char* csStringHash::Request csStringID    id
 

Request the string for a given ID.

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

csStringID csStringHash::Request const char *    s
 

Request the ID for the given string.

Return csInvalidStringID if the string was never requested before.


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