-
Notifications
You must be signed in to change notification settings - Fork 29
/
Config.h
66 lines (56 loc) · 1.4 KB
/
Config.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#pragma once
#include <iostream>
#include <fstream>
#include <cstdio>
#include <filesystem>
#include <Windows.h>
#include <vector>
#include <string>
#include "Vars.h"
#include "Offsets.h"
struct item
{
template <typename T>
item(T &value, const std::string& sz, std::vector<item>& items)
{
this->name = sz;
this->value = reinterpret_cast<void*>(&value);
this->type = typeid(T).name();
items.push_back(*this);
}
void* value;
std::string name;
std::string type;
};
class c_config
{
private:
std::vector< item > m_items;
std::string m_directory = "C:/SoTake";
public:
std::vector< std::string > get_configs() const;
bool import_from_clipboard(const std::string &file);
void export_to_clipboard(const std::string &file) const;
bool init();
bool load(const std::string &file);
bool save(const std::string &file);
bool reset(const std::string &file);
void remove(const std::string &file) const;
};
class c_offsets
{
private:
std::vector< item > m_items;
std::string m_directory = "C:/SoTake";
public:
std::vector< std::string > get_configs() const;
bool import_from_clipboard(const std::string& file);
void export_to_clipboard(const std::string& file) const;
bool init();
bool load(const std::string& file);
bool save(const std::string& file);
bool reset(const std::string& file);
void remove(const std::string& file) const;
};
extern c_config g_configs;
extern c_offsets g_offsets;