GCC Code Coverage Report


Directory: ./
File: src/PClassAttribute.cpp
Date: 2025-04-25 19:10:50
Exec Total Coverage
Lines: 75 77 97.4%
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 2 taken 102 times.
✓ Branch 5 taken 102 times.
✓ Branch 8 taken 102 times.
102 PClassAttribute::PClassAttribute(){
12
1/1
✓ Branch 1 taken 102 times.
102 initialisationPClassAttribute();
13 102 }
14
15 ///Copy Constructor of class PClassAttribute
16 /** @param other : PClassAttribute we want ot copy
17 */
18
3/3
✓ Branch 2 taken 317 times.
✓ Branch 5 taken 317 times.
✓ Branch 8 taken 317 times.
317 PClassAttribute::PClassAttribute(const PClassAttribute & other){
19
1/1
✓ Branch 1 taken 317 times.
317 copyPClassAttribute(other);
20 317 }
21
22 ///Destructor of class PClassAttribute
23 838 PClassAttribute::~PClassAttribute(){
24
25 }
26
27 ///Operator = of class PClassAttribute
28 /** @param other : PClassAttribute we want ot copy
29 * @return copied class PClassAttribute
30 */
31 9 PClassAttribute & PClassAttribute::operator = (const PClassAttribute & other){
32 9 copyPClassAttribute(other);
33 9 return *this;
34 }
35
36 ///Sets the type of the PClassAttribute
37 /** @param type : type of the PClassAttribute
38 */
39 94 void PClassAttribute::setType(const PString & type){
40 94 p_type = type;
41 94 }
42
43 ///Sets the name of the PClassAttribute
44 /** @param name : name of the PClassAttribute
45 */
46 93 void PClassAttribute::setName(const PString & name){
47 93 p_name = name;
48 93 }
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 10 void PClassAttribute::setIsPointer(bool isPointer){
61 10 p_isPointer = isPointer;
62 10 }
63
64 ///Sets the isReference of the PClassAttribute
65 /** @param isReference : isReference of the PClassAttribute
66 */
67 10 void PClassAttribute::setIsReference(bool isReference){
68 10 p_isReference = isReference;
69 10 }
70
71 ///Sets the documentation of the PClassAttribute
72 /** @param documentation : documentation of the PClassAttribute
73 */
74 93 void PClassAttribute::setDocumentation(const PString & documentation){
75 93 p_documentation = documentation;
76 93 }
77
78 ///Sets the isEnum of the PClassAttribute
79 /** @param isEnum : isEnum of the PClassAttribute
80 */
81 1 void PClassAttribute::setIsEnum(bool isEnum){
82 1 p_isEnum = isEnum;
83 1 }
84
85 ///Gets the type of the PClassAttribute
86 /** @return type of the PClassAttribute
87 */
88 1104 const PString & PClassAttribute::getType() const{
89 1104 return p_type;
90 }
91
92 ///Gets the type of the PClassAttribute
93 /** @return type of the PClassAttribute
94 */
95 63 PString & PClassAttribute::getType(){
96 63 return p_type;
97 }
98
99 ///Gets the name of the PClassAttribute
100 /** @return name of the PClassAttribute
101 */
102 2020 const PString & PClassAttribute::getName() const{
103 2020 return p_name;
104 }
105
106 ///Gets the name of the PClassAttribute
107 /** @return name of the PClassAttribute
108 */
109 3 PString & PClassAttribute::getName(){
110 3 return p_name;
111 }
112
113 ///Gets the defaultValue of the PClassAttribute
114 /** @return defaultValue of the PClassAttribute
115 */
116 77 const PString & PClassAttribute::getDefaultValue() const{
117 77 return p_defaultValue;
118 }
119
120 ///Gets the defaultValue of the PClassAttribute
121 /** @return defaultValue of the PClassAttribute
122 */
123 2 PString & PClassAttribute::getDefaultValue(){
124 2 return p_defaultValue;
125 }
126
127 ///Gets the isPointer of the PClassAttribute
128 /** @return isPointer of the PClassAttribute
129 */
130 589 bool PClassAttribute::getIsPointer() const{
131 589 return p_isPointer;
132 }
133
134 ///Gets the isPointer of the PClassAttribute
135 /** @return isPointer of the PClassAttribute
136 */
137 3 bool & PClassAttribute::getIsPointer(){
138 3 return p_isPointer;
139 }
140
141 ///Gets the isReference of the PClassAttribute
142 /** @return isReference of the PClassAttribute
143 */
144 121 bool PClassAttribute::getIsReference() const{
145 121 return p_isReference;
146 }
147
148 ///Gets the isReference of the PClassAttribute
149 /** @return isReference of the PClassAttribute
150 */
151 3 bool & PClassAttribute::getIsReference(){
152 3 return p_isReference;
153 }
154
155 ///Gets the documentation of the PClassAttribute
156 /** @return documentation of the PClassAttribute
157 */
158 189 const PString & PClassAttribute::getDocumentation() const{
159 189 return p_documentation;
160 }
161
162 ///Gets the documentation of the PClassAttribute
163 /** @return documentation of the PClassAttribute
164 */
165 3 PString & PClassAttribute::getDocumentation(){
166 3 return p_documentation;
167 }
168
169 ///Gets the isEnum of the PClassAttribute
170 /** @return isEnum of the PClassAttribute
171 */
172 7 bool PClassAttribute::getIsEnum() const{
173 7 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 326 void PClassAttribute::copyPClassAttribute(const PClassAttribute & other){
187 326 p_type = other.p_type;
188 326 p_name = other.p_name;
189 326 p_defaultValue = other.p_defaultValue;
190 326 p_isPointer = other.p_isPointer;
191 326 p_isReference = other.p_isReference;
192 326 p_documentation = other.p_documentation;
193 326 p_isEnum = other.p_isEnum;
194 326 }
195
196 ///Initialisation Function of class PClassAttribute
197 102 void PClassAttribute::initialisationPClassAttribute(){
198 102 p_type = "";
199 102 p_name = "";
200 102 p_defaultValue = "";
201 102 p_isPointer = false;
202 102 p_isReference = false;
203 102 p_documentation = "";
204 102 p_isEnum = false;
205 102 }
206
207