-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathStringBuilder.h
36 lines (29 loc) · 1 KB
/
StringBuilder.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
#ifndef STRINGBUILDER_H
#define STRINGBUILDER_H
#include <string>
using namespace std;
class StringBuilder {
// String representations of processed data
string raw;
string text;
string indent;
string json;
public:
// Functions to create string representations of processed data
void start_str();
void end_str();
void add_indent();
void del_indent();
void add_separator();
void add_newline();
void add_python(string python_str);
void add_str(const string &a_title, const string &a_str, string nature = "all");
void add_int(const string &a_title, int an_int, string nature = "all");
void add_float(const string &a_title, float a_float, string nature = "all");
void add_float_pure(float a_float, string nature = "all");
void add_bool(const string &a_title, bool a_bool, string nature = "all");
const string getJson() const { return json; }
const string getRaw() const { return raw; }
const string getText() const { return text; }
};
#endif