00001 // Author: Wim Lavrijsen, Apr 2005 00002 00003 #ifndef PYROOT_TFUNCTIONHOLDER_H 00004 #define PYROOT_TFUNCTIONHOLDER_H 00005 00006 // ROOT 00007 class TFunction; 00008 00009 // Bindings 00010 #include "MethodHolder.h" 00011 00012 00013 namespace PyROOT { 00014 00015 /** Python side ROOT global function 00016 @author WLAV 00017 @date 08/03/2004 00018 @version 4.0 00019 */ 00020 00021 template< class T, class M > 00022 class TFunctionHolder : public TMethodHolder< T, M > { 00023 public: 00024 TFunctionHolder( const M& function ); 00025 TFunctionHolder( const T& scope, const M& function ); 00026 00027 virtual PyCallable* Clone() { return new TFunctionHolder( *this ); } 00028 00029 virtual PyObject* FilterArgs( ObjectProxy*& self, PyObject* args, PyObject* kwds ); 00030 virtual PyObject* operator()( ObjectProxy*, PyObject* args, PyObject* kwds, Long_t = 0 ); 00031 }; 00032 00033 } // namespace PyROOT 00034 00035 #endif // !PYROOT_TFUNCTIONHOLDER_H