43#if PY_VERSION_HEX >= 0x03080000
76 "takes at least %d arguments (%zd given)", fArgsRequired,
actual));
94 fArgIndices =
nullptr;
102 if (fExecutor && fExecutor->HasState())
delete fExecutor;
106 if (
p &&
p->HasState())
delete p;
110 delete fArgIndices; fArgIndices =
nullptr;
127 }
catch (std::exception&
e) {
207 std::cerr <<
"Python exception outstanding during C++ longjmp:" << std::endl;
209 std::cerr << std::endl;
338 fMethod(
method), fScope(
scope), fExecutor(nullptr), fArgIndices(nullptr),
354 if (
this != &
other) {
357 fScope =
other.fScope;
358 fMethod =
other.fMethod;
407 GetSignatureString(fa).c_str());
424 std::string
rtn = GetReturnTypeName();
521 if (
aname.find(
"initializer_list") != std::string::npos) {
523 }
else if (
aname.rfind(
"&&",
aname.size()-2) != std::string::npos) {
554 if (!
nArgs)
return false;
558 if (
aname.find(
"void*") != 0)
599 if (
iarg >= (
int)GetMaxArgs())
614 if (
defvalue.rfind(
'(') != std::string::npos) {
642 if (
c ==
'F' ||
c ==
'D' ||
c ==
'L') {
710 for (
int i = 0; i <
n; i++) {
736 if (fArgsRequired != -1)
739 if (!InitConverters_())
742 if (!InitExecutor_(fExecutor,
ctxt))
754#if PY_VERSION_HEX >= 0x03080000
772 fArgIndices =
new std::map<std::string, int>{};
787#if PY_VERSION_HEX >= 0x03080000
800 auto p = fArgIndices->find(
ckey);
801 if (
p == fArgIndices->
end()) {
849 item = GetArgDefault((
int)i,
false );
858#if PY_VERSION_HEX >= 0x03080000
859 if (
cargs.fFlags & PyCallArgs::kDoFree) {
870#if PY_VERSION_HEX >= 0x03080000
871 cargs.fFlags = PyCallArgs::kDoFree | PyCallArgs::kDoItemDecref;
884 if (
cargs.fKwds) {
return ProcessKwds(
nullptr,
cargs); }
905#if PY_VERSION_HEX >= 0x03080000
918 return ProcessKwds(
nullptr,
cargs);
926 "unbound method %s::%s must be called with a %s instance as first argument",
936 if (!VerifyArgCount_(
argc))
940 ctxt->fCurScope = fScope;
948 for (
int i = 0; i < (
int)
argc; ++i) {
985 if (fArgsRequired == -1 && !Initialize(
ctxt))
990 if (!ProcessArgs(
cargs))
994 if (!
ctxt->fPyContext)
1004 void*
object =
self->GetObject();
static void CPyCppyy_PyArgs_DEL(CPyCppyy_PyArgs_t args)
static PyObject * CPyCppyy_PyArgs_SET_ITEM(CPyCppyy_PyArgs_t args, Py_ssize_t i, PyObject *item)
#define CPyCppyy_PyText_AsString
static Py_ssize_t CPyCppyy_PyArgs_GET_SIZE(CPyCppyy_PyArgs_t args, size_t)
PyObject * CPyCppyy_PyArgs_t
#define CPyCppyy_PyText_AppendAndDel
#define CPyCppyy_PyText_FromFormat
#define CPyCppyy_PyText_AsStringChecked
static CPyCppyy_PyArgs_t CPyCppyy_PyArgs_New(Py_ssize_t N)
#define CPyCppyy_PyText_FromString
static PyObject * CPyCppyy_PyArgs_GET_ITEM(CPyCppyy_PyArgs_t args, Py_ssize_t i)
#define CPyCppyy_PyText_Check
std::vector< Converter * > fConverters
#define CLING_EXCEPTION_ENDTRY
#define CLING_EXCEPTION_CATCH(n)
#define CLING_EXCEPTION_TRY
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
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 offset
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 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 cname
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
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 req_type
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
std::string GetReturnTypeName()
bool Initialize(CallContext *ctxt=nullptr)
bool ProcessKwds(PyObject *self_in, PyCallArgs &args)
void SetPyError_(PyObject *msg)
virtual PyObject * GetSignature(bool show_formalargs=true)
virtual bool ProcessArgs(PyCallArgs &args)
virtual PyObject * Reflex(Cppyy::Reflex::RequestId_t request, Cppyy::Reflex::FormatId_t=Cppyy::Reflex::OPTIMAL)
virtual int GetArgMatchScore(PyObject *args_tuple)
virtual bool InitExecutor_(Executor *&, CallContext *ctxt=nullptr)
virtual PyObject * GetPrototype(bool show_formalargs=true)
Construct a Python string from the method's prototype.
std::string GetSignatureString(bool show_formalargs=true)
PyObject * ExecuteProtected(void *, ptrdiff_t, CallContext *)
bool ConvertAndSetArgs(CPyCppyy_PyArgs_t, size_t nargsf, CallContext *ctxt=nullptr)
virtual PyObject * GetCoVarNames()
virtual PyObject * GetScopeProxy()
PyObject * ExecuteFast(void *, ptrdiff_t, CallContext *)
PyObject * Execute(void *self, ptrdiff_t offset, CallContext *ctxt=nullptr)
void Copy_(const CPPMethod &)
virtual int GetPriority()
virtual PyObject * Call(CPPInstance *&self, CPyCppyy_PyArgs_t args, size_t nargsf, PyObject *kwds, CallContext *ctxt=nullptr)
virtual PyObject * GetArgDefault(int iarg, bool silent=true)
bool VerifyArgCount_(Py_ssize_t)
CPPMethod & operator=(const CPPMethod &)
CPPMethod(Cppyy::TCppScope_t scope, Cppyy::TCppMethod_t method)
virtual PyObject * GetTypeName()
virtual Cppyy::TCppFuncAddr_t GetFunctionAddress()
virtual PyObject * Reflex(Cppyy::Reflex::RequestId_t request, Cppyy::Reflex::FormatId_t format=Cppyy::Reflex::OPTIMAL)
const_iterator end() const
void cppscope_to_pyscope(std::string &cppscope)
std::string clean_type(const std::string &cppname, bool template_strip=true, bool const_strip=true)
std::string extract_namespace(const std::string &name)
PyObject * gAbrtException
PyTypeObject CPPExcInstance_Type
PyObject * GetScopeProxy(Cppyy::TCppScope_t)
PyObject * CreateScopeProxy(Cppyy::TCppScope_t, const unsigned flags=0)
PyObject * gSegvException
PyObject * BindCppObjectNoCast(Cppyy::TCppObject_t object, Cppyy::TCppType_t klass, const unsigned flags=0)
CPYCPPYY_EXTERN Executor * CreateExecutor(const std::string &name, cdims_t=0)
bool CPPInstance_Check(T *object)
CPYCPPYY_EXTERN Converter * CreateConverter(const std::string &name, cdims_t=0)
const RequestId_t RETURN_TYPE
const FormatId_t AS_STRING
RPY_EXPORTED TCppIndex_t CompareMethodArgType(TCppMethod_t, TCppIndex_t iarg, const std::string &req_type)
RPY_EXPORTED ptrdiff_t GetBaseOffset(TCppType_t derived, TCppType_t base, TCppObject_t address, int direction, bool rerror=false)
RPY_EXPORTED TCppIndex_t GetMethodReqArgs(TCppMethod_t)
RPY_EXPORTED bool IsEnum(const std::string &type_name)
RPY_EXPORTED std::string GetMethodName(TCppMethod_t)
RPY_EXPORTED TCppScope_t gGlobalScope
RPY_EXPORTED std::string GetMethodSignature(TCppMethod_t, bool show_formalargs, TCppIndex_t maxargs=(TCppIndex_t) -1)
RPY_EXPORTED bool IsSubtype(TCppType_t derived, TCppType_t base)
RPY_EXPORTED std::string GetMethodArgName(TCppMethod_t, TCppIndex_t iarg)
RPY_EXPORTED TCppIndex_t GetMethodNumArgs(TCppMethod_t)
RPY_EXPORTED TCppType_t GetActualClass(TCppType_t klass, TCppObject_t obj)
RPY_EXPORTED std::string GetScopedFinalName(TCppType_t type)
RPY_EXPORTED std::string GetMethodArgType(TCppMethod_t, TCppIndex_t iarg)
RPY_EXPORTED bool IsComplete(const std::string &type_name)
RPY_EXPORTED bool IsBuiltin(const std::string &type_name)
RPY_EXPORTED bool IsStaticMethod(TCppMethod_t method)
RPY_EXPORTED TCppScope_t GetScope(const std::string &scope_name)
RPY_EXPORTED bool IsConstMethod(TCppMethod_t)
RPY_EXPORTED TCppFuncAddr_t GetFunctionAddress(TCppMethod_t method, bool check_enabled=true)
RPY_EXPORTED TCppIndex_t GetNumBasesLongestBranch(TCppType_t type)
Retrieve number of base classes in the longest branch of the inheritance tree.
RPY_EXPORTED std::string GetMethodResultType(TCppMethod_t)
RPY_EXPORTED std::string GetFinalName(TCppType_t type)
RPY_EXPORTED std::string GetMethodArgDefault(TCppMethod_t, TCppIndex_t iarg)
static ECallFlags sSignalPolicy