Fish_RedJumpCFG.h 680 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct Fish_RedJumpCFGData
  5. {
  6. //编号
  7. int mID;
  8. //Room顺序
  9. int mRoomOrder;
  10. //对应场次id
  11. int mRoomId;
  12. //前往标题
  13. std::string mTitle;
  14. //前往图片
  15. std::string mResources;
  16. //前往描述
  17. std::string mDesc;
  18. };
  19. class Fish_RedJumpCFG
  20. {
  21. public:
  22. private:
  23. static std::auto_ptr<Fish_RedJumpCFG> msSingleton;
  24. public:
  25. int GetCount();
  26. const Fish_RedJumpCFGData* GetData(int ID);
  27. boost::unordered_map<int, Fish_RedJumpCFGData>& GetMapData();
  28. void Reload();
  29. void Load(const std::string& path);
  30. void Load();
  31. static Fish_RedJumpCFG* GetSingleton();
  32. private:
  33. boost::unordered_map<int, Fish_RedJumpCFGData> mMapData;
  34. };