PhoenixGenerator  2.6.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 setNamespace(const PString & value);
26 void addAttribute(const PClassAttribute & attribute);
27 void addListAttribute(const std::vector<PClassAttribute> & listAttribute);
28 void addParentClass(const PString & parentClass);
29 void addListParentClass(const PVecString & listParentClass);
30 void addTemplate(const PString & defTemplate);
31 void addListTemplate(const PVecString & listTemplate);
32
33 void setIsEnum(bool isEnum);
34
35 const PString & getName() const;
36 PString & getName();
37 const PString & getClassDocumentation() const;
38 PString & getClassDocumentation();
39 const std::vector<PClassAttribute> & getListAttribute() const;
40 std::vector<PClassAttribute> & getListAttribute();
41 const PVecString & getListParentClass() const;
42 PVecString & getListParentClass();
43 const PVecString & getListTemplate() const;
44 PVecString & getListTemplate();
45 bool getIsEnum() const;
46 const PString & getNamespace() const;
47 PString & getNamespace();
48 PString getFullName() const;
49
50 protected:
51 void copyPClassConfig(const PClassConfig & other);
52
53 private:
55
59 PString p_namespace;
61 PString p_name;
63 std::vector<PClassAttribute> p_listAttribute;
67 PVecString p_listTemplate;
70};
71
72
73
74#endif
75
Describes a class attribute.
PString getFullName() const
Returns the full name of the class including the namespace.
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 setNamespace(const PString &value)
Sets the namespace 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.
const PString & getNamespace() const
Returns the namespace of the class.
void setListTemplate(const PVecString &listTemplate)
Sets the list of template of the class.
PString p_namespace
Namespace 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.