TorqueScript  0.2
Public Member Functions | List of all members
TorqueScript::StringTable Class Reference

A string table maintains a mapping of numeric identifiers to their raw string values. This is used to simplify code referencing strings by using a fixed width identifier. More...

#include <stringtable.hpp>

Inheritance diagram for TorqueScript::StringTable:
Inheritance graph
[legend]
Collaboration diagram for TorqueScript::StringTable:
Collaboration graph
[legend]

Public Member Functions

std::size_t getOrAssign (const std::string &string)
 
const std::string & getString (const std::size_t id)
 

Detailed Description

A string table maintains a mapping of numeric identifiers to their raw string values. This is used to simplify code referencing strings by using a fixed width identifier.

String identifiers are currently generated by taking a hash of the input string. The hash algorithm used is defined by std::hash in the STL.


The documentation for this class was generated from the following file: