00001 // @(#)root/pyroot:$Id: PyCallable.h 33356 2010-05-04 00:45:17Z wlav $ 00002 // Author: Wim Lavrijsen, Aug 2004 00003 00004 #ifndef PYROOT_PYCALLABLE_H 00005 #define PYROOT_PYCALLABLE_H 00006 00007 00008 namespace PyROOT { 00009 00010 /** Python callable object interface 00011 @author WLAV 00012 @date 01/27/2009 00013 @version 5.0 00014 */ 00015 00016 class ObjectProxy; 00017 00018 class PyCallable { 00019 public: 00020 virtual ~PyCallable() {} 00021 00022 public: 00023 virtual PyObject* GetSignature() = 0; 00024 virtual PyObject* GetPrototype() = 0; 00025 virtual PyObject* GetDocString() { return GetPrototype(); } 00026 virtual Int_t GetPriority() { return 0; } 00027 00028 virtual Int_t GetMaxArgs() { return 0; } 00029 virtual PyObject* GetArgSpec( Int_t /* iarg */ ) { return 0; } 00030 virtual PyObject* GetArgDefault( Int_t /* iarg */ ) { return 0; } 00031 virtual PyObject* GetScope() { return 0; } 00032 00033 virtual PyCallable* Clone() = 0; 00034 00035 public: 00036 virtual PyObject* operator()( 00037 ObjectProxy* self, PyObject* args, PyObject* kwds, Long_t user = 0 ) = 0; 00038 }; 00039 00040 } // namespace PyROOT 00041 00042 #endif // !PYROOT_PYCALLABLE_H