PhoenixGenerator  2.0.0
Set of tools to generate code
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. More...
 
bool generator_typeIsList (const PString &type)
 Say if a given type is a std::list. More...
 

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 }
Extends the std::string.
Definition: PString.h:16
bool generator_typeIsList(const PString &type)
Say if a given type is a std::list.
Definition: type_utils.cpp:14

References PString::eraseFirstLastChar(), and 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 }
bool isSameBegining(const PString &beginStr) const
Say if the current PString has the same begining of beginStr.
Definition: PString.cpp:306

References PString::isSameBegining().

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

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