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

Go to the source code of this file.

Functions

PString generator_getListNestedType (const PString &type)
 Get the nested type inside a std::list.
 
bool generator_typeIsList (const PString &type)
 Say if a given type is a std::list.
 

Function Documentation

◆ generator_getListNestedType()

PString generator_getListNestedType ( const PString & type)

Get the nested type inside a std::list.

Parameters
type: type of be used
Returns
nested type in the std::list

Definition at line 22 of file type_utils.cpp.

22 {
23 if(!generator_typeIsList(type)){return "";}
24 PString subType(type.substr(9lu));
25 return subType.eraseFirstLastChar("<> \t\n");
26}
bool generator_typeIsList(const PString &type)
Say if a given type is a std::list.

References generator_typeIsList().

Referenced by project_wrapper_classAttributeFromMessage(), project_wrapper_classAttributeGetSize(), project_wrapper_classAttributeToMessage(), project_wrapper_classImplCheck(), and pythonGetDefaultTestValue().

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

◆ generator_typeIsList()

bool generator_typeIsList ( const PString & type)

Say if a given type is a std::list.

Parameters
type: type of be checked
Returns
true if the type is a std::list

Definition at line 14 of file type_utils.cpp.

14 {
15 return type.isSameBegining("std::list");
16}

Referenced by generator_getListNestedType(), project_wrapper_classAttributeFromMessage(), project_wrapper_classAttributeGetSize(), project_wrapper_classAttributeToMessage(), project_wrapper_classImplCheck(), project_wrapper_classImplNewc(), and pythonGetDefaultTestValue().

+ Here is the caller graph for this function: