Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
Pythonize.cxx File Reference
#include "CPyCppyy.h"
#include "Pythonize.h"
#include "Converters.h"
#include "CPPInstance.h"
#include "CPPFunction.h"
#include "CPPOverload.h"
#include "CustomPyTypes.h"
#include "LowLevelViews.h"
#include "ProxyWrappers.h"
#include "PyCallable.h"
#include "PyStrings.h"
#include "TypeManip.h"
#include "Utility.h"
#include <algorithm>
#include <complex>
#include <set>
#include <stdexcept>
#include <sstream>
#include <string>
#include <utility>
Include dependency graph for Pythonize.cxx:

Namespaces

namespace  CPyCppyy
 

Macros

#define COMPLEX_METH_GETSET(name, cppname)
 
#define CPPYY_IMPL_STRING_PYTHONIZATION(type, name)
 
#define CPPYY_IMPL_STRING_PYTHONIZATION_CMP(type, name)
 
#define CPYCPPYY_STRING_FINDMETHOD(name, cppname, pyname)
 
#define PyObject_LengthHint   _PyObject_LengthHint
 

Functions

std::map< std::string, std::vector< PyObject * > > & CPyCppyy::pythonizations ()
 
static bool run_pythonizors (PyObject *pyclass, PyObject *pyname, const std::vector< PyObject * > &v)
 

Macro Definition Documentation

◆ COMPLEX_METH_GETSET

#define COMPLEX_METH_GETSET ( name,
cppname )
Value:
static PyObject* name##ComplexGet(PyObject* self, void*) { \
} \
static int name##ComplexSet(PyObject* self, PyObject* value, void*) { \
return 0; \
} \
return -1; \
} \
PyGetSetDef name##Complex{(char*)#name, (getter)name##ComplexGet, (setter)name##ComplexSet, nullptr, nullptr};
static PyObject * PyObject_CallMethodOneArg(PyObject *obj, PyObject *name, PyObject *arg)
Definition CPyCppyy.h:385
static PyObject * PyObject_CallMethodNoArgs(PyObject *obj, PyObject *name)
Definition CPyCppyy.h:381
_object PyObject
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
char name[80]
Definition TGX11.cxx:110

Definition at line 1473 of file Pythonize.cxx.

◆ CPPYY_IMPL_STRING_PYTHONIZATION

#define CPPYY_IMPL_STRING_PYTHONIZATION ( type,
name )

Definition at line 1136 of file Pythonize.cxx.

◆ CPPYY_IMPL_STRING_PYTHONIZATION_CMP

#define CPPYY_IMPL_STRING_PYTHONIZATION_CMP ( type,
name )
Value:
{ \
int result = 0; \
if (data) { \
} \
return nullptr; \
}
#define PyBytes_Check
Definition CPyCppyy.h:61
#define CPPYY_IMPL_STRING_PYTHONIZATION(type, name)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type

Definition at line 1202 of file Pythonize.cxx.

◆ CPYCPPYY_STRING_FINDMETHOD

#define CPYCPPYY_STRING_FINDMETHOD ( name,
cppname,
pyname )
Value:
{ \
std::string* obj = GetSTLString(self); \
if (!obj) \
return nullptr; \
\
if (cppmeth) { \
PyObject* result = PyObject_Call(cppmeth, args, nullptr); \
if (PyLongOrInt_AsULong64(result) == (PY_ULONG_LONG)std::string::npos) {\
return PyInt_FromLong(-1); \
} \
return result; \
} \
} \
\
PyObject* pystr = CPyCppyy_PyText_FromStringAndSize(obj->data(), obj->size());\
return result; \
}
#define CPyCppyy_PyText_FromStringAndSize
Definition CPyCppyy.h:85
PY_ULONG_LONG PyLongOrInt_AsULong64(PyObject *pyobject)
Definition Utility.cxx:156

Definition at line 1295 of file Pythonize.cxx.

◆ PyObject_LengthHint

#define PyObject_LengthHint   _PyObject_LengthHint

Definition at line 221 of file Pythonize.cxx.

Function Documentation

◆ run_pythonizors()

static bool run_pythonizors ( PyObject * pyclass,
PyObject * pyname,
const std::vector< PyObject * > & v )
inlinestatic

Definition at line 1578 of file Pythonize.cxx.