![]() |
PhoenixGenerator
2.0.0
Set of tools to generate code
|
Go to the source code of this file.
Functions | |
PString | createGetterDecl (const PString &varType, const PString &varName, const PString &className, bool isConst, bool isPtr) |
Creates a function decl for setters. More... | |
PString | createSetterDecl (const PString &varType, const PString &varName, const PString &className, bool isPtr) |
Creates a function decl for setters. More... | |
bool | getIsSimpleType (const PString &varType) |
Check if the given type is a simple type. More... | |
PString | makeVarType (const PString &varType, bool isSetter, bool isConst, bool isRef, bool isPtr) |
Makes the var type by taking account of the type. More... | |
void | saveClassConstructorImpl (std::ofstream &fs, const PClassConfig &classConfig) |
void | saveClassCopyConstructorImpl (std::ofstream &fs, const PClassConfig &classConfig) |
void | saveClassCopyFunctionImpl (std::ofstream &fs, const PClassConfig &classConfig) |
bool | saveClassDecl (const std::vector< PClassConfig > &classConfig, const PPath &headerFile, const PVecPath &listInclude, bool enableDataStream, bool enableTypeStream) |
void | saveClassDecl (std::ofstream &fs, const PClassConfig &classConfig, bool enableDataStream, bool enableTypeStream) |
Creates header file. More... | |
void | saveClassDestructorImpl (std::ofstream &fs, const PClassConfig &classConfig) |
void | saveClassEqualOperatorImpl (std::ofstream &fs, const PClassConfig &classConfig) |
void | saveClassGettersImpl (std::ofstream &fs, const PClassConfig &classConfig) |
bool | saveClassImpl (const std::vector< PClassConfig > &classConfig, const PPath &sourceFile, const PPath &headerFile) |
void | saveClassImpl (std::ofstream &fs, const PClassConfig &classConfig) |
bool | saveClassImplDecl (const std::vector< PClassConfig > &classConfig, const PPath &baseFileName, const PVecPath &listInclude=PVecPath(), bool enableDataStream=false, bool enableTypeStream=false) |
Creates header file. More... | |
void | saveClassSettersImpl (std::ofstream &fs, const PClassConfig &classConfig) |
void | saveDeclGetters (std::ofstream &fs, const PClassConfig &classConfig) |
Creates getters header file. More... | |
void | saveDeclSetters (std::ofstream &fs, const PClassConfig &classConfig) |
Creates setters header file. More... | |
PString createGetterDecl | ( | const PString & | varType, |
const PString & | varName, | ||
const PString & | className, | ||
bool | isConst, | ||
bool | isPtr | ||
) |
Creates a function decl for setters.
varType | : type of the var to set |
varName | : name of the var to set |
className | : name of the class |
isConst | : true if the function must be const |
isPtr | : true if te variable is a pointer |
Definition at line 102 of file saveClassConfig.cpp.
References PString::firstToUpper(), and makeVarType().
Referenced by saveClassGettersImpl(), and saveDeclGetters().
PString createSetterDecl | ( | const PString & | varType, |
const PString & | varName, | ||
const PString & | className, | ||
bool | isPtr | ||
) |
Creates a function decl for setters.
varType | : type of the var to set |
varName | : name of the var to set |
className | : name of the class |
isPtr | : true if te variable is a pointer |
Definition at line 85 of file saveClassConfig.cpp.
References PString::firstToUpper(), and makeVarType().
Referenced by saveClassSettersImpl(), and saveDeclSetters().
bool getIsSimpleType | ( | const PString & | varType | ) |
Check if the given type is a simple type.
varType | : type to be checked |
Definition at line 15 of file saveClassConfig.cpp.
References PString::eraseChar(), and PString::replace().
Referenced by createCheckClassEquality(), makeVarType(), project_wrapper_attributeDef(), project_wrapper_classAttributeFromMessage(), project_wrapper_classAttributeGetSize(), project_wrapper_classAttributeToMessage(), project_wrapper_classGetterSetterDef(), project_wrapper_classImpl(), project_wrapper_classImplCheck(), project_wrapper_classImplDealloc(), project_wrapper_classImplGetterSetter(), project_wrapper_classImplNewc(), and saveClassInitialisationFunctionImpl().
PString makeVarType | ( | const PString & | varType, |
bool | isSetter, | ||
bool | isConst, | ||
bool | isRef, | ||
bool | isPtr | ||
) |
Makes the var type by taking account of the type.
varType | : variable type name |
isSetter | : true if the type is made for a setter |
isConst | : true if the type must be const |
isRef | : true if the variable is a reference |
isPtr | : true if te variable is a pointer |
Definition at line 63 of file saveClassConfig.cpp.
References getIsSimpleType().
Referenced by createGetterDecl(), and createSetterDecl().
void saveClassConstructorImpl | ( | std::ofstream & | fs, |
const PClassConfig & | classConfig | ||
) |
void saveClassCopyConstructorImpl | ( | std::ofstream & | fs, |
const PClassConfig & | classConfig | ||
) |
void saveClassCopyFunctionImpl | ( | std::ofstream & | fs, |
const PClassConfig & | classConfig | ||
) |
bool saveClassDecl | ( | const std::vector< PClassConfig > & | classConfig, |
const PPath & | headerFile, | ||
const PVecPath & | listInclude, | ||
bool | enableDataStream, | ||
bool | enableTypeStream | ||
) |
void saveClassDecl | ( | std::ofstream & | fs, |
const PClassConfig & | classConfig, | ||
bool | enableDataStream, | ||
bool | enableTypeStream | ||
) |
Creates header file.
[out] | fs | : header file name |
classConfig | : class config we want to save | |
enableDataStream | : true to enable the serialization/deserialization with DataStream, false otherwise | |
enableTypeStream | : true to enable the phoenix_getTypeName function creation |
Definition at line 279 of file saveClassConfig.cpp.
References getClassDeclTempalteDef(), getClassDefTemplate(), PClassConfig::getClassDocumentation(), PClassConfig::getListAttribute(), PClassConfig::getListParentClass(), PClassConfig::getListTemplate(), PClassConfig::getName(), saveClassDataStreamGenericFunction(), saveClassDataStreamMethod(), saveDeclGetters(), saveDeclSetters(), and PString::split().
Referenced by saveClassDecl(), and saveClassImplDecl().
void saveClassDestructorImpl | ( | std::ofstream & | fs, |
const PClassConfig & | classConfig | ||
) |
void saveClassEqualOperatorImpl | ( | std::ofstream & | fs, |
const PClassConfig & | classConfig | ||
) |
void saveClassGettersImpl | ( | std::ofstream & | fs, |
const PClassConfig & | classConfig | ||
) |
bool saveClassImpl | ( | const std::vector< PClassConfig > & | classConfig, |
const PPath & | sourceFile, | ||
const PPath & | headerFile | ||
) |
void saveClassImpl | ( | std::ofstream & | fs, |
const PClassConfig & | classConfig | ||
) |
bool saveClassImplDecl | ( | const std::vector< PClassConfig > & | classConfig, |
const PPath & | baseFileName, | ||
const PVecPath & | listInclude, | ||
bool | enableDataStream, | ||
bool | enableTypeStream | ||
) |
Creates header file.
classConfig | : class config we want to save |
baseFileName | : base file name for header or source file |
listInclude | : list of the include files |
enableDataStream | : true to enable the serialization/deserialization with DataStream, false otherwise |
enableTypeStream | : true to enable the phoenix_getTypeName function creation |
Definition at line 728 of file saveClassConfig.cpp.
References checkClassConfig(), PPath::getFileName(), saveClassDecl(), saveClassImpl(), and saveClassTemplate().
Referenced by saveParserClassConfig().
void saveClassSettersImpl | ( | std::ofstream & | fs, |
const PClassConfig & | classConfig | ||
) |
void saveDeclGetters | ( | std::ofstream & | fs, |
const PClassConfig & | classConfig | ||
) |
Creates getters header file.
[out] | fs | : header file name |
classConfig | : class config we want to save |
Definition at line 125 of file saveClassConfig.cpp.
References createGetterDecl(), and PClassConfig::getListAttribute().
Referenced by saveClassDecl().
void saveDeclSetters | ( | std::ofstream & | fs, |
const PClassConfig & | classConfig | ||
) |
Creates setters header file.
[out] | fs | : header file name |
classConfig | : class config we want to save |
Definition at line 114 of file saveClassConfig.cpp.
References createSetterDecl(), and PClassConfig::getListAttribute().
Referenced by saveClassDecl().