TorqueScript
0.2
|
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>
Public Member Functions | |
std::size_t | getOrAssign (const std::string &string) |
const std::string & | getString (const std::size_t id) |
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.