-
Notifications
You must be signed in to change notification settings - Fork 0
/
parse_settings.h
49 lines (44 loc) · 1.21 KB
/
parse_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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once
#include <filesystem>
#include <vector>
enum placeholderCondition {
never,
whenPossible,
fromExists
};
enum placeholderOperation {
none,
copy,
move
};
struct PointerSettings {
//Shared.
std::string path = "";
std::string from = "";
std::string numericIteratorMarker = "";
bool reference = false;
bool convertBreakoutNewlines = false;
//Intermediary.
placeholderCondition intermediaryPlaceholderCondition = never;
std::string intermediaryLabel = "";
//Patch.
bool patchTestOperation = true;
placeholderOperation patchOperationIfPlaceholder = none;
std::string patchRemoveIfEquals = "";
};
class FileSettings {
private:
std::string fileExtension;
bool addPatchMakersComment = false;
bool valuesContainNewlines = false;
std::vector<PointerSettings> allPointerSettings;
public:
FileSettings(std::filesystem::path settingsPath);
void writeExampleSettings(std::stringstream & settingsText);
const bool hasPointerSettings();
//Getters
const std::string getFileExtension();
const bool getAddPatchMakersComment();
const bool getValuesContainNewlines();
std::vector<PointerSettings> getAllPointerSettings();
};