PhoenixGenerator  0.2.0
Set of tools to generate code
Loading...
Searching...
No Matches
PClassAttribute.cpp
Go to the documentation of this file.
1/***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5****************************************/
6
7
8#include "PClassAttribute.h"
9
14
16
21
26
28
33 return *this;
34}
35
37
39void PClassAttribute::setType(const PString & type){
40 p_type = type;
41}
42
44
46void PClassAttribute::setName(const PString & name){
47 p_name = name;
48}
49
51
53void PClassAttribute::setDefaultValue(const PString & defaultValue){
54 p_defaultValue = defaultValue;
55}
56
58
60void PClassAttribute::setIsPointer(bool isPointer){
61 p_isPointer = isPointer;
62}
63
65
67void PClassAttribute::setIsReference(bool isReference){
68 p_isReference = isReference;
69}
70
72
74void PClassAttribute::setDocumentation(const PString & documentation){
75 p_documentation = documentation;
76}
77
79
82 p_isEnum = isEnum;
83}
84
86
88const PString & PClassAttribute::getType() const{
89 return p_type;
90}
91
93
96 return p_type;
97}
98
100
102const PString & PClassAttribute::getName() const{
103 return p_name;
104}
105
107
110 return p_name;
111}
112
114
116const PString & PClassAttribute::getDefaultValue() const{
117 return p_defaultValue;
118}
119
121
126
128
131 return p_isPointer;
132}
133
135
140
142
145 return p_isReference;
146}
147
149
154
156
158const PString & PClassAttribute::getDocumentation() const{
159 return p_documentation;
160}
161
163
168
170
173 return p_isEnum;
174}
175
177
180 return p_isEnum;
181}
182
184
195
198 p_type = "";
199 p_name = "";
200 p_defaultValue = "";
201 p_isPointer = false;
202 p_isReference = false;
203 p_documentation = "";
204 p_isEnum = false;
205}
206
PClassAttribute & operator=(const PClassAttribute &other)
Operator = of class PClassAttribute.
bool p_isPointer
true if is a pointer
const PString & getDocumentation() const
Gets the documentation of the PClassAttribute.
void setType(const PString &type)
Sets the type of the PClassAttribute.
PString p_defaultValue
Default value of the attribute.
PString p_documentation
Documentation string.
PClassAttribute()
Constructor of class PClassAttribute.
PString p_name
Name of the attribute.
virtual ~PClassAttribute()
Destructor of class PClassAttribute.
void setDefaultValue(const PString &defaultValue)
Sets the defaultValue of the PClassAttribute.
void setDocumentation(const PString &documentation)
Sets the documentation of the PClassAttribute.
void initialisationPClassAttribute()
Initialisation Function of class PClassAttribute.
void copyPClassAttribute(const PClassAttribute &other)
Copy Function of class PClassAttribute.
void setIsPointer(bool isPointer)
Sets the isPointer of the PClassAttribute.
PString p_type
Type of the attribute.
const PString & getDefaultValue() const
Gets the defaultValue of the PClassAttribute.
const PString & getType() const
Gets the type of the PClassAttribute.
void setName(const PString &name)
Sets the name of the PClassAttribute.
void setIsEnum(bool isEnum)
Sets the isEnum of the PClassAttribute.
bool getIsEnum() const
Gets the isEnum of the PClassAttribute.
const PString & getName() const
Gets the name of the PClassAttribute.
bool getIsReference() const
Gets the isReference of the PClassAttribute.
void setIsReference(bool isReference)
Sets the isReference of the PClassAttribute.
bool p_isEnum
True if the PClassAttribute is an enum.
bool p_isReference
True if it is a reference.
bool getIsPointer() const
Gets the isPointer of the PClassAttribute.