PhoenixGenerator  2.0.0
Set of tools to generate code
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 
13 }
14 
16 
19  copyPClassAttribute(other);
20 }
21 
24 
25 }
26 
28 
32  copyPClassAttribute(other);
33  return *this;
34 }
35 
37 
39 void PClassAttribute::setType(const PString & type){
40  p_type = type;
41 }
42 
44 
46 void PClassAttribute::setName(const PString & name){
47  p_name = name;
48 }
49 
51 
53 void PClassAttribute::setDefaultValue(const PString & defaultValue){
54  p_defaultValue = defaultValue;
55 }
56 
58 
60 void PClassAttribute::setIsPointer(bool isPointer){
61  p_isPointer = isPointer;
62 }
63 
65 
67 void PClassAttribute::setIsReference(bool isReference){
68  p_isReference = isReference;
69 }
70 
72 
74 void PClassAttribute::setDocumentation(const PString & documentation){
75  p_documentation = documentation;
76 }
77 
79 
81 void PClassAttribute::setIsEnum(bool isEnum){
82  p_isEnum = isEnum;
83 }
84 
86 
89  return p_type;
90 }
91 
93 
96  return p_type;
97 }
98 
100 
103  return p_name;
104 }
105 
107 
110  return p_name;
111 }
112 
114 
117  return p_defaultValue;
118 }
119 
121 
124  return p_defaultValue;
125 }
126 
128 
131  return p_isPointer;
132 }
133 
135 
138  return p_isPointer;
139 }
140 
142 
145  return p_isReference;
146 }
147 
149 
152  return p_isReference;
153 }
154 
156 
159  return p_documentation;
160 }
161 
163 
166  return p_documentation;
167 }
168 
170 
173  return p_isEnum;
174 }
175 
177 
180  return p_isEnum;
181 }
182 
184 
187  p_type = other.p_type;
188  p_name = other.p_name;
190  p_isPointer = other.p_isPointer;
193  p_isEnum = other.p_isEnum;
194 }
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 
Describes a class attribute.
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.
Extends the std::string.
Definition: PString.h:16