PhoenixGenerator  3.4.0
Generate code from template files and projects in C++, Rust, Python and wrapped C++ to Python
Loading...
Searching...
No Matches
CppTraitGetter.cpp File Reference
#include "type_utils.h"
#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 19 of file CppTraitGetter.cpp.

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

References getter_createGetterDecl(), and makeVarType().

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

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