Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
CPPEnum.cxx File Reference
#include "CPyCppyy.h"
#include "CPPEnum.h"
#include "PyStrings.h"
#include "TypeManip.h"
#include "Utility.h"
Include dependency graph for CPPEnum.cxx:

Functions

static PyObjectenum_ctype (PyObject *cls, PyObject *args, PyObject *kwds)
 
static PyObjectenum_repr (PyObject *self)
 
static int enum_setattro (PyObject *, PyObject *, PyObject *)
 
static PyTypeObject * GetCTypesType (const std::string &cppname)
 
static PyObjectpytype_from_enum_type (const std::string &enum_type)
 
static PyObjectpyval_from_enum (const std::string &enum_type, PyObject *pytype, PyObject *btype, Cppyy::TCppEnum_t etype, Cppyy::TCppIndex_t idata)
 

Variables

static std::map< std::string, std::string > gCTypesNames
 

Function Documentation

◆ enum_ctype()

static PyObject * enum_ctype ( PyObject cls,
PyObject args,
PyObject kwds 
)
static

Definition at line 118 of file CPPEnum.cxx.

◆ enum_repr()

static PyObject * enum_repr ( PyObject self)
static

Definition at line 58 of file CPPEnum.cxx.

◆ enum_setattro()

static int enum_setattro ( PyObject ,
PyObject ,
PyObject  
)
static

Definition at line 50 of file CPPEnum.cxx.

◆ GetCTypesType()

static PyTypeObject * GetCTypesType ( const std::string &  cppname)
static

Definition at line 103 of file CPPEnum.cxx.

◆ pytype_from_enum_type()

static PyObject * pytype_from_enum_type ( const std::string &  enum_type)
static

Definition at line 10 of file CPPEnum.cxx.

◆ pyval_from_enum()

static PyObject * pyval_from_enum ( const std::string &  enum_type,
PyObject pytype,
PyObject btype,
Cppyy::TCppEnum_t  etype,
Cppyy::TCppIndex_t  idata 
)
static

Definition at line 22 of file CPPEnum.cxx.

Variable Documentation

◆ gCTypesNames

std::map<std::string, std::string> gCTypesNames
static
Initial value:
= {
{"bool", "c_bool"},
{"char", "c_char"}, {"wchar_t", "c_wchar"},
{"std::byte", "c_byte"}, {"int8_t", "c_byte"}, {"uint8_t", "c_ubyte"},
{"short", "c_short"}, {"int16_t", "c_int16"}, {"unsigned short", "c_ushort"}, {"uint16_t", "c_uint16"},
{"int", "c_int"}, {"unsigned int", "c_uint"},
{"long", "c_long"}, {"unsigned long", "c_ulong"},
{"long long", "c_longlong"}, {"unsigned long long", "c_ulonglong"}}

Definition at line 90 of file CPPEnum.cxx.