Repository navigation
Expand file tree
/
Copy pathformatter.cpp
More file actions
120 lines (98 loc) · 2.57 KB
/
Copy pathformatter.cpp
File metadata and controls
120 lines (98 loc) · 2.57 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#include "formatter.h"
#include <boost/optional.hpp>
namespace datastream {
//Formatter::Formatter(){};
void Formatter::up(unsigned int i ){
depth += i;
}
void Formatter::down(unsigned int i ){
depth -= i;
if (depth < 0){
depth=0;
}
}
void Formatter::setDepth(unsigned int i ){
depth = i;
}
void Formatter::separate(
ostream & os,
unsigned int siblings_written,
unsigned int extraIndent
){}
void Formatter::step(
ostream & os,
unsigned int siblings_written,
unsigned int extraIndent
){}
void Formatter::stepUp(
ostream & os,
unsigned int siblings_written,
unsigned int extraIndent
){
up();
step(os, siblings_written, extraIndent);
}
void Formatter::stepDown(
ostream & os,
unsigned int siblings_written,
unsigned int extraIndent
){
down();
step(os, siblings_written, extraIndent);
}
void Formatter::openGroup(
ostream & os,
const string& group_label,
const string& row_label,
unsigned int & siblings_written,
RowWrapper parent_row_wrapper,
bool single_child_per_parent,
GroupWrapper group_wrapper
){};
void Formatter::closeGroup(
ostream & os,
const string& group_label,
const string& row_label,
unsigned int & siblings_written,
RowWrapper parent_row_wrapper,
bool single_child_per_parent,
GroupWrapper group_wrapper
){};
void Formatter::openElement(
ostream & os,
const string& label,
RowWrapper row_wrapper,
unsigned int & siblings_written
){};
void Formatter::writeValue(
ostream & os,
const string& name,
const boost::optional<string>& value,
ElementDataType data_type,
unsigned int & siblings_written
){};
void Formatter::writeElement(
ostream & os,
const string& name,
const boost::optional<string>& value,
ElementDataType data_type,
GroupWrapper parent_group_wrapper,
RowWrapper parent_row_wrapper,
unsigned int & siblings_written
){};
void Formatter::writeEmptyGroup(
ostream & os,
const string& group_label,
const string& row_label,
unsigned int & siblings_written,
RowWrapper parent_row_wrapper,
bool single_child_per_parent,
GroupWrapper group_wrapper,
RowWrapper rowWrapper
){};
void Formatter::open(ostream & os, GroupWrapper group_wrapper){};
void Formatter::openRow(ostream & os, const string& name, RowWrapper rowWrapper, unsigned int & siblings_written ){}
void Formatter::closeRow(ostream & os, const string& name, RowWrapper rowWrapper){};
void Formatter::closeElement(ostream & os, const string& name, RowWrapper row_wrapper, unsigned int & siblings_written ){};
void Formatter::close(ostream & os, GroupWrapper group_wrapper){};
}