KolibriLib
Loading...
Searching...
No Matches
settings.hpp
1#ifndef __SETTINGS_H__
2#define __SETTINGS_H__
3
4
5#include <fstream>
6#include <vector>
7
8#include "filesystem.hpp"
9#include "base.hpp"
10#include "childWindow.hpp"
11
12namespace KolibriLib
13{
15 namespace Settings
16 {
18 {
19 std::string Group;
20 std::string Name;
21 std::string Data;
22 };
23
24 std::vector<SettingsParam> Settings;
25
29 bool LoadSettings(std::string AppName)
30 {
31 std::string path = KolibriLib::ConfigFolder + AppName + "conf.ini";
32 std::ifstream file(path.c_str());
33
34 if(file.is_open())
35 {
36
37 }
38 else
39 {
40
41 return 0;
42 }
43 }
44
48 bool SaveSettings(std::string AppName)
49 {
50 std::string path = KolibriLib::ConfigFolder + AppName + "conf.ini";
51 std::ofstream file(path.c_str());
52
53 if (file.is_open())
54 {
55 for(unsigned i = 0; i < Settings.size(); i++)
56 {
57
58 }
59
60 }
61 else
62 {
63
64 return 0;
65 }
66 file.close();
67 }
68
69 } // namespace Settings
70
71}
72
73#endif // __SETTINGS_H__
bool LoadSettings(std::string AppName)
Загрузить настройки приложения
Definition settings.hpp:29
bool SaveSettings(std::string AppName)
Сохранить настройки приложения
Definition settings.hpp:48
Основное пространство имён
Definition base.hpp:17
const std::string ConfigFolder
Путь по которому сохраняются настройки приложений
Definition base.hpp:28
Definition settings.hpp:18