2016-11-25 07:00:48 -05:00
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class StringTable : public Component
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
StringTable();
|
2016-08-15 10:40:30 -04:00
|
|
|
~StringTable();
|
|
|
|
|
2016-11-25 07:00:48 -05:00
|
|
|
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
|
|
|
|
const char* getName() { return "StringTable"; };
|
|
|
|
#endif
|
|
|
|
|
|
|
|
private:
|
|
|
|
static Utils::Memory::Allocator MemAllocator;
|
2016-12-18 07:24:04 -05:00
|
|
|
static std::unordered_map<std::string, Game::StringTable*> StringTableMap;
|
2016-11-25 07:00:48 -05:00
|
|
|
|
|
|
|
static int Hash(const char* data);
|
|
|
|
static Game::StringTable* LoadObject(std::string filename);
|
|
|
|
};
|
|
|
|
}
|