GCC Code Coverage Report


Directory: ./
File: src/Representation/PClassAttribute.cpp
Date: 2026-10-16 17:52:29
Exec Total Coverage
Lines: 50 78 64.1%
Functions: 15 28 53.6%
Branches: 8 8 100.0%

Line Branch Exec Source
1 /***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : LGPL-3.0-only
5 ****************************************/
6
7
8 #include "PClassAttribute.h"
9
10 ///Constructor of class PClassAttribute
11
3/3
✓ Branch 0 (3→4) taken 43 times.
✓ Branch 2 (4→5) taken 43 times.
✓ Branch 4 (5→6) taken 43 times.
43 PClassAttribute::PClassAttribute(){
12
1/1
✓ Branch 0 (6→7) taken 43 times.
43 initialisationPClassAttribute();
13 43 }
14
15 ///Copy Constructor of class PClassAttribute
16 /** @param other : PClassAttribute we want ot copy
17 */
18
3/3
✓ Branch 0 (3→4) taken 224 times.
✓ Branch 2 (4→5) taken 224 times.
✓ Branch 4 (5→6) taken 224 times.
224 PClassAttribute::PClassAttribute(const PClassAttribute & other){
19
1/1
✓ Branch 0 (6→7) taken 224 times.
224 copyPClassAttribute(other);
20 224 }
21
22 ///Destructor of class PClassAttribute
23 267 PClassAttribute::~PClassAttribute(){
24
25 267 }
26
27 ///Operator = of class PClassAttribute
28 /** @param other : PClassAttribute we want ot copy
29 * @return copied class PClassAttribute
30 */
31 ✗ PClassAttribute & PClassAttribute::operator = (const PClassAttribute & other){
32 ✗ copyPClassAttribute(other);
33 ✗ return *this;
34 }
35
36 ///Sets the type of the PClassAttribute
37 /** @param type : type of the PClassAttribute
38 */
39 54 void PClassAttribute::setType(const PString & type){
40 54 p_type = type;
41 54 }
42
43 ///Sets the name of the PClassAttribute
44 /** @param name : name of the PClassAttribute
45 */
46 43 void PClassAttribute::setName(const PString & name){
47 43 p_name = name;
48 43 }
49
50 ///Sets the defaultValue of the PClassAttribute
51 /** @param defaultValue : defaultValue of the PClassAttribute
52 */
53 12 void PClassAttribute::setDefaultValue(const PString & defaultValue){
54 12 p_defaultValue = defaultValue;
55 12 }
56
57 ///Sets the isPointer of the PClassAttribute
58 /** @param isPointer : isPointer of the PClassAttribute
59 */
60 ✗ void PClassAttribute::setIsPointer(bool isPointer){
61 ✗ p_isPointer = isPointer;
62 ✗ }
63
64 ///Sets the isReference of the PClassAttribute
65 /** @param isReference : isReference of the PClassAttribute
66 */
67 ✗ void PClassAttribute::setIsReference(bool isReference){
68 ✗ p_isReference = isReference;
69 ✗ }
70
71 ///Sets the documentation of the PClassAttribute
72 /** @param documentation : documentation of the PClassAttribute
73 */
74 43 void PClassAttribute::setDocumentation(const PString & documentation){
75 43 p_documentation = documentation;
76 43 }
77
78 ///Sets the isEnum of the PClassAttribute
79 /** @param isEnum : isEnum of the PClassAttribute
80 */
81 ✗ void PClassAttribute::setIsEnum(bool isEnum){
82 ✗ p_isEnum = isEnum;
83 ✗ }
84
85 ///Gets the type of the PClassAttribute
86 /** @return type of the PClassAttribute
87 */
88 670 const PString & PClassAttribute::getType() const{
89 670 return p_type;
90 }
91
92 ///Gets the type of the PClassAttribute
93 /** @return type of the PClassAttribute
94 */
95 11 PString & PClassAttribute::getType(){
96 11 return p_type;
97 }
98
99 ///Gets the name of the PClassAttribute
100 /** @return name of the PClassAttribute
101 */
102 769 const PString & PClassAttribute::getName() const{
103 769 return p_name;
104 }
105
106 ///Gets the name of the PClassAttribute
107 /** @return name of the PClassAttribute
108 */
109 ✗ PString & PClassAttribute::getName(){
110 ✗ return p_name;
111 }
112
113 ///Gets the defaultValue of the PClassAttribute
114 /** @return defaultValue of the PClassAttribute
115 */
116 42 const PString & PClassAttribute::getDefaultValue() const{
117 42 return p_defaultValue;
118 }
119
120 ///Gets the defaultValue of the PClassAttribute
121 /** @return defaultValue of the PClassAttribute
122 */
123 ✗ PString & PClassAttribute::getDefaultValue(){
124 ✗ return p_defaultValue;
125 }
126
127 ///Gets the isPointer of the PClassAttribute
128 /** @return isPointer of the PClassAttribute
129 */
130 29 bool PClassAttribute::getIsPointer() const{
131 29 return p_isPointer;
132 }
133
134 ///Gets the isPointer of the PClassAttribute
135 /** @return isPointer of the PClassAttribute
136 */
137 ✗ bool & PClassAttribute::getIsPointer(){
138 ✗ return p_isPointer;
139 }
140
141 ///Gets the isReference of the PClassAttribute
142 /** @return isReference of the PClassAttribute
143 */
144 ✗ bool PClassAttribute::getIsReference() const{
145 ✗ return p_isReference;
146 }
147
148 ///Gets the isReference of the PClassAttribute
149 /** @return isReference of the PClassAttribute
150 */
151 ✗ bool & PClassAttribute::getIsReference(){
152 ✗ return p_isReference;
153 }
154
155 ///Gets the documentation of the PClassAttribute
156 /** @return documentation of the PClassAttribute
157 */
158 72 const PString & PClassAttribute::getDocumentation() const{
159 72 return p_documentation;
160 }
161
162 ///Gets the documentation of the PClassAttribute
163 /** @return documentation of the PClassAttribute
164 */
165 ✗ PString & PClassAttribute::getDocumentation(){
166 ✗ return p_documentation;
167 }
168
169 ///Gets the isEnum of the PClassAttribute
170 /** @return isEnum of the PClassAttribute
171 */
172 ✗ bool PClassAttribute::getIsEnum() const{
173 ✗ return p_isEnum;
174 }
175
176 ///Gets the isEnum of the PClassAttribute
177 /** @return isEnum of the PClassAttribute
178 */
179 ✗ bool & PClassAttribute::getIsEnum(){
180 ✗ return p_isEnum;
181 }
182
183 ///Copy Function of class PClassAttribute
184 /** @param other : PClassAttribute we want ot copy
185 */
186 224 void PClassAttribute::copyPClassAttribute(const PClassAttribute & other){
187 224 p_type = other.p_type;
188 224 p_name = other.p_name;
189 224 p_defaultValue = other.p_defaultValue;
190 224 p_isPointer = other.p_isPointer;
191 224 p_isReference = other.p_isReference;
192 224 p_documentation = other.p_documentation;
193 224 p_isEnum = other.p_isEnum;
194 224 }
195
196 ///Initialisation Function of class PClassAttribute
197 43 void PClassAttribute::initialisationPClassAttribute(){
198 43 p_type = "";
199 43 p_name = "";
200 43 p_defaultValue = "";
201 43 p_isPointer = false;
202 43 p_isReference = false;
203 43 p_documentation = "";
204 43 p_isEnum = false;
205 43 }
206
207