123456789101112131415161718192021222324252627 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct M_ChatWordData
- {
- //˳ÐòID
- int mWordId;
- //³£ÓÃÓï
- std::string mText;
- };
- class M_ChatWord
- {
- public:
- private:
- static std::auto_ptr<M_ChatWord> msSingleton;
- public:
- int GetCount();
- const M_ChatWordData* GetData(int WordId);
- boost::unordered_map<int, M_ChatWordData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static M_ChatWord* GetSingleton();
- private:
- boost::unordered_map<int, M_ChatWordData> mMapData;
- };
|