GCC Code Coverage Report


Directory: ./
File: tmp_project/PhoenixYml/src/VecValue.cpp
Date: 2025-03-27 14:50:11
Exec Total Coverage
Lines: 47 56 83.9%
Branches: 4 4 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
1/1
✓ Branch 2 taken 185 times.
185 VecValue::VecValue(){
14
1/1
✓ Branch 1 taken 185 times.
185 initialisationVecValue();
15 185 }
16
17 ///Copy Constructor of class VecValue
18 /** @param other : VecValue we want ot copy
19 */
20
1/1
✓ Branch 2 taken 398 times.
398 VecValue::VecValue(const VecValue & other){
21
1/1
✓ Branch 1 taken 398 times.
398 copyVecValue(other);
22 398 }
23
24 ///Destructor of class VecValue
25 1166 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 126 void VecValue::setValue(const PString & value){
42 126 p_value = value;
43 126 }
44
45 ///Sets the key of the VecValue
46 /** @param key : key of the VecValue
47 */
48 160 void VecValue::setKey(const PString & key){
49 160 p_key = key;
50 160 }
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 226 void VecValue::setType(const VecValueType::VecValueType & type){
63 226 p_type = type;
64 226 }
65
66 ///Sets the indentation of the VecValue
67 /** @param indentation : indentation of the VecValue
68 */
69 172 void VecValue::setIndentation(size_t indentation){
70 172 p_indentation = indentation;
71 172 }
72
73 ///Gets the value of the VecValue
74 /** @return value of the VecValue
75 */
76 126 const PString & VecValue::getValue() const{
77 126 return p_value;
78 }
79
80 ///Gets the value of the VecValue
81 /** @return value of the VecValue
82 */
83 PString & VecValue::getValue(){
84 return p_value;
85 }
86
87 ///Gets the key of the VecValue
88 /** @return key of the VecValue
89 */
90 218 const PString & VecValue::getKey() const{
91 218 return p_key;
92 }
93
94 ///Gets the key of the VecValue
95 /** @return key of the VecValue
96 */
97 PString & VecValue::getKey(){
98 return p_key;
99 }
100
101 ///Gets the vecChild of the VecValue
102 /** @return vecChild of the VecValue
103 */
104 185 const std::vector<VecValue> & VecValue::getVecChild() const{
105 185 return p_vecChild;
106 }
107
108 ///Gets the vecChild of the VecValue
109 /** @return vecChild of the VecValue
110 */
111 775 std::vector<VecValue> & VecValue::getVecChild(){
112 775 return p_vecChild;
113 }
114
115 ///Gets the type of the VecValue
116 /** @return type of the VecValue
117 */
118 43 const VecValueType::VecValueType & VecValue::getType() const{
119 43 return p_type;
120 }
121
122 ///Gets the type of the VecValue
123 /** @return type of the VecValue
124 */
125 87 VecValueType::VecValueType & VecValue::getType(){
126 87 return p_type;
127 }
128
129 ///Gets the indentation of the VecValue
130 /** @return indentation of the VecValue
131 */
132 28 size_t VecValue::getIndentation() const{
133 28 return p_indentation;
134 }
135
136 ///Gets the indentation of the VecValue
137 /** @return indentation of the VecValue
138 */
139 43 size_t & VecValue::getIndentation(){
140 43 return p_indentation;
141 }
142
143 ///Copy Function of class VecValue
144 /** @param other : VecValue we want ot copy
145 */
146 398 void VecValue::copyVecValue(const VecValue & other){
147 398 p_value = other.p_value;
148 398 p_key = other.p_key;
149 398 p_vecChild = other.p_vecChild;
150 398 p_type = other.p_type;
151 398 p_indentation = other.p_indentation;
152 398 }
153
154 ///Initialisation Function of class VecValue
155 185 void VecValue::initialisationVecValue(){
156 185 p_value = "";
157 185 p_key = "";
158 185 p_indentation = 0lu;
159 185 }
160
161