2015-07-26 21:39:49 +00:00
|
|
|
#ifndef CSTRINGTABLE_H
|
|
|
|
#define CSTRINGTABLE_H
|
|
|
|
|
|
|
|
#include "CResource.h"
|
|
|
|
#include <Common/types.h>
|
|
|
|
#include <Common/CFourCC.h>
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class CStringTable : public CResource
|
|
|
|
{
|
|
|
|
friend class CStringLoader;
|
|
|
|
|
2015-11-24 06:08:31 +00:00
|
|
|
std::vector<TString> mStringNames;
|
2015-07-26 21:39:49 +00:00
|
|
|
u32 mNumStrings;
|
|
|
|
|
|
|
|
struct SLangTable
|
|
|
|
{
|
|
|
|
CFourCC Language;
|
2015-11-24 06:08:31 +00:00
|
|
|
std::vector<TWideString> Strings;
|
2015-07-26 21:39:49 +00:00
|
|
|
};
|
|
|
|
std::vector<SLangTable> mLangTables;
|
|
|
|
|
|
|
|
public:
|
|
|
|
CStringTable();
|
|
|
|
~CStringTable();
|
|
|
|
EResType Type();
|
|
|
|
CResource* MakeCopy(CResCache *pCopyCache);
|
|
|
|
|
|
|
|
// Getters
|
|
|
|
u32 GetStringCount();
|
|
|
|
u32 GetLangCount();
|
|
|
|
CFourCC GetLangTag(u32 Index);
|
2015-11-24 06:08:31 +00:00
|
|
|
TWideString GetString(CFourCC Lang, u32 StringIndex);
|
|
|
|
TWideString GetString(u32 LangIndex, u32 StringIndex);
|
|
|
|
TString GetStringName(u32 StringIndex);
|
2015-07-26 21:39:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CSTRINGTABLE_H
|