-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpatch_style_settings.h
52 lines (49 loc) · 2.11 KB
/
patch_style_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
50
51
52
#pragma once
#include <filesystem>
#include <nlohmann/json.hpp>
class PatchStyleSettings {
int indentationSpacesPerModifier = 2;
//Outer wrapper brackets
bool newLineAfterOuterOpenerBracket = true;
bool newLineAfterOuterCloserBracket = true;
bool indentationInOuterBrackets = true;
//Operation set wrapper brackets (Starbound specific)
bool newLineAfterOperationSetOpenerBracket = true;
bool newLineAfterOperationSetCloserBracket = false;
bool newLineAfterOperationSetCloserBracketComma = true;
bool indentationInOperationSetBrackets = true;
//Operation wrapper brackets
bool newLineAfterOperationOpenerBracket = true;
bool newLineAfterOperationCloserBracket = false;
bool newLineAfterOperationCloserBracketComma = true;
bool indentationInOperationBrackets = true;
//Operation contents
bool newLineAfterOperationSegment = true;
bool spaceBeforeOperationColon = true;
bool spaceAfterOperationColon = true;
void loadSettings(nlohmann::json settingsJson);
void writeSettings(std::stringstream & settingsText);
public:
PatchStyleSettings();
PatchStyleSettings(std::filesystem::path settingsPath);
//Getters
const int getIndentationSpacesPerModifier();
//Outer wrapper brackets
const bool getNewLineAfterOuterOpenerBracket();
const bool getNewLineAfterOuterCloserBracket();
const bool getIndentationInOuterBrackets();
//Operation set wrapper brackets (Starbound specific)
const bool getNewLineAfterOperationSetOpenerBracket();
const bool getNewLineAfterOperationSetCloserBracket();
const bool getNewLineAfterOperationSetCloserBracketComma();
const bool getIndentationInOperationSetBrackets();
//Operation wrapper brackets
const bool getNewLineAfterOperationOpenerBracket();
const bool getNewLineAfterOperationCloserBracket();
const bool getNewLineAfterOperationCloserBracketComma();
const bool getIndentationInOperationBrackets();
//Operation contents
const bool getNewLineAfterOperationSegment();
const bool getSpaceBeforeOperationColon();
const bool getSpaceAfterOperationColon();
};