PhoenixGenerator  2.0.4
Set of tools to generate code
Loading...
Searching...
No Matches
PClassConfig.h
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#ifndef __PCLASSCONFIG_H__
8#define __PCLASSCONFIG_H__
9
10#include <vector>
11#include "PClassAttribute.h"
12
15 public:
17 PClassConfig(const PClassConfig & other);
18 virtual ~PClassConfig();
19 PClassConfig & operator = (const PClassConfig & other);
20
21 void setClassDocumentation(const PString & classDocumentation);
22 void setName(const PString & name);
23 void setListAttribute(const std::vector<PClassAttribute> & listAttribute);
24 void setListTemplate(const PVecString & listTemplate);
25 void addAttribute(const PClassAttribute & attribute);
26 void addListAttribute(const std::vector<PClassAttribute> & listAttribute);
27 void addParentClass(const PString & parentClass);
28 void addListParentClass(const PVecString & listParentClass);
29 void addTemplate(const PString & defTemplate);
30 void addListTemplate(const PVecString & listTemplate);
31
32 void setIsEnum(bool isEnum);
33
34 const PString & getName() const;
35 PString & getName();
36 const PString & getClassDocumentation() const;
37 PString & getClassDocumentation();
38 const std::vector<PClassAttribute> & getListAttribute() const;
39 std::vector<PClassAttribute> & getListAttribute();
40 const PVecString & getListParentClass() const;
41 PVecString & getListParentClass();
42 const PVecString & getListTemplate() const;
43 PVecString & getListTemplate();
44 bool getIsEnum() const;
45
46 protected:
47 void copyPClassConfig(const PClassConfig & other);
48
49 private:
51
55 PString p_name;
57 std::vector<PClassAttribute> p_listAttribute;
61 PVecString p_listTemplate;
64};
65
66
67
68#endif
69
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.