GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: src/PFunc/PFunc.cpp Lines: 94 119 79.0 %
Date: 2024-09-10 03:06:26 Branches: 3 3 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 "PFunc.h"
15
16
17
/***********************************************************************
18
*                                                                      *
19
*                    Public functions of class PArg                    *
20
*                                                                      *
21
************************************************************************/
22
23
24
///Constructor of the class PArg
25
6262
PArg::PArg(){
26
6262
	initialisationPArg();
27
6262
}
28
29
///Copy constructor of the class PArg
30
/**	@param other : other variable
31
*/
32
45157
PArg::PArg(const PArg & other){
33
45157
	initialisationPArg();
34
45157
	copyPArg(other);
35
45157
}
36
37
///Destructor of the class PArg
38
102838
PArg::~PArg(){
39
40
}
41
42
///Equal operator of the class PArg
43
/**	@param other : other variable
44
 * 	@return copied @brief Simple function argument
45
*/
46
PArg & PArg::operator =(const PArg & other){
47
	copyPArg(other);
48
	return *this;
49
}
50
51
///Set the variable p_type, of type 'std ::string'
52
/**	@param type : Type of the argument
53
*/
54
6262
void PArg::setType(const std ::string & type){
55
6262
	p_type = type;
56
6262
}
57
58
///Set the variable p_name, of type 'std ::string'
59
/**	@param name : Name of the argument
60
*/
61
6262
void PArg::setName(const std ::string & name){
62
6262
	p_name = name;
63
6262
}
64
65
///Get the variable p_type
66
/**	@return Type of the argument
67
*/
68
6262
const std ::string & PArg::getType() const{
69
6262
	return p_type;
70
}
71
72
///Get the variable p_type
73
/**	@return Type of the argument
74
*/
75
std ::string & PArg::getType(){
76
	return p_type;
77
}
78
79
///Get the variable p_name
80
/**	@return Name of the argument
81
*/
82
12524
const std ::string & PArg::getName() const{
83
12524
	return p_name;
84
}
85
86
///Get the variable p_name
87
/**	@return Name of the argument
88
*/
89
std ::string & PArg::getName(){
90
	return p_name;
91
}
92
93
/***********************************************************************
94
*                                                                      *
95
*                   Private functions of class PArg                    *
96
*                                                                      *
97
************************************************************************/
98
99
100
///Initialisation function of the class PArg
101
51419
void PArg::initialisationPArg(){
102
51419
	p_flag = 0lu;
103
104
51419
}
105
106
///Copy function of the class PArg
107
/**	@param other : other variable
108
*/
109
45157
void PArg::copyPArg(const PArg & other){
110
45157
	p_type = other.p_type;
111
45157
	p_name = other.p_name;
112
113
45157
}
114
115
/***********************************************************************
116
*                                                                      *
117
*                   Public functions of class PFunc                    *
118
*                                                                      *
119
************************************************************************/
120
121
122
///Constructor of the class PFunc
123
3250
PFunc::PFunc(){
124
3250
	initialisationPFunc();
125
3250
}
126
127
///Copy constructor of the class PFunc
128
/**	@param other : other variable
129
*/
130
17636
PFunc::PFunc(const PFunc & other){
131
17636
	initialisationPFunc();
132
17636
	copyPFunc(other);
133
17636
}
134
135
///Destructor of the class PFunc
136
41772
PFunc::~PFunc(){
137
138
}
139
140
///Equal operator of the class PFunc
141
/**	@param other : other variable
142
 * 	@return copied @brief Simple function definition
143
*/
144
PFunc & PFunc::operator =(const PFunc & other){
145
	copyPFunc(other);
146
	return *this;
147
}
148
149
///Set the variable p_returnType, of type 'std ::string'
150
/**	@param returnType : Type returned by the function
151
*/
152
2204
void PFunc::setReturnType(const std ::string & returnType){
153
2204
	p_returnType = returnType;
154
2204
}
155
156
///Set the variable p_name, of type 'std ::string'
157
/**	@param name : Name of the function
158
*/
159
2204
void PFunc::setName(const std ::string & name){
160
2204
	p_name = name;
161
2204
}
162
163
///Set the variable p_vecArg, of type 'std ::vector<PArg>'
164
/**	@param vecArg : Vector of argument
165
*/
166
void PFunc::setVecArg(const std ::vector<PArg> & vecArg){
167
	p_vecArg = vecArg;
168
}
169
170
///Set the variable p_noReplace, of type 'bool'
171
/**	@param noReplace : True to disable the replace in the plib_ function creation
172
*/
173
2252
void PFunc::setNoReplace(bool noReplace){
174
2252
	p_noReplace = noReplace;
175
2252
}
176
177
///Set the variable p_macro, of type 'std ::string'
178
/**	@param macro : parsed macro
179
*/
180
1046
void PFunc::setMacro(const std ::string & macro){
181
1046
	p_macro = macro;
182
1046
}
183
184
///Get the variable p_returnType
185
/**	@return Type returned by the function
186
*/
187
2204
const std ::string & PFunc::getReturnType() const{
188
2204
	return p_returnType;
189
}
190
191
///Get the variable p_returnType
192
/**	@return Type returned by the function
193
*/
194
std ::string & PFunc::getReturnType(){
195
	return p_returnType;
196
}
197
198
///Get the variable p_name
199
/**	@return Name of the function
200
*/
201
2204
const std ::string & PFunc::getName() const{
202
2204
	return p_name;
203
}
204
205
///Get the variable p_name
206
/**	@return Name of the function
207
*/
208
3250
std ::string & PFunc::getName(){
209
3250
	return p_name;
210
}
211
212
///Get the variable p_vecArg
213
/**	@return Vector of argument
214
*/
215
2204
const std ::vector<PArg> & PFunc::getVecArg() const{
216
2204
	return p_vecArg;
217
}
218
219
///Get the variable p_vecArg
220
/**	@return Vector of argument
221
*/
222
6262
std ::vector<PArg> & PFunc::getVecArg(){
223
6262
	return p_vecArg;
224
}
225
226
///Get the variable p_noReplace
227
/**	@return True to disable the replace in the plib_ function creation
228
*/
229
2204
bool PFunc::getNoReplace() const{
230
2204
	return p_noReplace;
231
}
232
233
///Get the variable p_noReplace
234
/**	@return True to disable the replace in the plib_ function creation
235
*/
236
bool & PFunc::getNoReplace(){
237
	return p_noReplace;
238
}
239
240
///Get the variable p_macro
241
/**	@return parsed macro
242
*/
243
4296
const std ::string & PFunc::getMacro() const{
244
4296
	return p_macro;
245
}
246
247
///Get the variable p_macro
248
/**	@return parsed macro
249
*/
250
std ::string & PFunc::getMacro(){
251
	return p_macro;
252
}
253
254
/***********************************************************************
255
*                                                                      *
256
*                   Private functions of class PFunc                   *
257
*                                                                      *
258
************************************************************************/
259
260
261
///Initialisation function of the class PFunc
262
20886
void PFunc::initialisationPFunc(){
263
20886
	p_flag = 0lu;
264
	///True to disable the replace in the plib_ function creation
265
20886
	p_noReplace = 0;
266
267
20886
}
268
269
///Copy function of the class PFunc
270
/**	@param other : other variable
271
*/
272
17636
void PFunc::copyPFunc(const PFunc & other){
273
17636
	p_returnType = other.p_returnType;
274
17636
	p_name = other.p_name;
275
17636
	p_vecArg = other.p_vecArg;
276
17636
	p_noReplace = other.p_noReplace;
277
17636
	p_macro = other.p_macro;
278
279
17636
}
280
281
/***********************************************************************
282
*                                                                      *
283
*                  Public functions of class PHeader                   *
284
*                                                                      *
285
************************************************************************/
286
287
288
///Constructor of the class PHeader
289
6
PHeader::PHeader(){
290
6
	initialisationPHeader();
291
6
}
292
293
///Copy constructor of the class PHeader
294
/**	@param other : other variable
295
*/
296
17
PHeader::PHeader(const PHeader & other){
297
17
	initialisationPHeader();
298
17
	copyPHeader(other);
299
17
}
300
301
///Destructor of the class PHeader
302
46
PHeader::~PHeader(){
303
304
}
305
306
///Equal operator of the class PHeader
307
/**	@param other : other variable
308
 * 	@return copied @brief Describes a header of files
309
*/
310
PHeader & PHeader::operator =(const PHeader & other){
311
	copyPHeader(other);
312
	return *this;
313
}
314
315
///Set the variable p_name, of type 'std ::string'
316
/**	@param name : Name of the header file
317
*/
318
6
void PHeader::setName(const std ::string & name){
319
6
	p_name = name;
320
6
}
321
322
///Set the variable p_vecFunc, of type 'std ::vector<PFunc>'
323
/**	@param vecFunc : vector of functions
324
*/
325
void PHeader::setVecFunc(const std ::vector<PFunc> & vecFunc){
326
	p_vecFunc = vecFunc;
327
}
328
329
///Get the variable p_name
330
/**	@return Name of the header file
331
*/
332
15
const std ::string & PHeader::getName() const{
333
15
	return p_name;
334
}
335
336
///Get the variable p_name
337
/**	@return Name of the header file
338
*/
339
std ::string & PHeader::getName(){
340
	return p_name;
341
}
342
343
///Get the variable p_vecFunc
344
/**	@return vector of functions
345
*/
346
5
const std ::vector<PFunc> & PHeader::getVecFunc() const{
347
5
	return p_vecFunc;
348
}
349
350
///Get the variable p_vecFunc
351
/**	@return vector of functions
352
*/
353
11
std ::vector<PFunc> & PHeader::getVecFunc(){
354
11
	return p_vecFunc;
355
}
356
357
/***********************************************************************
358
*                                                                      *
359
*                  Private functions of class PHeader                  *
360
*                                                                      *
361
************************************************************************/
362
363
364
///Initialisation function of the class PHeader
365
23
void PHeader::initialisationPHeader(){
366
23
	p_flag = 0lu;
367
368
23
}
369
370
///Copy function of the class PHeader
371
/**	@param other : other variable
372
*/
373
17
void PHeader::copyPHeader(const PHeader & other){
374
17
	p_name = other.p_name;
375
17
	p_vecFunc = other.p_vecFunc;
376
377
17
}
378
379
380