PhoenixGenerator  2.0.0
Set of tools to generate code
PClassConfig Class Reference

Class to describe a basic class. More...

#include <PClassConfig.h>

+ Collaboration diagram for PClassConfig:

Public Member Functions

void addAttribute (const PClassAttribute &attribute)
 Adds an attribute to the class. More...
 
void addListAttribute (const std::vector< PClassAttribute > &listAttribute)
 Adds a list of attributes to the class. More...
 
void addListParentClass (const PVecString &listParentClass)
 Add a parent classes to the PClassConfig. More...
 
void addListTemplate (const PVecString &listTemplate)
 Add a template to the PClassConfig. More...
 
void addParentClass (const PString &parentClass)
 Add a parent class to the PClassConfig. More...
 
void addTemplate (const PString &defTemplate)
 Add a template to the PClassConfig. More...
 
PStringgetClassDocumentation ()
 Returns the class documentation. More...
 
const PStringgetClassDocumentation () const
 Returns the class documentation. More...
 
bool getIsEnum () const
 Say if the current PClassConfig is an enum. More...
 
std::vector< PClassAttribute > & getListAttribute ()
 Returns the list of attributes of the class. More...
 
const std::vector< PClassAttribute > & getListAttribute () const
 Returns the list of attributes of the class. More...
 
PVecStringgetListParentClass ()
 Returns the list of the parents of the class. More...
 
const PVecStringgetListParentClass () const
 Returns the list of the parents of the class. More...
 
PVecStringgetListTemplate ()
 Returns the list of the template of the class. More...
 
const PVecStringgetListTemplate () const
 Returns the list of the template of the class. More...
 
PStringgetName ()
 Returns the class name. More...
 
const PStringgetName () const
 Returns the class name. More...
 
PClassConfigoperator= (const PClassConfig &other)
 Definition of equal operator of PClassConfig. More...
 
 PClassConfig ()
 Default constructeur of PClassConfig. More...
 
 PClassConfig (const PClassConfig &other)
 Copy constructor of PClassConfig. More...
 
void setClassDocumentation (const PString &classDocumentation)
 Sets the class documentation. More...
 
void setIsEnum (bool isEnum)
 Set if the current PClassConfig is an enum. More...
 
void setListAttribute (const std::vector< PClassAttribute > &listAttribute)
 Sets the list of attributes of the class. More...
 
void setListTemplate (const PVecString &listTemplate)
 Sets the list of template of the class. More...
 
void setName (const PString &name)
 Sets the class name. More...
 
virtual ~PClassConfig ()
 Destructeur of PClassConfig. More...
 

Protected Member Functions

void copyPClassConfig (const PClassConfig &other)
 Copy function of PClassConfig. More...
 

Private Member Functions

void initialisationPClassConfig ()
 Initialisation function of the class PClassConfig. More...
 

Private Attributes

PString p_classDocumentation
 Class documentation. More...
 
bool p_isEnum
 True if it is an enum. More...
 
std::vector< PClassAttributep_listAttribute
 List of the attribute of the class. More...
 
PVecString p_listParentClass
 List of the parent classes of the current class. More...
 
PVecString p_listTemplate
 List of the template definition of the current class. More...
 
PString p_name
 Name of the class. More...
 

Detailed Description

Class to describe a basic class.

Definition at line 14 of file PClassConfig.h.

Constructor & Destructor Documentation

◆ PClassConfig() [1/2]

PClassConfig::PClassConfig ( )

Default constructeur of PClassConfig.

Definition at line 11 of file PClassConfig.cpp.

11  {
13 }
void initialisationPClassConfig()
Initialisation function of the class PClassConfig.

References initialisationPClassConfig().

+ Here is the call graph for this function:

◆ PClassConfig() [2/2]

PClassConfig::PClassConfig ( const PClassConfig other)

Copy constructor of PClassConfig.

Parameters
other: class to copy

Definition at line 18 of file PClassConfig.cpp.

18  {
19  copyPClassConfig(other);
20 }
void copyPClassConfig(const PClassConfig &other)
Copy function of PClassConfig.

References copyPClassConfig().

+ Here is the call graph for this function:

◆ ~PClassConfig()

PClassConfig::~PClassConfig ( )
virtual

Destructeur of PClassConfig.

Definition at line 23 of file PClassConfig.cpp.

23  {
24 
25 }

Member Function Documentation

◆ addAttribute()

void PClassConfig::addAttribute ( const PClassAttribute attribute)

Adds an attribute to the class.

Parameters
attribute: attribute to add to the class

Definition at line 67 of file PClassConfig.cpp.

67  {
68  p_listAttribute.push_back(attribute);
69 }
std::vector< PClassAttribute > p_listAttribute
List of the attribute of the class.
Definition: PClassConfig.h:57

References p_listAttribute.

Referenced by addListAttribute(), parseClassConfigAttribut(), and parseEnumValue().

+ Here is the caller graph for this function:

◆ addListAttribute()

void PClassConfig::addListAttribute ( const std::vector< PClassAttribute > &  listAttribute)

Adds a list of attributes to the class.

Parameters
listAttribute: list of attributes to add to the class

Definition at line 74 of file PClassConfig.cpp.

74  {
75  for(std::vector<PClassAttribute>::const_iterator it(listAttribute.begin()); it != listAttribute.end(); ++it){
76  addAttribute(*it);
77  }
78 }
void addAttribute(const PClassAttribute &attribute)
Adds an attribute to the class.

References addAttribute().

+ Here is the call graph for this function:

◆ addListParentClass()

void PClassConfig::addListParentClass ( const PVecString listParentClass)

Add a parent classes to the PClassConfig.

Parameters
listParentClass: list of parent classes we want to add in the PClassConfig

Definition at line 90 of file PClassConfig.cpp.

90  {
91  for(PVecString::const_iterator it(listParentClass.begin()); it != listParentClass.end(); ++it){
92  addParentClass(*it);
93  }
94 }
void addParentClass(const PString &parentClass)
Add a parent class to the PClassConfig.

References addParentClass().

+ Here is the call graph for this function:

◆ addListTemplate()

void PClassConfig::addListTemplate ( const PVecString listTemplate)

Add a template to the PClassConfig.

Parameters
listTemplate: list of templates we want to add in the PClassConfig

Definition at line 106 of file PClassConfig.cpp.

106  {
107  for(PVecString::const_iterator it(listTemplate.begin()); it != listTemplate.end(); ++it){
108  addTemplate(*it);
109  }
110 }
void addTemplate(const PString &defTemplate)
Add a template to the PClassConfig.

References addTemplate().

+ Here is the call graph for this function:

◆ addParentClass()

void PClassConfig::addParentClass ( const PString parentClass)

Add a parent class to the PClassConfig.

Parameters
parentClass: parent class we want to add in the PClassConfig

Definition at line 83 of file PClassConfig.cpp.

83  {
84  p_listParentClass.push_back(parentClass);
85 }
PVecString p_listParentClass
List of the parent classes of the current class.
Definition: PClassConfig.h:59

References p_listParentClass.

Referenced by addListParentClass(), and parseParentOfClassConfig().

+ Here is the caller graph for this function:

◆ addTemplate()

void PClassConfig::addTemplate ( const PString defTemplate)

Add a template to the PClassConfig.

Parameters
defTemplate: template we want to add in the PClassConfig

Definition at line 99 of file PClassConfig.cpp.

99  {
100  p_listTemplate.push_back(defTemplate);
101 }
PVecString p_listTemplate
List of the template definition of the current class.
Definition: PClassConfig.h:61

References p_listTemplate.

Referenced by addListTemplate().

+ Here is the caller graph for this function:

◆ copyPClassConfig()

void PClassConfig::copyPClassConfig ( const PClassConfig other)
protected

Copy function of PClassConfig.

Parameters
other: class to copy

Definition at line 177 of file PClassConfig.cpp.

177  {
179  p_name = other.p_name;
183  p_isEnum = other.p_isEnum;
184 }
bool p_isEnum
True if it is an enum.
Definition: PClassConfig.h:63
PString p_name
Name of the class.
Definition: PClassConfig.h:55
PString p_classDocumentation
Class documentation.
Definition: PClassConfig.h:53

References p_classDocumentation, p_isEnum, p_listAttribute, p_listParentClass, p_listTemplate, and p_name.

Referenced by operator=(), and PClassConfig().

+ Here is the caller graph for this function:

◆ getClassDocumentation() [1/2]

PString & PClassConfig::getClassDocumentation ( )

Returns the class documentation.

Returns
class documentation

Definition at line 137 of file PClassConfig.cpp.

137 {return p_classDocumentation;}

References p_classDocumentation.

◆ getClassDocumentation() [2/2]

const PString & PClassConfig::getClassDocumentation ( ) const

Returns the class documentation.

Returns
class documentation

Definition at line 132 of file PClassConfig.cpp.

132 {return p_classDocumentation;}

References p_classDocumentation.

Referenced by project_wrapper_classImplPythonType(), project_wrapper_enumImplPythonType(), project_wrapper_moduleGeneratorWrapperHeaderStructDef(), saveClassDecl(), and saveEnumDecl().

+ Here is the caller graph for this function:

◆ getIsEnum()

bool PClassConfig::getIsEnum ( ) const

Say if the current PClassConfig is an enum.

Returns
true if the current PClassConfig is an enum, false otherwise

Definition at line 172 of file PClassConfig.cpp.

172 {return p_isEnum;}

References p_isEnum.

Referenced by project_wrapper_classTest().

+ Here is the caller graph for this function:

◆ getListAttribute() [1/2]

std::vector< PClassAttribute > & PClassConfig::getListAttribute ( )

Returns the list of attributes of the class.

Returns
list of attributes of the class

Definition at line 147 of file PClassConfig.cpp.

147 {return p_listAttribute;}

References p_listAttribute.

◆ getListAttribute() [2/2]

◆ getListParentClass() [1/2]

PVecString & PClassConfig::getListParentClass ( )

Returns the list of the parents of the class.

Returns
list of the parents of the class

Definition at line 157 of file PClassConfig.cpp.

157 {return p_listParentClass;}

References p_listParentClass.

◆ getListParentClass() [2/2]

const PVecString & PClassConfig::getListParentClass ( ) const

Returns the list of the parents of the class.

Returns
list of the parents of the class

Definition at line 152 of file PClassConfig.cpp.

152 {return p_listParentClass;}

References p_listParentClass.

Referenced by saveClassConstructorImpl(), and saveClassDecl().

+ Here is the caller graph for this function:

◆ getListTemplate() [1/2]

PVecString & PClassConfig::getListTemplate ( )

Returns the list of the template of the class.

Returns
list of the template of the class

Definition at line 167 of file PClassConfig.cpp.

167 {return p_listTemplate;}

References p_listTemplate.

◆ getListTemplate() [2/2]

const PVecString & PClassConfig::getListTemplate ( ) const

Returns the list of the template of the class.

Returns
list of the template of the class

Definition at line 162 of file PClassConfig.cpp.

162 {return p_listTemplate;}

References p_listTemplate.

Referenced by saveClassDecl(), saveClassGetTypeNameImpl(), and saveClassTemplate().

+ Here is the caller graph for this function:

◆ getName() [1/2]

PString & PClassConfig::getName ( )

Returns the class name.

Returns
class name

Definition at line 127 of file PClassConfig.cpp.

127 {return p_name;}

References p_name.

◆ getName() [2/2]

◆ initialisationPClassConfig()

void PClassConfig::initialisationPClassConfig ( )
private

Initialisation function of the class PClassConfig.

Definition at line 187 of file PClassConfig.cpp.

187  {
188  p_isEnum = false;
189 }

References p_isEnum.

Referenced by PClassConfig().

+ Here is the caller graph for this function:

◆ operator=()

PClassConfig & PClassConfig::operator= ( const PClassConfig other)

Definition of equal operator of PClassConfig.

Parameters
other: class to copy
Returns
copied class

Definition at line 31 of file PClassConfig.cpp.

31  {
32  copyPClassConfig(other);
33  return *this;
34 }

References copyPClassConfig().

+ Here is the call graph for this function:

◆ setClassDocumentation()

void PClassConfig::setClassDocumentation ( const PString classDocumentation)

Sets the class documentation.

Parameters
classDocumentation: class documentation

Definition at line 39 of file PClassConfig.cpp.

39  {
40  p_classDocumentation = classDocumentation;
41 }

References p_classDocumentation.

Referenced by parseEnumConfig(), and parsePClassConfig().

+ Here is the caller graph for this function:

◆ setIsEnum()

void PClassConfig::setIsEnum ( bool  isEnum)

Set if the current PClassConfig is an enum.

Parameters
isEnum: true if the current PClassConfig is an enum

Definition at line 115 of file PClassConfig.cpp.

115  {
116  p_isEnum = isEnum;
117 }

References p_isEnum.

Referenced by parseEnumConfig().

+ Here is the caller graph for this function:

◆ setListAttribute()

void PClassConfig::setListAttribute ( const std::vector< PClassAttribute > &  listAttribute)

Sets the list of attributes of the class.

Parameters
listAttribute: list of the attributes of the class

Definition at line 53 of file PClassConfig.cpp.

53  {
54  p_listAttribute = listAttribute;
55 }

References p_listAttribute.

◆ setListTemplate()

void PClassConfig::setListTemplate ( const PVecString listTemplate)

Sets the list of template of the class.

Parameters
listTemplate: list of the template of the class

Definition at line 60 of file PClassConfig.cpp.

60  {
61  p_listTemplate = listTemplate;
62 }

References p_listTemplate.

Referenced by parsePClassConfig().

+ Here is the caller graph for this function:

◆ setName()

void PClassConfig::setName ( const PString name)

Sets the class name.

Parameters
name: name of the class

Definition at line 46 of file PClassConfig.cpp.

46  {
47  p_name = name;
48 }

References p_name.

Referenced by parseEnumConfig(), and parsePClassConfig().

+ Here is the caller graph for this function:

Member Data Documentation

◆ p_classDocumentation

PString PClassConfig::p_classDocumentation
private

Class documentation.

Definition at line 53 of file PClassConfig.h.

Referenced by copyPClassConfig(), getClassDocumentation(), and setClassDocumentation().

◆ p_isEnum

bool PClassConfig::p_isEnum
private

True if it is an enum.

Definition at line 63 of file PClassConfig.h.

Referenced by copyPClassConfig(), getIsEnum(), initialisationPClassConfig(), and setIsEnum().

◆ p_listAttribute

std::vector<PClassAttribute> PClassConfig::p_listAttribute
private

List of the attribute of the class.

Definition at line 57 of file PClassConfig.h.

Referenced by addAttribute(), copyPClassConfig(), getListAttribute(), and setListAttribute().

◆ p_listParentClass

PVecString PClassConfig::p_listParentClass
private

List of the parent classes of the current class.

Definition at line 59 of file PClassConfig.h.

Referenced by addParentClass(), copyPClassConfig(), and getListParentClass().

◆ p_listTemplate

PVecString PClassConfig::p_listTemplate
private

List of the template definition of the current class.

Definition at line 61 of file PClassConfig.h.

Referenced by addTemplate(), copyPClassConfig(), getListTemplate(), and setListTemplate().

◆ p_name

PString PClassConfig::p_name
private

Name of the class.

Definition at line 55 of file PClassConfig.h.

Referenced by copyPClassConfig(), getName(), and setName().


The documentation for this class was generated from the following files: