PhoenixGenerator  2.0.0
Set of tools to generate code
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:
16  PClassConfig();
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;
38  const std::vector<PClassAttribute> & getListAttribute() const;
39  std::vector<PClassAttribute> & getListAttribute();
40  const PVecString & getListParentClass() const;
42  const PVecString & getListTemplate() const;
44  bool getIsEnum() const;
45 
46  protected:
47  void copyPClassConfig(const PClassConfig & other);
48 
49  private:
51 
57  std::vector<PClassAttribute> p_listAttribute;
63  bool p_isEnum;
64 };
65 
66 
67 
68 #endif
69 
std::vector< PString > PVecString
Definition: PString.h:96
Describes a class attribute.
Class to describe a basic class.
Definition: PClassConfig.h:14
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.
Definition: PClassConfig.h:59
void addListAttribute(const std::vector< PClassAttribute > &listAttribute)
Adds a list of attributes to the class.
bool p_isEnum
True if it is an enum.
Definition: PClassConfig.h:63
PString p_name
Name of the class.
Definition: PClassConfig.h:55
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.
Definition: PClassConfig.h:61
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.
Definition: PClassConfig.h:53
void addListParentClass(const PVecString &listParentClass)
Add a parent classes to the PClassConfig.
std::vector< PClassAttribute > p_listAttribute
List of the attribute of the class.
Definition: PClassConfig.h:57
Extends the std::string.
Definition: PString.h:16