30 clName.c_str(), clName.c_str(), this->GetMethod() ? this->GetSignatureString().c_str() :
"()");
55 if (fArgsRequired == -1 && !this->Initialize(ctxt))
59 if (!(args = this->PreProcessArgs(self, args, kwds)))
65 PyErr_SetString(PyExc_ReferenceError,
"no python object allocated");
71 PyErr_SetString(PyExc_ReferenceError,
72 "object already constructed; use __assign__ instead of __init__");
78 ptrdiff_t address = 0;
79 if (GetScope() != disp) {
84 if (!GetScope() || !disp) {
85 PyErr_SetString(PyExc_TypeError,
"can not construct incomplete C++ class");
92 PyErr_SetString(PyExc_TypeError,
"dispatcher proxy was never created");
96 PyObject* pyobj = PyObject_Call(dispproxy, args, kwds);
101 address = (ptrdiff_t)((
CPPInstance*)pyobj)->GetObject();
104 PyObject* res = PyObject_CallMethodObjArgs(
109 Py_DECREF(dispproxy);
113 if (!this->ConvertAndSetArgs(args, ctxt)) {
118 address = (ptrdiff_t)this->Execute(
nullptr, 0, ctxt);
130 self->
Set((
void*)address);
152 if (!PyErr_Occurred())
153 PyErr_SetString(PyExc_TypeError,
const_cast<char*
>(
167 if (self && GetScope() != self->
ObjectIsA()) {
172 PyErr_Format(PyExc_TypeError,
"cannot instantiate abstract class \'%s\'"
173 " (from derived classes, use super() instead)",
183 PyErr_Format(PyExc_TypeError,
"cannot instantiate namespace \'%s\'",
193 PyErr_Format(PyExc_TypeError,
"cannot instantiate incomplete class \'%s\'",
#define Py_SET_TYPE(ob, type)
#define CPyCppyy_PyText_FromFormat
#define CPyCppyy_PyText_FromString
Cppyy::TCppType_t fUnderlyingType
std::ios_base::fmtflags fFlags
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 format
virtual PyObject * Call(CPPInstance *&, PyObject *, PyObject *, CallContext *=nullptr)
virtual PyObject * GetDocString()
virtual bool InitExecutor_(Executor *&, CallContext *ctxt=nullptr)
virtual PyObject * Reflex(Cppyy::Reflex::RequestId_t, Cppyy::Reflex::FormatId_t=Cppyy::Reflex::OPTIMAL)
virtual PyObject * Call(CPPInstance *&self, PyObject *args, PyObject *kwds, CallContext *ctxt=nullptr)
virtual PyObject * Call(CPPInstance *&, PyObject *, PyObject *, CallContext *=nullptr)
void Set(void *address, EFlags flags=kDefault)
void SetSmart(PyObject *smart_type)
Cppyy::TCppType_t ObjectIsA(bool check_smart=true) const
virtual PyObject * Call(CPPInstance *&, PyObject *, PyObject *, CallContext *=nullptr)
static bool RegisterPyObject(CPPInstance *pyobj, void *cppobj)
virtual PyObject * Reflex(Cppyy::Reflex::RequestId_t request, Cppyy::Reflex::FormatId_t format=Cppyy::Reflex::OPTIMAL)
PyObject * GetScopeProxy(Cppyy::TCppScope_t)
CPYCPPYY_EXTERN Executor * CreateExecutor(const std::string &name)
PyObject * CreateScopeProxy(Cppyy::TCppScope_t)
const RequestId_t RETURN_TYPE
const FormatId_t AS_STRING
RPY_EXPORTED std::string GetScopedFinalName(TCppType_t type)
RPY_EXPORTED std::string GetFinalName(TCppType_t type)