#ifndef STRING_TABLE_H #define STRING_TABLE_H #include struct StringTableEntry { StringTableEntry() {} StringTableEntry(const irr::core::stringw &identifier_) : mIdentifier(identifier_) {} StringTableEntry(const irr::core::stringw &identifier_, const irr::core::stringw &string_) : mIdentifier(identifier_), mString(string_) {} bool operator <(const StringTableEntry& other_) const { return mIdentifier < other_.mIdentifier; } irr::core::stringw mIdentifier; irr::core::stringw mString; }; class StringTable { public: bool Load(const char* filename_); // bool Save(const c8* filename_); // not implemented // add another string to the stringtable void Add(const irr::core::stringw &identifier_, const irr::core::stringw &string_); // Get the string for identifier_ // If identifier_ ain't available return the identifier itself. irr::core::stringw Get(const irr::core::stringw &identifier_); irr::core::stringw Get(const char *identifier_); private: irr::core::array mStringTable; }; #endif // STRING_TABLE_H