PhoenixGenerator  2.0.0
Set of tools to generate code
class_attribute_utils.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 
9 
11 
15 PClassAttribute createClassAttribute(const PString & type, const PString & name, const PString & documentation){
16  PClassAttribute attr;
17  attr.setType(type);
18  attr.setName(name);
19  attr.setDocumentation(documentation);
20  return attr;
21 }
22 
24 
31 PClassAttribute createClassAttribute(const PString & typeName, const PString & name, bool isPointer, bool isReference, const PString & documentation){
32  PClassAttribute attr;
33  attr.setType(typeName);
34  attr.setName(name);
35  attr.setIsPointer(isPointer);
36  attr.setIsReference(isReference);
37  attr.setDocumentation(documentation);
38 
39  return attr;
40 }
41 
42 
Describes a class attribute.
void setType(const PString &type)
Sets the type of the PClassAttribute.
void setDocumentation(const PString &documentation)
Sets the documentation of the PClassAttribute.
void setIsPointer(bool isPointer)
Sets the isPointer of the PClassAttribute.
void setName(const PString &name)
Sets the name of the PClassAttribute.
void setIsReference(bool isReference)
Sets the isReference of the PClassAttribute.
Extends the std::string.
Definition: PString.h:16
PClassAttribute createClassAttribute(const PString &type, const PString &name, const PString &documentation)
Creates a PClassAttribute.