finished basic ini skeleton

This commit is contained in:
Hane 2024-12-06 19:59:09 +01:00
commit adca5111f6
4 changed files with 83 additions and 11 deletions

View file

@ -57,18 +57,13 @@ class UserSettings {
char* const getValue(char* key, uint64_t len = 0);
void setValue(char* key, char* value, uint64_t valueSize, uint64_t keySize); //'\0' included
void setValue(char* key, bool value, uint64_t keySize); //'\0' included
//void setValue(char* key, uint64_t value, uint64_t valueSize, uint64_t keySize); //'\0' included
bool save(const char* path);
protected:
private:
//void* returnValue();
UserSettings(char* text = nullptr);
//std::map<const char*, int> values{ {"show_channels", false}, {"test", 7} };
UserSettings(char* text = nullptr);
std::unordered_map<char*, char*, Djb12Hasher, StrcmpEqual> values;
//char* textContents = nullptr;
//uint64_t textContentsSize = 0;
char* pos = "true";
char* neg = "false";
};