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

Go to the source code of this file.

Functions

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

Function Documentation

◆ setter_createSetterDecl()

PString setter_createSetterDecl ( const PString & varType,
const PString & varName,
const PString & className,
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
isPtr: true if te variable is a pointer
Returns
setters function decl

Definition at line 17 of file CppTraitSetter.cpp.

17 {
18 PString functionDecl("void ");
19 if(className != "") functionDecl += className + "::";
20 functionDecl += "set" + varName.firstToUpper() + "(";
21 functionDecl += makeVarType(varType, true, true, false, isPtr);
22 functionDecl += " " + varName + ")";
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 CppTraitSetter::publicMethodDeclaration(), and CppTraitSetter::publicMethodImplementation().

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