iw4x-client/src/Components/Modules/StringTable.hpp

23 lines
480 B
C++
Raw Normal View History

2017-01-20 08:36:52 -05:00
#pragma once
2017-01-19 16:23:59 -05:00
namespace Components
{
class StringTable : public Component
{
public:
StringTable();
~StringTable();
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
2017-01-20 08:36:52 -05:00
const char* getName() override { return "StringTable"; };
2017-01-19 16:23:59 -05:00
#endif
private:
static Utils::Memory::Allocator MemAllocator;
static std::unordered_map<std::string, Game::StringTable*> StringTableMap;
static int Hash(const char* data);
static Game::StringTable* LoadObject(std::string filename);
};
}