PhoenixGenerator  0.2.0
Set of tools to generate code
Loading...
Searching...
No Matches
PClassConfig.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 "PClassConfig.h"
9
14
16
21
26
28
32 copyPClassConfig(other);
33 return *this;
34}
35
37
39void PClassConfig::setClassDocumentation(const PString & classDocumentation){
40 p_classDocumentation = classDocumentation;
41}
42
44
46void PClassConfig::setName(const PString & name){
47 p_name = name;
48}
49
51
53void PClassConfig::setListAttribute(const std::vector<PClassAttribute> & listAttribute){
54 p_listAttribute = listAttribute;
55}
56
58
60void PClassConfig::setListTemplate(const PVecString & listTemplate){
61 p_listTemplate = listTemplate;
62}
63
65
68 p_listAttribute.push_back(attribute);
69}
70
72
74void PClassConfig::addListAttribute(const std::vector<PClassAttribute> & listAttribute){
75 for(std::vector<PClassAttribute>::const_iterator it(listAttribute.begin()); it != listAttribute.end(); ++it){
76 addAttribute(*it);
77 }
78}
79
81
83void PClassConfig::addParentClass(const PString & parentClass){
84 p_listParentClass.push_back(parentClass);
85}
86
88
90void PClassConfig::addListParentClass(const PVecString & listParentClass){
91 for(PVecString::const_iterator it(listParentClass.begin()); it != listParentClass.end(); ++it){
92 addParentClass(*it);
93 }
94}
95
97
99void PClassConfig::addTemplate(const PString & defTemplate){
100 p_listTemplate.push_back(defTemplate);
101}
102
104
106void PClassConfig::addListTemplate(const PVecString & listTemplate){
107 for(PVecString::const_iterator it(listTemplate.begin()); it != listTemplate.end(); ++it){
108 addTemplate(*it);
109 }
110}
111
113
115void PClassConfig::setIsEnum(bool isEnum){
116 p_isEnum = isEnum;
117}
118
120
122const PString & PClassConfig::getName() const{return p_name;}
123
125
127PString & PClassConfig::getName(){return p_name;}
128
130
133
135
138
140
142const std::vector<PClassAttribute> & PClassConfig::getListAttribute() const{return p_listAttribute;}
143
145
147std::vector<PClassAttribute> & PClassConfig::getListAttribute(){return p_listAttribute;}
148
150
152const PVecString & PClassConfig::getListParentClass() const{return p_listParentClass;}
153
155
158
160
162const PVecString & PClassConfig::getListTemplate() const{return p_listTemplate;}
163
165
168
170
173
175
185
190
191
192
193
194
Describes a class attribute.
void addAttribute(const PClassAttribute &attribute)
Adds an attribute to the class.
virtual ~PClassConfig()
Destructeur of PClassConfig.
void setClassDocumentation(const PString &classDocumentation)
Sets the class documentation.
const PString & getClassDocumentation() const
Returns the class documentation.
const std::vector< PClassAttribute > & getListAttribute() const
Returns the list of attributes of the class.
void setIsEnum(bool isEnum)
Set if the current PClassConfig is an enum.
void setListAttribute(const std::vector< PClassAttribute > &listAttribute)
Sets the list of attributes of the class.
PClassConfig()
Default constructeur of PClassConfig.
void addListTemplate(const PVecString &listTemplate)
Add a template to the PClassConfig.
const PVecString & getListTemplate() const
Returns the list of the template of the class.
const PString & getName() const
Returns the class name.
bool getIsEnum() const
Say if the current PClassConfig is an enum.
void setName(const PString &name)
Sets the class name.
PVecString p_listParentClass
List of the parent classes of the current class.
void addListAttribute(const std::vector< PClassAttribute > &listAttribute)
Adds a list of attributes to the class.
bool p_isEnum
True if it is an enum.
PString p_name
Name of the class.
void addParentClass(const PString &parentClass)
Add a parent class to the PClassConfig.
PClassConfig & operator=(const PClassConfig &other)
Definition of equal operator of PClassConfig.
void copyPClassConfig(const PClassConfig &other)
Copy function of PClassConfig.
void addTemplate(const PString &defTemplate)
Add a template to the PClassConfig.
PVecString p_listTemplate
List of the template definition of the current class.
const PVecString & getListParentClass() const
Returns the list of the parents of the class.
void initialisationPClassConfig()
Initialisation function of the class PClassConfig.
void setListTemplate(const PVecString &listTemplate)
Sets the list of template of the class.
PString p_classDocumentation
Class documentation.
void addListParentClass(const PVecString &listParentClass)
Add a parent classes to the PClassConfig.
std::vector< PClassAttribute > p_listAttribute
List of the attribute of the class.