1234567891011121314151617181920212223242526272829303132333435 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct Fish_SoundCFGData
- {
- //声音ID
- int mSoundID;
- //声音名字
- std::string mSoundName;
- //声音路径
- std::string mSoundPath;
- //声音时间
- int mSoundTime;
- //声音类型
- int mSoundType;
- //声音优先级
- int mSoundPriority;
- };
- class Fish_SoundCFG
- {
- public:
- private:
- static std::auto_ptr<Fish_SoundCFG> msSingleton;
- public:
- int GetCount();
- const Fish_SoundCFGData* GetData(int SoundID);
- boost::unordered_map<int, Fish_SoundCFGData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static Fish_SoundCFG* GetSingleton();
- private:
- boost::unordered_map<int, Fish_SoundCFGData> mMapData;
- };
|