Logo ROOT   master
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 
8 namespace CPyCppyy {
9 
10 class CPPInstance;
11 
12 class PyCallable {
13 public:
14  virtual ~PyCallable() {}
15 
16 public:
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 
33 public:
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
virtual int GetPriority()=0
virtual PyObject * GetCoVarNames()=0
virtual PyCallable * Clone()=0
virtual PyObject * GetPrototype(bool show_formalargs=true)=0
virtual Cppyy::TCppFuncAddr_t GetFunctionAddress()=0
virtual PyObject * Call(CPPInstance *&self, PyObject *args, PyObject *kwds, CallContext *ctxt=nullptr)=0
virtual PyObject * GetDocString()
Definition: PyCallable.h:19
virtual bool IsGreedy()=0
virtual PyObject * GetSignature(bool show_formalargs=true)=0
virtual PyObject * GetScopeProxy()=0
virtual PyObject * GetArgDefault(int)=0
void * TCppFuncAddr_t
Definition: cpp_cppyy.h:25
virtual ~PyCallable()
Definition: PyCallable.h:14
virtual int GetMaxArgs()=0
_object PyObject
Definition: PyResult.h:13