GCC Code Coverage Report


Directory: ./
File: tmp_project/PhoenixPresentation/tmp_project/PhoenixInkscape/tmp_project/PhoenixXml/src/PXml.cpp
Date: 2025-03-24 18:12:43
Exec Total Coverage
Lines: 98 98 100.0%
Branches: 10 10 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 //You should not modify this file
10
11 // You can print the configuration of the data format on saved files with :
12 // sed '/ENDOFCONFIG/q' fileName
13
14 #include "PXml.h"
15
16
17 /***********************************************************************
18 * *
19 * Public functions of class PXmlAttr *
20 * *
21 ************************************************************************/
22
23
24 ///Constructor of the class PXmlAttr
25
1/1
✓ Branch 2 taken 969706 times.
969706 PXmlAttr::PXmlAttr(){
26
1/1
✓ Branch 1 taken 969706 times.
969706 initialisationPXmlAttr();
27 969706 }
28
29 ///Copy constructor of the class PXmlAttr
30 /** @param other : other variable
31 */
32
1/1
✓ Branch 2 taken 4207202 times.
4207202 PXmlAttr::PXmlAttr(const PXmlAttr & other){
33
1/1
✓ Branch 1 taken 4207202 times.
4207202 initialisationPXmlAttr();
34
1/1
✓ Branch 1 taken 4207202 times.
4207202 copyPXmlAttr(other);
35 4207202 }
36
37 ///Destructor of the class PXmlAttr
38 10353816 PXmlAttr::~PXmlAttr(){
39
40 }
41
42 ///Equal operator of the class PXmlAttr
43 /** @param other : other variable
44 * @return copied Attribute from xml
45 */
46 413932 PXmlAttr & PXmlAttr::operator =(const PXmlAttr & other){
47 413932 copyPXmlAttr(other);
48 413932 return *this;
49 }
50
51 ///Set the variable p_name, of type 'PString'
52 /** @param name : Name of the attribute
53 */
54 414594 void PXmlAttr::setName(const PString & name){
55 414594 p_name = name;
56 414594 }
57
58 ///Set the variable p_value, of type 'PString'
59 /** @param value : Value of the attribute
60 */
61 414654 void PXmlAttr::setValue(const PString & value){
62 414654 p_value = value;
63 414654 }
64
65 ///Get the variable p_name
66 /** @return Name of the attribute
67 */
68 670303 const PString & PXmlAttr::getName() const{
69 670303 return p_name;
70 }
71
72 ///Get the variable p_name
73 /** @return Name of the attribute
74 */
75 243 PString & PXmlAttr::getName(){
76 243 return p_name;
77 }
78
79 ///Get the variable p_value
80 /** @return Value of the attribute
81 */
82 194165 const PString & PXmlAttr::getValue() const{
83 194165 return p_value;
84 }
85
86 ///Get the variable p_value
87 /** @return Value of the attribute
88 */
89 392745 PString & PXmlAttr::getValue(){
90 392745 return p_value;
91 }
92
93 /***********************************************************************
94 * *
95 * Private functions of class PXmlAttr *
96 * *
97 ************************************************************************/
98
99
100 ///Initialisation function of the class PXmlAttr
101 5176908 void PXmlAttr::initialisationPXmlAttr(){
102 5176908 p_flag = 0lu;
103
104 5176908 }
105
106 ///Copy function of the class PXmlAttr
107 /** @param other : other variable
108 */
109 4621134 void PXmlAttr::copyPXmlAttr(const PXmlAttr & other){
110 4621134 p_name = other.p_name;
111 4621134 p_value = other.p_value;
112
113 4621134 }
114
115 /***********************************************************************
116 * *
117 * Public functions of class PXml *
118 * *
119 ************************************************************************/
120
121
122 ///Constructor of the class PXml
123
1/1
✓ Branch 2 taken 7858558 times.
7858558 PXml::PXml(){
124
1/1
✓ Branch 1 taken 7858558 times.
7858558 initialisationPXml();
125 7858558 }
126
127 ///Copy constructor of the class PXml
128 /** @param other : other variable
129 */
130
1/1
✓ Branch 2 taken 75467010 times.
75467010 PXml::PXml(const PXml & other){
131
1/1
✓ Branch 1 taken 75467010 times.
75467010 initialisationPXml();
132
1/1
✓ Branch 1 taken 75467010 times.
75467010 copyPXml(other);
133 75467010 }
134
135 ///Destructor of the class PXml
136 166651136 PXml::~PXml(){
137
138 }
139
140 ///Equal operator of the class PXml
141 /** @param other : other variable
142 * @return copied @brief Class used to parse xml
143 */
144 430966 PXml & PXml::operator =(const PXml & other){
145 430966 copyPXml(other);
146 430966 return *this;
147 }
148
149 ///Set the variable p_name, of type 'PString'
150 /** @param name : Name of the class
151 */
152 2970612 void PXml::setName(const PString & name){
153 2970612 p_name = name;
154 2970612 }
155
156 ///Set the variable p_isCompact, of type 'bool'
157 /** @param isCompact : Say if the balise is compact or not
158 */
159 2930691 void PXml::setIsCompact(bool isCompact){
160 2930691 p_isCompact = isCompact;
161 2930691 }
162
163 ///Set the variable p_value, of type 'PString'
164 /** @param value : Value between the <b>chevron</b>
165 */
166 5894333 void PXml::setValue(const PString & value){
167 5894333 p_value = value;
168 5894333 }
169
170 ///Set the variable p_isText, of type 'bool'
171 /** @param isText : Say if the balise contains text only
172 */
173 2957219 void PXml::setIsText(bool isText){
174 2957219 p_isText = isText;
175 2957219 }
176
177 ///Set the variable p_vecAttr, of type 'std ::vector<PXmlAttr>'
178 /** @param vecAttr : Vector of attribute
179 */
180 4 void PXml::setVecAttr(const std ::vector<PXmlAttr> & vecAttr){
181 4 p_vecAttr = vecAttr;
182 4 }
183
184 ///Set the variable p_vecChild, of type 'std ::vector<PXml>'
185 /** @param vecChild : Child of the current PXml
186 */
187 1 void PXml::setVecChild(const std ::vector<PXml> & vecChild){
188 1 p_vecChild = vecChild;
189 1 }
190
191 ///Get the variable p_name
192 /** @return Name of the class
193 */
194 34630961 const PString & PXml::getName() const{
195 34630961 return p_name;
196 }
197
198 ///Get the variable p_name
199 /** @return Name of the class
200 */
201 3302865 PString & PXml::getName(){
202 3302865 return p_name;
203 }
204
205 ///Get the variable p_isCompact
206 /** @return Say if the balise is compact or not
207 */
208 43740 bool PXml::getIsCompact() const{
209 43740 return p_isCompact;
210 }
211
212 ///Get the variable p_isCompact
213 /** @return Say if the balise is compact or not
214 */
215 2930691 bool & PXml::getIsCompact(){
216 2930691 return p_isCompact;
217 }
218
219 ///Get the variable p_value
220 /** @return Value between the <b>chevron</b>
221 */
222 2669973 const PString & PXml::getValue() const{
223 2669973 return p_value;
224 }
225
226 ///Get the variable p_value
227 /** @return Value between the <b>chevron</b>
228 */
229 8303418 PString & PXml::getValue(){
230 8303418 return p_value;
231 }
232
233 ///Get the variable p_isText
234 /** @return Say if the balise contains text only
235 */
236 89193 bool PXml::getIsText() const{
237 89193 return p_isText;
238 }
239
240 ///Get the variable p_isText
241 /** @return Say if the balise contains text only
242 */
243 1 bool & PXml::getIsText(){
244 1 return p_isText;
245 }
246
247 ///Get the variable p_vecAttr
248 /** @return Vector of attribute
249 */
250 598853 const std ::vector<PXmlAttr> & PXml::getVecAttr() const{
251 598853 return p_vecAttr;
252 }
253
254 ///Get the variable p_vecAttr
255 /** @return Vector of attribute
256 */
257 414658 std ::vector<PXmlAttr> & PXml::getVecAttr(){
258 414658 return p_vecAttr;
259 }
260
261 ///Get the variable p_vecChild
262 /** @return Child of the current PXml
263 */
264 4987901 const std ::vector<PXml> & PXml::getVecChild() const{
265 4987901 return p_vecChild;
266 }
267
268 ///Get the variable p_vecChild
269 /** @return Child of the current PXml
270 */
271 12456679 std ::vector<PXml> & PXml::getVecChild(){
272 12456679 return p_vecChild;
273 }
274
275 /***********************************************************************
276 * *
277 * Private functions of class PXml *
278 * *
279 ************************************************************************/
280
281
282 ///Initialisation function of the class PXml
283 83325568 void PXml::initialisationPXml(){
284 83325568 p_flag = 0lu;
285 ///Say if the balise is compact or not
286 83325568 p_isCompact = 0;
287 ///Say if the balise contains text only
288 83325568 p_isText = 0;
289
290 83325568 }
291
292 ///Copy function of the class PXml
293 /** @param other : other variable
294 */
295 75897976 void PXml::copyPXml(const PXml & other){
296 75897976 p_name = other.p_name;
297 75897976 p_isCompact = other.p_isCompact;
298 75897976 p_value = other.p_value;
299 75897976 p_isText = other.p_isText;
300 75897976 p_vecAttr = other.p_vecAttr;
301 75897976 p_vecChild = other.p_vecChild;
302
303 75897976 }
304
305
306
307