PhoenixGenerator  2.0.0
Set of tools to generate code
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. More...
 

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 "Py_T_CHAR";
17  else if(typeStr == "bool") return "Py_T_BOOL";
18  else if(typeStr == "short") return "Py_T_SHORT";
19  else if(typeStr == "unsigned short") return "Py_T_USHORT";
20  else if(typeStr == "int") return "Py_T_INT";
21  else if(typeStr == "unsigned int") return "Py_T_UINT";
22  else if(typeStr == "ssize_t" || typeStr == "long int") return "Py_T_LONG";
23  else if(typeStr == "size_t" || typeStr == "long unsigned int") return "Py_T_ULONG";
24  else if(typeStr == "float") return "Py_T_FLOAT";
25  else if(typeStr == "double") return "Py_T_DOUBLE";
26  else return "";
27 }

Referenced by project_wrapper_classImpl().

+ Here is the caller graph for this function: