PhoenixGenerator  2.0.4
Set of tools to generate code
Loading...
Searching...
No Matches
CppTraitGetter.cpp File Reference
#include "CppTraitGetter.h"
+ Include dependency graph for CppTraitGetter.cpp:

Go to the source code of this file.

Functions

PString getter_createGetterDecl (const PString &varType, const PString &varName, const PString &className, bool isConst, bool isPtr)
 Creates a function decl for setters.
 

Function Documentation

◆ getter_createGetterDecl()

PString getter_createGetterDecl ( const PString & varType,
const PString & varName,
const PString & className,
bool isConst,
bool isPtr )

Creates a function decl for setters.

Parameters
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
Returns
setters function decl

Definition at line 18 of file CppTraitGetter.cpp.

18 {
19 PString functionDecl("");
20 functionDecl += makeVarType(varType, false, isConst, !isConst, isPtr) + " ";
21 if(className != "") functionDecl += className + "::";
22 functionDecl += "get" + varName.firstToUpper() + "()";
23 return functionDecl;
24}
PString makeVarType(const PString &varType, bool isSetter, bool isConst, bool isRef, bool isPtr)
Makes the var type by taking account of the type.

References makeVarType().

Referenced by CppTraitGetter::publicMethodDeclaration(), and CppTraitGetter::publicMethodImplementation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: