GCC Code Coverage Report


Directory: ./
File: src/class_attribute_utils.cpp
Date: 2025-04-25 19:10:50
Exec Total Coverage
Lines: 14 14 100.0%
Branches: 8 8 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 "class_attribute_utils.h"
9
10 ///Creates a PClassAttribute
11 /** @param type : type of the attribute
12 * @param name : name of the attribute
13 * @param documentation : documentation of the attribute
14 */
15 83 PClassAttribute createClassAttribute(const PString & type, const PString & name, const PString & documentation){
16 83 PClassAttribute attr;
17
1/1
✓ Branch 1 taken 83 times.
83 attr.setType(type);
18
1/1
✓ Branch 1 taken 83 times.
83 attr.setName(name);
19
1/1
✓ Branch 1 taken 83 times.
83 attr.setDocumentation(documentation);
20 83 return attr;
21 }
22
23 ///Create an attribute
24 /** @param typeName : type of the attribute
25 * @param name : name of the attribute
26 * @param isPointer : true if the attribute is a pointer
27 * @param isReference : true if the attribute is a reference
28 * @param documentation : documentation of the attribute
29 * @return PClassAttribute
30 */
31 10 PClassAttribute createClassAttribute(const PString & typeName, const PString & name, bool isPointer, bool isReference, const PString & documentation){
32 10 PClassAttribute attr;
33
1/1
✓ Branch 1 taken 10 times.
10 attr.setType(typeName);
34
1/1
✓ Branch 1 taken 10 times.
10 attr.setName(name);
35
1/1
✓ Branch 1 taken 10 times.
10 attr.setIsPointer(isPointer);
36
1/1
✓ Branch 1 taken 10 times.
10 attr.setIsReference(isReference);
37
1/1
✓ Branch 1 taken 10 times.
10 attr.setDocumentation(documentation);
38
39 10 return attr;
40 }
41
42
43