GCC Code Coverage Report


Directory: ./
File: src/Representation/PClassAttribute.cpp
Date: 2026-09-08 15:48:42
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 : CeCILL-C
5 ****************************************/
6
7
8 #include "PClassAttribute.h"
9
10 ///Constructor of class PClassAttribute
11
3/3
✓ Branch 0 (3→4) taken 35 times.
✓ Branch 2 (4→5) taken 35 times.
✓ Branch 4 (5→6) taken 35 times.
35 PClassAttribute::PClassAttribute(){
12
1/1
✓ Branch 0 (6→7) taken 35 times.
35 initialisationPClassAttribute();
13 35 }
14
15 ///Copy Constructor of class PClassAttribute
16 /** @param other : PClassAttribute we want ot copy
17 */
18
3/3
✓ Branch 0 (3→4) taken 178 times.
✓ Branch 2 (4→5) taken 178 times.
✓ Branch 4 (5→6) taken 178 times.
178 PClassAttribute::PClassAttribute(const PClassAttribute & other){
19
1/1
✓ Branch 0 (6→7) taken 178 times.
178 copyPClassAttribute(other);
20 178 }
21
22 ///Destructor of class PClassAttribute
23 213 PClassAttribute::~PClassAttribute(){
24
25 213 }
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 46 void PClassAttribute::setType(const PString & type){
40 46 p_type = type;
41 46 }
42
43 ///Sets the name of the PClassAttribute
44 /** @param name : name of the PClassAttribute
45 */
46 35 void PClassAttribute::setName(const PString & name){
47 35 p_name = name;
48 35 }
49
50 ///Sets the defaultValue of the PClassAttribute
51 /** @param defaultValue : defaultValue of the PClassAttribute
52 */
53 6 void PClassAttribute::setDefaultValue(const PString & defaultValue){
54 6 p_defaultValue = defaultValue;
55 6 }
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 35 void PClassAttribute::setDocumentation(const PString & documentation){
75 35 p_documentation = documentation;
76 35 }
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 414 const PString & PClassAttribute::getType() const{
89 414 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 759 const PString & PClassAttribute::getName() const{
103 759 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 30 const PString & PClassAttribute::getDefaultValue() const{
117 30 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 147 bool PClassAttribute::getIsPointer() const{
131 147 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 58 const PString & PClassAttribute::getDocumentation() const{
159 58 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 178 void PClassAttribute::copyPClassAttribute(const PClassAttribute & other){
187 178 p_type = other.p_type;
188 178 p_name = other.p_name;
189 178 p_defaultValue = other.p_defaultValue;
190 178 p_isPointer = other.p_isPointer;
191 178 p_isReference = other.p_isReference;
192 178 p_documentation = other.p_documentation;
193 178 p_isEnum = other.p_isEnum;
194 178 }
195
196 ///Initialisation Function of class PClassAttribute
197 35 void PClassAttribute::initialisationPClassAttribute(){
198 35 p_type = "";
199 35 p_name = "";
200 35 p_defaultValue = "";
201 35 p_isPointer = false;
202 35 p_isReference = false;
203 35 p_documentation = "";
204 35 p_isEnum = false;
205 35 }
206
207