Directory: | ./ |
---|---|
File: | src/Representation/PRepr.cpp |
Date: | 2025-03-14 12:14:21 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 111 | 153 | 72.5% |
Branches: | 20 | 20 | 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 | #include "PRepr.h" | ||
9 | |||
10 | ///Constructor of class PArgument | ||
11 |
3/3✓ Branch 2 taken 12 times.
✓ Branch 5 taken 12 times.
✓ Branch 8 taken 12 times.
|
12 | PArgument::PArgument(){ |
12 | |||
13 | 12 | } | |
14 | |||
15 | ///Copy Constructor of class PArgument | ||
16 | /** @param other : PArgument we want ot copy | ||
17 | */ | ||
18 |
3/3✓ Branch 2 taken 57 times.
✓ Branch 5 taken 57 times.
✓ Branch 8 taken 57 times.
|
57 | PArgument::PArgument(const PArgument & other){ |
19 |
1/1✓ Branch 1 taken 57 times.
|
57 | copyPArgument(other); |
20 | 57 | } | |
21 | |||
22 | ///Destructor of class PArgument | ||
23 | 138 | PArgument::~PArgument(){ | |
24 | |||
25 | } | ||
26 | |||
27 | ///Operator = of class PArgument | ||
28 | /** @param other : PArgument we want ot copy | ||
29 | * @return copied class PArgument | ||
30 | */ | ||
31 | ✗ | PArgument & PArgument::operator = (const PArgument & other){ | |
32 | ✗ | copyPArgument(other); | |
33 | ✗ | return *this; | |
34 | } | ||
35 | |||
36 | ///Sets the name of the PArgument | ||
37 | /** @param name : name of the PArgument | ||
38 | */ | ||
39 | 12 | void PArgument::setName(const PString & name){ | |
40 | 12 | p_name = name; | |
41 | 12 | } | |
42 | |||
43 | ///Sets the type of the PArgument | ||
44 | /** @param type : type of the PArgument | ||
45 | */ | ||
46 | 12 | void PArgument::setType(const PString & type){ | |
47 | 12 | p_type = type; | |
48 | 12 | } | |
49 | |||
50 | ///Sets the defaultValue of the PArgument | ||
51 | /** @param defaultValue : defaultValue of the PArgument | ||
52 | */ | ||
53 | 12 | void PArgument::setDefaultValue(const PString & defaultValue){ | |
54 | 12 | p_defaultValue = defaultValue; | |
55 | 12 | } | |
56 | |||
57 | ///Sets the ptrRef of the PArgument | ||
58 | /** @param ptrRef : ptrRef of the PArgument | ||
59 | */ | ||
60 | 12 | void PArgument::setPtrRef(const PString & ptrRef){ | |
61 | 12 | p_ptrRef = ptrRef; | |
62 | 12 | } | |
63 | |||
64 | ///Gets the name of the PArgument | ||
65 | /** @return name of the PArgument | ||
66 | */ | ||
67 | ✗ | const PString & PArgument::getName() const{ | |
68 | ✗ | return p_name; | |
69 | } | ||
70 | |||
71 | ///Gets the name of the PArgument | ||
72 | /** @return name of the PArgument | ||
73 | */ | ||
74 | 24 | PString & PArgument::getName(){ | |
75 | 24 | return p_name; | |
76 | } | ||
77 | |||
78 | ///Gets the type of the PArgument | ||
79 | /** @return type of the PArgument | ||
80 | */ | ||
81 | ✗ | const PString & PArgument::getType() const{ | |
82 | ✗ | return p_type; | |
83 | } | ||
84 | |||
85 | ///Gets the type of the PArgument | ||
86 | /** @return type of the PArgument | ||
87 | */ | ||
88 | 24 | PString & PArgument::getType(){ | |
89 | 24 | return p_type; | |
90 | } | ||
91 | |||
92 | ///Gets the defaultValue of the PArgument | ||
93 | /** @return defaultValue of the PArgument | ||
94 | */ | ||
95 | ✗ | const PString & PArgument::getDefaultValue() const{ | |
96 | ✗ | return p_defaultValue; | |
97 | } | ||
98 | |||
99 | ///Gets the defaultValue of the PArgument | ||
100 | /** @return defaultValue of the PArgument | ||
101 | */ | ||
102 | 12 | PString & PArgument::getDefaultValue(){ | |
103 | 12 | return p_defaultValue; | |
104 | } | ||
105 | |||
106 | ///Gets the ptrRef of the PArgument | ||
107 | /** @return ptrRef of the PArgument | ||
108 | */ | ||
109 | ✗ | const PString & PArgument::getPtrRef() const{ | |
110 | ✗ | return p_ptrRef; | |
111 | } | ||
112 | |||
113 | ///Gets the ptrRef of the PArgument | ||
114 | /** @return ptrRef of the PArgument | ||
115 | */ | ||
116 | 42 | PString & PArgument::getPtrRef(){ | |
117 | 42 | return p_ptrRef; | |
118 | } | ||
119 | |||
120 | ///Copy Function of class PArgument | ||
121 | /** @param other : PArgument we want ot copy | ||
122 | */ | ||
123 | 57 | void PArgument::copyPArgument(const PArgument & other){ | |
124 | 57 | p_name = other.p_name; | |
125 | 57 | p_type = other.p_type; | |
126 | 57 | p_defaultValue = other.p_defaultValue; | |
127 | 57 | p_ptrRef = other.p_ptrRef; | |
128 | 57 | } | |
129 | |||
130 | ///Constructor of class PFunction | ||
131 |
4/4✓ Branch 2 taken 24 times.
✓ Branch 6 taken 24 times.
✓ Branch 9 taken 24 times.
✓ Branch 12 taken 24 times.
|
24 | PFunction::PFunction(){ |
132 | |||
133 | 24 | } | |
134 | |||
135 | ///Copy Constructor of class PFunction | ||
136 | /** @param other : PFunction we want ot copy | ||
137 | */ | ||
138 |
4/4✓ Branch 2 taken 45 times.
✓ Branch 6 taken 45 times.
✓ Branch 9 taken 45 times.
✓ Branch 12 taken 45 times.
|
45 | PFunction::PFunction(const PFunction & other){ |
139 |
1/1✓ Branch 1 taken 45 times.
|
45 | copyPFunction(other); |
140 | 45 | } | |
141 | |||
142 | ///Destructor of class PFunction | ||
143 | 138 | PFunction::~PFunction(){ | |
144 | |||
145 | } | ||
146 | |||
147 | ///Operator = of class PFunction | ||
148 | /** @param other : PFunction we want ot copy | ||
149 | * @return copied class PFunction | ||
150 | */ | ||
151 | ✗ | PFunction & PFunction::operator = (const PFunction & other){ | |
152 | ✗ | copyPFunction(other); | |
153 | ✗ | return *this; | |
154 | } | ||
155 | |||
156 | ///Sets the name of the PFunction | ||
157 | /** @param name : name of the PFunction | ||
158 | */ | ||
159 | 3 | void PFunction::setName(const PString & name){ | |
160 | 3 | p_name = name; | |
161 | 3 | } | |
162 | |||
163 | ///Sets the docString of the PFunction | ||
164 | /** @param docString : docString of the PFunction | ||
165 | */ | ||
166 | 3 | void PFunction::setDocString(const PString & docString){ | |
167 | 3 | p_docString = docString; | |
168 | 3 | } | |
169 | |||
170 | ///Sets the vecArgument of the PFunction | ||
171 | /** @param vecArgument : vecArgument of the PFunction | ||
172 | */ | ||
173 | ✗ | void PFunction::setVecArgument(const std::vector<PArgument> & vecArgument){ | |
174 | ✗ | p_vecArgument = vecArgument; | |
175 | } | ||
176 | |||
177 | ///Sets the outputType of the PFunction | ||
178 | /** @param outputType : outputType of the PFunction | ||
179 | */ | ||
180 | 3 | void PFunction::setOutputType(const PString & outputType){ | |
181 | 3 | p_outputType = outputType; | |
182 | 3 | } | |
183 | |||
184 | ///Sets the templateDef of the PFunction | ||
185 | /** @param templateDef : templateDef of the PFunction | ||
186 | */ | ||
187 | ✗ | void PFunction::setTemplateDef(const PString & templateDef){ | |
188 | ✗ | p_templateDef = templateDef; | |
189 | } | ||
190 | |||
191 | ///Sets the otherCode of the PFunction | ||
192 | /** @param otherCode : otherCode of the PFunction | ||
193 | */ | ||
194 | 9 | void PFunction::setOtherCode(const PString & otherCode){ | |
195 | 9 | p_otherCode = otherCode; | |
196 | 9 | } | |
197 | |||
198 | ///Gets the name of the PFunction | ||
199 | /** @return name of the PFunction | ||
200 | */ | ||
201 | ✗ | const PString & PFunction::getName() const{ | |
202 | ✗ | return p_name; | |
203 | } | ||
204 | |||
205 | ///Gets the name of the PFunction | ||
206 | /** @return name of the PFunction | ||
207 | */ | ||
208 | 30 | PString & PFunction::getName(){ | |
209 | 30 | return p_name; | |
210 | } | ||
211 | |||
212 | ///Gets the docString of the PFunction | ||
213 | /** @return docString of the PFunction | ||
214 | */ | ||
215 | ✗ | const PString & PFunction::getDocString() const{ | |
216 | ✗ | return p_docString; | |
217 | } | ||
218 | |||
219 | ///Gets the docString of the PFunction | ||
220 | /** @return docString of the PFunction | ||
221 | */ | ||
222 | 3 | PString & PFunction::getDocString(){ | |
223 | 3 | return p_docString; | |
224 | } | ||
225 | |||
226 | ///Gets the vecArgument of the PFunction | ||
227 | /** @return vecArgument of the PFunction | ||
228 | */ | ||
229 | ✗ | const std::vector<PArgument> & PFunction::getVecArgument() const{ | |
230 | ✗ | return p_vecArgument; | |
231 | } | ||
232 | |||
233 | ///Gets the vecArgument of the PFunction | ||
234 | /** @return vecArgument of the PFunction | ||
235 | */ | ||
236 | 18 | std::vector<PArgument> & PFunction::getVecArgument(){ | |
237 | 18 | return p_vecArgument; | |
238 | } | ||
239 | |||
240 | ///Gets the outputType of the PFunction | ||
241 | /** @return outputType of the PFunction | ||
242 | */ | ||
243 | ✗ | const PString & PFunction::getOutputType() const{ | |
244 | ✗ | return p_outputType; | |
245 | } | ||
246 | |||
247 | ///Gets the outputType of the PFunction | ||
248 | /** @return outputType of the PFunction | ||
249 | */ | ||
250 | 6 | PString & PFunction::getOutputType(){ | |
251 | 6 | return p_outputType; | |
252 | } | ||
253 | |||
254 | ///Gets the templateDef of the PFunction | ||
255 | /** @return templateDef of the PFunction | ||
256 | */ | ||
257 | ✗ | const PString & PFunction::getTemplateDef() const{ | |
258 | ✗ | return p_templateDef; | |
259 | } | ||
260 | |||
261 | ///Gets the templateDef of the PFunction | ||
262 | /** @return templateDef of the PFunction | ||
263 | */ | ||
264 | 3 | PString & PFunction::getTemplateDef(){ | |
265 | 3 | return p_templateDef; | |
266 | } | ||
267 | |||
268 | ///Gets the otherCode of the PFunction | ||
269 | /** @return otherCode of the PFunction | ||
270 | */ | ||
271 | 48 | const PString & PFunction::getOtherCode() const{ | |
272 | 48 | return p_otherCode; | |
273 | } | ||
274 | |||
275 | ///Gets the otherCode of the PFunction | ||
276 | /** @return otherCode of the PFunction | ||
277 | */ | ||
278 | 21 | PString & PFunction::getOtherCode(){ | |
279 | 21 | return p_otherCode; | |
280 | } | ||
281 | |||
282 | ///Copy Function of class PFunction | ||
283 | /** @param other : PFunction we want ot copy | ||
284 | */ | ||
285 | 45 | void PFunction::copyPFunction(const PFunction & other){ | |
286 | 45 | p_name = other.p_name; | |
287 | 45 | p_docString = other.p_docString; | |
288 | 45 | p_vecArgument = other.p_vecArgument; | |
289 | 45 | p_outputType = other.p_outputType; | |
290 | 45 | p_templateDef = other.p_templateDef; | |
291 | 45 | p_otherCode = other.p_otherCode; | |
292 | 45 | } | |
293 | |||
294 | ///Constructor of class PSource | ||
295 | 3 | PSource::PSource(){ | |
296 | |||
297 | 3 | } | |
298 | |||
299 | ///Copy Constructor of class PSource | ||
300 | /** @param other : PSource we want ot copy | ||
301 | */ | ||
302 | 6 | PSource::PSource(const PSource & other){ | |
303 |
1/1✓ Branch 1 taken 6 times.
|
6 | copyPSource(other); |
304 | 6 | } | |
305 | |||
306 | ///Destructor of class PSource | ||
307 | 18 | PSource::~PSource(){ | |
308 | |||
309 | } | ||
310 | |||
311 | ///Operator = of class PSource | ||
312 | /** @param other : PSource we want ot copy | ||
313 | * @return copied class PSource | ||
314 | */ | ||
315 | ✗ | PSource & PSource::operator = (const PSource & other){ | |
316 | ✗ | copyPSource(other); | |
317 | ✗ | return *this; | |
318 | } | ||
319 | |||
320 | ///Sets the name of the PSource | ||
321 | /** @param name : name of the PSource | ||
322 | */ | ||
323 | 3 | void PSource::setName(const PPath & name){ | |
324 | 3 | p_name = name; | |
325 | 3 | } | |
326 | |||
327 | ///Sets the vecFunction of the PSource | ||
328 | /** @param vecFunction : vecFunction of the PSource | ||
329 | */ | ||
330 | ✗ | void PSource::setVecFunction(const std::vector<PFunction> & vecFunction){ | |
331 | ✗ | p_vecFunction = vecFunction; | |
332 | } | ||
333 | |||
334 | ///Gets the name of the PSource | ||
335 | /** @return name of the PSource | ||
336 | */ | ||
337 | 6 | const PPath & PSource::getName() const{ | |
338 | 6 | return p_name; | |
339 | } | ||
340 | |||
341 | ///Gets the name of the PSource | ||
342 | /** @return name of the PSource | ||
343 | */ | ||
344 | 15 | PPath & PSource::getName(){ | |
345 | 15 | return p_name; | |
346 | } | ||
347 | |||
348 | ///Gets the vecFunction of the PSource | ||
349 | /** @return vecFunction of the PSource | ||
350 | */ | ||
351 | ✗ | const std::vector<PFunction> & PSource::getVecFunction() const{ | |
352 | ✗ | return p_vecFunction; | |
353 | } | ||
354 | |||
355 | ///Gets the vecFunction of the PSource | ||
356 | /** @return vecFunction of the PSource | ||
357 | */ | ||
358 | 18 | std::vector<PFunction> & PSource::getVecFunction(){ | |
359 | 18 | return p_vecFunction; | |
360 | } | ||
361 | |||
362 | ///Copy Function of class PSource | ||
363 | /** @param other : PSource we want ot copy | ||
364 | */ | ||
365 | 6 | void PSource::copyPSource(const PSource & other){ | |
366 | 6 | p_name = other.p_name; | |
367 | 6 | p_vecFunction = other.p_vecFunction; | |
368 | 6 | } | |
369 | |||
370 | ///Constructor of class PArchLib | ||
371 |
1/1✓ Branch 2 taken 22 times.
|
22 | PArchLib::PArchLib(){ |
372 | |||
373 | 22 | } | |
374 | |||
375 | ///Copy Constructor of class PArchLib | ||
376 | /** @param other : PArchLib we want ot copy | ||
377 | */ | ||
378 |
1/1✓ Branch 2 taken 43 times.
|
43 | PArchLib::PArchLib(const PArchLib & other){ |
379 |
1/1✓ Branch 1 taken 43 times.
|
43 | copyPArchLib(other); |
380 | 43 | } | |
381 | |||
382 | ///Destructor of class PArchLib | ||
383 | 130 | PArchLib::~PArchLib(){ | |
384 | |||
385 | } | ||
386 | |||
387 | ///Operator = of class PArchLib | ||
388 | /** @param other : PArchLib we want ot copy | ||
389 | * @return copied class PArchLib | ||
390 | */ | ||
391 | ✗ | PArchLib & PArchLib::operator = (const PArchLib & other){ | |
392 | ✗ | copyPArchLib(other); | |
393 | ✗ | return *this; | |
394 | } | ||
395 | |||
396 | ///Sets the name of the PArchLib | ||
397 | /** @param name : name of the PArchLib | ||
398 | */ | ||
399 | 22 | void PArchLib::setName(const PPath & name){ | |
400 | 22 | p_name = name; | |
401 | 22 | } | |
402 | |||
403 | ///Sets the architecture of the PArchLib | ||
404 | /** @param architecture : architecture of the PArchLib | ||
405 | */ | ||
406 | 22 | void PArchLib::setArchitecture(const PString & architecture){ | |
407 | 22 | p_architecture = architecture; | |
408 | 22 | } | |
409 | |||
410 | ///Gets the name of the PArchLib | ||
411 | /** @return name of the PArchLib | ||
412 | */ | ||
413 | 28 | const PPath & PArchLib::getName() const{ | |
414 | 28 | return p_name; | |
415 | } | ||
416 | |||
417 | ///Gets the name of the PArchLib | ||
418 | /** @return name of the PArchLib | ||
419 | */ | ||
420 | ✗ | PPath & PArchLib::getName(){ | |
421 | ✗ | return p_name; | |
422 | } | ||
423 | |||
424 | ///Gets the architecture of the PArchLib | ||
425 | /** @return architecture of the PArchLib | ||
426 | */ | ||
427 | 22 | const PString & PArchLib::getArchitecture() const{ | |
428 | 22 | return p_architecture; | |
429 | } | ||
430 | |||
431 | ///Gets the architecture of the PArchLib | ||
432 | /** @return architecture of the PArchLib | ||
433 | */ | ||
434 | ✗ | PString & PArchLib::getArchitecture(){ | |
435 | ✗ | return p_architecture; | |
436 | } | ||
437 | |||
438 | ///Copy Function of class PArchLib | ||
439 | /** @param other : PArchLib we want ot copy | ||
440 | */ | ||
441 | 43 | void PArchLib::copyPArchLib(const PArchLib & other){ | |
442 | 43 | p_name = other.p_name; | |
443 | 43 | p_architecture = other.p_architecture; | |
444 | 43 | } | |
445 | |||
446 |