MCPcopy Create free account
hub / github.com/MhmRdd/NoHello / PropertyManager

Class PropertyManager

module/src/main/cpp/PropertyManager.h:8–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include <vector>
7
8class PropertyManager {
9public:
10 explicit PropertyManager(std::string path);
11
12 std::string getProp(const std::string& key, const std::string& defaultValue = "");
13 void setProp(const std::string& key, const std::string& value);
14 // bool hasProp(const std::string& key) const;
15 // void removeProp(const std::string& key);
16
17private:
18 std::string filePath;
19
20 // Maintain insertion order
21 std::vector<std::pair<std::string, std::string>> orderedProps;
22
23 // Fast lookup: key -> index in orderedProps
24 std::unordered_map<std::string, size_t> keyIndex;
25
26 bool loadFromFile();
27 bool saveToFile();
28};
29
30#endif //NOHELLO_PROPERTYMANAGER_H

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected