M_InsideId.h 510 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_InsideIdData
  5. {
  6. //ID
  7. int mId;
  8. //Íæ¼Òid
  9. int mPlayerId;
  10. };
  11. class M_InsideId
  12. {
  13. public:
  14. private:
  15. static std::auto_ptr<M_InsideId> msSingleton;
  16. public:
  17. int GetCount();
  18. const M_InsideIdData* GetData(int Id);
  19. boost::unordered_map<int, M_InsideIdData>& GetMapData();
  20. void Reload();
  21. void Load(const std::string& path);
  22. void Load();
  23. static M_InsideId* GetSingleton();
  24. private:
  25. boost::unordered_map<int, M_InsideIdData> mMapData;
  26. };