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