File indexing completed on 2026-06-02 08:43:50
0001 #ifndef PROPERTIES_MANAGER_H
0002 #define PROPERTIES_MANAGER_H
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <string>
0012
0013 #include "parser/IniFileParser.h"
0014
0015 namespace sf {
0016 class Mutex;
0017 }
0018
0019 namespace ElemUtils {
0020
0021
0022
0023
0024
0025 class PropertiesManager {
0026 public:
0027
0028
0029
0030
0031
0032
0033 static PropertiesManager* getInstance();
0034
0035
0036
0037
0038 virtual ~PropertiesManager();
0039
0040 void init(const std::string &iniFilePath);
0041
0042 std::string getString(const std::string & section, const std::string & key);
0043 std::string getString(const std::string & key);
0044
0045 bool checkIfAvailable(const std::string & section,
0046 const std::string & key) const;
0047 bool checkIfAvailable(const std::string & key) const;
0048
0049 std::string getPropertiesFilePath() const;
0050
0051 private:
0052 static sf::Mutex m_mutex;
0053
0054 static PropertiesManager* pInstance;
0055
0056
0057
0058
0059 PropertiesManager();
0060
0061 IniFileParser m_iniFileParser;
0062 };
0063
0064 }
0065
0066 #endif