PhoenixGenerator  2.0.4
Set of tools to generate code
Loading...
Searching...
No Matches
wrapper_convertType.h File Reference
#include "PString.h"
+ Include dependency graph for wrapper_convertType.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

PString getPythonStrForPythonApiType (const PString &typeStr)
 Gets the python API str type of the correcponding numpy C/C++ type.
 

Function Documentation

◆ getPythonStrForPythonApiType()

PString getPythonStrForPythonApiType ( const PString & typeStr)

Gets the python API str type of the correcponding numpy C/C++ type.

Parameters
typeStr: C/C++ type
Returns
python str type of the correcponding C/C++ type See documentation : https://docs.python.org/3/c-api/structures.html

Definition at line 15 of file wrapper_convertType.cpp.

15 {
16 if(typeStr == "char") return "T_CHAR";
17 else if(typeStr == "bool") return "T_BOOL";
18 else if(typeStr == "short") return "T_SHORT";
19 else if(typeStr == "unsigned short") return "T_USHORT";
20 else if(typeStr == "int") return "T_INT";
21 else if(typeStr == "unsigned int") return "T_UINT";
22 else if(typeStr == "ssize_t" || typeStr == "long int") return "T_LONG";
23 else if(typeStr == "size_t" || typeStr == "long unsigned int") return "T_ULONG";
24 else if(typeStr == "float") return "T_FLOAT";
25 else if(typeStr == "double") return "T_DOUBLE";
26 else return "";
27}

Referenced by WrapperTraitGetterSetter::registerClassMember().

+ Here is the caller graph for this function: