M_ServerURL.h 549 B

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