|
- #pragma once
-
- #include <map>
-
- #include <QMutex>
- #include <QString>
- #include "ConfigInfo.h"
-
- class Singleton
- {
- public:
- ~Singleton();
- static Singleton* CreateInstance();
- bool setExePath(QString path);
- QString getExePath();
- void setConfigInfo(std::map<QString, ConfigInfo*>& mapStrConfigInfo);
- std::map<QString, ConfigInfo*>& getConfigInfo();
- void setModelType(QString modeltype);
- QString getModelType();
- void setDataPath(QString path);
- QString getDataPath();
-
- private:
- static Singleton* m_pInstance;
- static QMutex m_mutex;
- QString m_strExePath;
- QString m_strDataPath; // 数据存储路径
- std::map<QString, ConfigInfo*> m_mapStrConfigInfo;
- QString m_strModelType;
-
- private:
- Singleton();
- };
|