Logo ROOT  
Reference Guide
PyCallable.h
Go to the documentation of this file.
1#ifndef CPYCPPYY_PYCALLABLE_H
2#define CPYCPPYY_PYCALLABLE_H
3
4// Bindings
5#include "CallContext.h"
6
7
8namespace CPyCppyy {
9
10class CPPInstance;
11
13public:
14 virtual ~PyCallable() {}
15
16public:
17 virtual PyObject* GetSignature(bool show_formalargs = true) = 0;
18 virtual PyObject* GetPrototype(bool show_formalargs = true) = 0;
19 virtual PyObject* GetDocString() { return GetPrototype(); }
20
21 virtual int GetPriority() = 0;
22 virtual bool IsGreedy() = 0;
23
24 virtual int GetMaxArgs() = 0;
25 virtual PyObject* GetCoVarNames() = 0;
26 virtual PyObject* GetArgDefault(int /* iarg */) = 0;
27
28 virtual PyObject* GetScopeProxy() = 0;
30
31 virtual PyCallable* Clone() = 0;
32
33public:
34 virtual PyObject* Call(
35 CPPInstance*& self, PyObject* args, PyObject* kwds, CallContext* ctxt = nullptr) = 0;
36};
37
38} // namespace CPyCppyy
39
40#endif // !CPYCPPYY_PYCALLABLE_H
_object PyObject
Definition: PyMethodBase.h:42
virtual PyObject * GetScopeProxy()=0
virtual PyObject * GetCoVarNames()=0
virtual PyObject * GetDocString()
Definition: PyCallable.h:19
virtual ~PyCallable()
Definition: PyCallable.h:14
virtual PyObject * GetPrototype(bool show_formalargs=true)=0
virtual PyCallable * Clone()=0
virtual PyObject * GetSignature(bool show_formalargs=true)=0
virtual int GetPriority()=0
virtual bool IsGreedy()=0
virtual int GetMaxArgs()=0
virtual PyObject * Call(CPPInstance *&self, PyObject *args, PyObject *kwds, CallContext *ctxt=nullptr)=0
virtual PyObject * GetArgDefault(int)=0
virtual Cppyy::TCppFuncAddr_t GetFunctionAddress()=0
Set of helper functions that are invoked from the pythonizors, on the Python side.
void * TCppFuncAddr_t
Definition: cpp_cppyy.h:25