GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: tmp_project/FileParser/src/VecValue.cpp Lines: 47 56 83.9 %
Date: 2024-09-10 03:06:26 Branches: 2 2 100.0 %

Line Branch Exec Source
1
/***************************************
2
	Auteur : Pierre Aubert
3
	Mail : pierre.aubert@lapp.in2p3.fr
4
	Licence : CeCILL-C
5
****************************************/
6
7
8
9
10
#include "VecValue.h"
11
12
///Constructor of class VecValue
13
345
VecValue::VecValue(){
14
345
	initialisationVecValue();
15
345
}
16
17
///Copy Constructor of class VecValue
18
/**	@param other : VecValue we want ot copy
19
*/
20
752
VecValue::VecValue(const VecValue & other){
21
752
	copyVecValue(other);
22
752
}
23
24
///Destructor of class VecValue
25
2194
VecValue::~VecValue(){
26
27
}
28
29
///Operator = of class VecValue
30
/**	@param other : VecValue we want ot copy
31
 * 	@return copied class VecValue
32
*/
33
VecValue & VecValue::operator = (const VecValue & other){
34
	copyVecValue(other);
35
	return *this;
36
}
37
38
///Sets the value of the VecValue
39
/**	@param value : value of the VecValue
40
*/
41
244
void VecValue::setValue(const std::string & value){
42
244
	p_value = value;
43
244
}
44
45
///Sets the key of the VecValue
46
/**	@param key : key of the VecValue
47
*/
48
299
void VecValue::setKey(const std::string & key){
49
299
	p_key = key;
50
299
}
51
52
///Sets the vecChild of the VecValue
53
/**	@param vecChild : vecChild of the VecValue
54
*/
55
void VecValue::setVecChild(const std::vector<VecValue> & vecChild){
56
	p_vecChild = vecChild;
57
}
58
59
///Sets the type of the VecValue
60
/**	@param type : type of the VecValue
61
*/
62
412
void VecValue::setType(const VecValueType::VecValueType & type){
63
412
	p_type = type;
64
412
}
65
66
///Sets the indentation of the VecValue
67
/**	@param indentation : indentation of the VecValue
68
*/
69
317
void VecValue::setIndentation(size_t indentation){
70
317
	p_indentation = indentation;
71
317
}
72
73
///Gets the value of the VecValue
74
/**	@return value of the VecValue
75
*/
76
244
const std::string & VecValue::getValue() const{
77
244
	return p_value;
78
}
79
80
///Gets the value of the VecValue
81
/**	@return value of the VecValue
82
*/
83
std::string & VecValue::getValue(){
84
	return p_value;
85
}
86
87
///Gets the key of the VecValue
88
/**	@return key of the VecValue
89
*/
90
416
const std::string & VecValue::getKey() const{
91
416
	return p_key;
92
}
93
94
///Gets the key of the VecValue
95
/**	@return key of the VecValue
96
*/
97
std::string & VecValue::getKey(){
98
	return p_key;
99
}
100
101
///Gets the vecChild of the VecValue
102
/**	@return vecChild of the VecValue
103
*/
104
345
const std::vector<VecValue> & VecValue::getVecChild() const{
105
345
	return p_vecChild;
106
}
107
108
///Gets the vecChild of the VecValue
109
/**	@return vecChild of the VecValue
110
*/
111
1255
std::vector<VecValue> & VecValue::getVecChild(){
112
1255
	return p_vecChild;
113
}
114
115
///Gets the type of the VecValue
116
/**	@return type of the VecValue
117
*/
118
38
const VecValueType::VecValueType & VecValue::getType() const{
119
38
	return p_type;
120
}
121
122
///Gets the type of the VecValue
123
/**	@return type of the VecValue
124
*/
125
81
VecValueType::VecValueType & VecValue::getType(){
126
81
	return p_type;
127
}
128
129
///Gets the indentation of the VecValue
130
/**	@return indentation of the VecValue
131
*/
132
26
size_t VecValue::getIndentation() const{
133
26
	return p_indentation;
134
}
135
136
///Gets the indentation of the VecValue
137
/**	@return indentation of the VecValue
138
*/
139
38
size_t & VecValue::getIndentation(){
140
38
	return p_indentation;
141
}
142
143
///Copy Function of class VecValue
144
/**	@param other : VecValue we want ot copy
145
*/
146
752
void VecValue::copyVecValue(const VecValue & other){
147
752
	p_value = other.p_value;
148
752
	p_key = other.p_key;
149
752
	p_vecChild = other.p_vecChild;
150
752
	p_type = other.p_type;
151
752
	p_indentation = other.p_indentation;
152
752
}
153
154
///Initialisation Function of class VecValue
155
345
void VecValue::initialisationVecValue(){
156
345
	p_value = "";
157
345
	p_key = "";
158
345
	p_indentation = 0lu;
159
345
}
160