forked from Hal47/dsfix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Settings.h
25 lines (23 loc) · 991 Bytes
/
Settings.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
#include <string>
class Settings {
static Settings instance;
bool initialized = false;
#define SETTING(_type, _var, _inistring, _defaultval) \
private: \
_type _var = _defaultval; \
\
public: \
_type get##_var() const { return _var; }; \
void set##_var(_type _var) { this->_var = _var; };
#include "Settings.inc"
#undef SETTING
public:
static Settings& get() { return instance; }
void load();
void save();
void report();
void init();
void shutdown();
Settings() = default;
};