GCC Code Coverage Report


Directory: ./
File: src/VecValue.cpp
Date: 2025-09-09 12:32:24
Exec Total Coverage
Lines: 48 58 82.8%
Functions: 17 22 77.3%
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 0 (3→4) taken 135 times.
135 VecValue::VecValue(){
14
1/1
✓ Branch 0 (5→6) taken 135 times.
135 initialisationVecValue();
15 135 }
16
17 ///Copy Constructor of class VecValue
18 /** @param other : VecValue we want ot copy
19 */
20
1/1
✓ Branch 0 (3→4) taken 287 times.
287 VecValue::VecValue(const VecValue & other){
21
1/1
✓ Branch 0 (5→6) taken 287 times.
287 copyVecValue(other);
22 287 }
23
24 ///Destructor of class VecValue
25 422 VecValue::~VecValue(){
26
27 422 }
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 88 void VecValue::setValue(const PString & value){
42 88 p_value = value;
43 88 }
44
45 ///Sets the key of the VecValue
46 /** @param key : key of the VecValue
47 */
48 113 void VecValue::setKey(const PString & key){
49 113 p_key = key;
50 113 }
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 150 void VecValue::setType(const VecValueType::VecValueType & type){
63 150 p_type = type;
64 150 }
65
66 ///Sets the indentation of the VecValue
67 /** @param indentation : indentation of the VecValue
68 */
69 122 void VecValue::setIndentation(size_t indentation){
70 122 p_indentation = indentation;
71 122 }
72
73 ///Gets the value of the VecValue
74 /** @return value of the VecValue
75 */
76 88 const PString & VecValue::getValue() const{
77 88 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 165 const PString & VecValue::getKey() const{
91 165 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 135 const std::vector<VecValue> & VecValue::getVecChild() const{
105 135 return p_vecChild;
106 }
107
108 ///Gets the vecChild of the VecValue
109 /** @return vecChild of the VecValue
110 */
111 534 std::vector<VecValue> & VecValue::getVecChild(){
112 534 return p_vecChild;
113 }
114
115 ///Gets the type of the VecValue
116 /** @return type of the VecValue
117 */
118 34 const VecValueType::VecValueType & VecValue::getType() const{
119 34 return p_type;
120 }
121
122 ///Gets the type of the VecValue
123 /** @return type of the VecValue
124 */
125 72 VecValueType::VecValueType & VecValue::getType(){
126 72 return p_type;
127 }
128
129 ///Gets the indentation of the VecValue
130 /** @return indentation of the VecValue
131 */
132 22 size_t VecValue::getIndentation() const{
133 22 return p_indentation;
134 }
135
136 ///Gets the indentation of the VecValue
137 /** @return indentation of the VecValue
138 */
139 34 size_t & VecValue::getIndentation(){
140 34 return p_indentation;
141 }
142
143 ///Copy Function of class VecValue
144 /** @param other : VecValue we want ot copy
145 */
146 287 void VecValue::copyVecValue(const VecValue & other){
147 287 p_value = other.p_value;
148 287 p_key = other.p_key;
149 287 p_vecChild = other.p_vecChild;
150 287 p_type = other.p_type;
151 287 p_indentation = other.p_indentation;
152 287 }
153
154 ///Initialisation Function of class VecValue
155 135 void VecValue::initialisationVecValue(){
156 135 p_value = "";
157 135 p_key = "";
158 135 p_indentation = 0lu;
159 135 }
160
161