ROOT  6.06/09
Reference Guide
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
PyROOT::TMethodHolder Class Reference

Definition at line 20 of file TMethodHolder.h.

Public Member Functions

 TMethodHolder (Cppyy::TCppScope_t scope, Cppyy::TCppMethod_t method)
 
 TMethodHolder (const TMethodHolder &)
 
TMethodHolderoperator= (const TMethodHolder &)
 assignment operator More...
 
virtual ~TMethodHolder ()
 destructor More...
 
virtual PyObjectGetSignature ()
 
virtual PyObjectGetPrototype ()
 
virtual Int_t GetPriority ()
 Method priorities exist (in lieu of true overloading) there to prevent void* or <unknown>* from usurping otherwise valid calls. More...
 
virtual Int_t GetMaxArgs ()
 
virtual PyObjectGetCoVarNames ()
 Build a tuple of the argument types/names. More...
 
virtual PyObjectGetArgDefault (Int_t iarg)
 get the default value (if any) of argument iarg of this method More...
 
virtual PyObjectGetScopeProxy ()
 Get or build the scope of this method. More...
 
virtual PyCallableClone ()
 
virtual PyObjectCall (ObjectProxy *&self, PyObject *args, PyObject *kwds, TCallContext *ctxt=0)
 preliminary check in case keywords are accidently used (they are ignored otherwise) More...
 
virtual Bool_t Initialize (TCallContext *ctxt=0)
 done if cache is already setup More...
 
virtual PyObjectPreProcessArgs (ObjectProxy *&self, PyObject *args, PyObject *kwds)
 verify existence of self, return if ok More...
 
virtual Bool_t ConvertAndSetArgs (PyObject *args, TCallContext *ctxt=0)
 
virtual PyObjectExecute (void *self, ptrdiff_t offset, TCallContext *ctxt=0)
 call the interface method More...
 
- Public Member Functions inherited from PyROOT::PyCallable
virtual ~PyCallable ()
 
virtual PyObjectGetDocString ()
 

Protected Member Functions

Cppyy::TCppMethod_t GetMethod ()
 
Cppyy::TCppScope_t GetScope ()
 
TExecutorGetExecutor ()
 
std::string GetSignatureString ()
 built a signature representation (used for doc strings) More...
 
std::string GetReturnTypeName ()
 
virtual Bool_t InitExecutor_ (TExecutor *&, TCallContext *ctxt=0)
 install executor conform to the return type More...
 

Private Member Functions

void Copy_ (const TMethodHolder &)
 
void Destroy_ () const
 destroy executor and argument converters More...
 
PyObjectCallFast (void *, ptrdiff_t, TCallContext *)
 Helper code to prevent some duplication; this is called from CallSafe() as well as directly from TMethodHolder::Execute in fast mode. More...
 
PyObjectCallSafe (void *, ptrdiff_t, TCallContext *)
 Helper code to prevent some code duplication; this code embeds a ROOT "try/catch" block that saves the stack for restoration in case of an otherwise fatal signal. More...
 
Bool_t InitConverters_ ()
 build buffers for argument dispatching More...
 
void SetPyError_ (PyObject *msg)
 helper to report errors in a consistent format (derefs msg) More...
 

Private Attributes

Cppyy::TCppMethod_t fMethod
 
Cppyy::TCppScope_t fScope
 
TExecutorfExecutor
 
std::vector< TConverter * > fConverters
 
Int_t fArgsRequired
 
Bool_t fIsInitialized
 

#include </mnt/vdb/lsf/workspace/root-makedoc-v606/rootspi/rdoc/src/v6-06-00-patches/bindings/pyroot/src/TMethodHolder.h>

+ Inheritance diagram for PyROOT::TMethodHolder:
+ Collaboration diagram for PyROOT::TMethodHolder:

Constructor & Destructor Documentation

PyROOT::TMethodHolder::TMethodHolder ( Cppyy::TCppScope_t  scope,
Cppyy::TCppMethod_t  method 
)

Definition at line 242 of file TMethodHolder.cxx.

Referenced by Clone().

PyROOT::TMethodHolder::TMethodHolder ( const TMethodHolder other)

Definition at line 250 of file TMethodHolder.cxx.

PyROOT::TMethodHolder::~TMethodHolder ( )
virtual

destructor

Definition at line 275 of file TMethodHolder.cxx.

Member Function Documentation

PyObject * PyROOT::TMethodHolder::Call ( ObjectProxy *&  self,
PyObject args,
PyObject kwds,
TCallContext ctxt = 0 
)
virtual

preliminary check in case keywords are accidently used (they are ignored otherwise)

Implements PyROOT::PyCallable.

Reimplemented in PyROOT::TConstructorHolder, PyROOT::TFunctionHolder, and PyROOT::TClassMethodHolder.

Definition at line 540 of file TMethodHolder.cxx.

PyObject * PyROOT::TMethodHolder::CallFast ( void self,
ptrdiff_t  offset,
TCallContext ctxt 
)
inlineprivate

Helper code to prevent some duplication; this is called from CallSafe() as well as directly from TMethodHolder::Execute in fast mode.

Definition at line 63 of file TMethodHolder.cxx.

PyObject * PyROOT::TMethodHolder::CallSafe ( void self,
ptrdiff_t  offset,
TCallContext ctxt 
)
inlineprivate

Helper code to prevent some code duplication; this code embeds a ROOT "try/catch" block that saves the stack for restoration in case of an otherwise fatal signal.

Definition at line 112 of file TMethodHolder.cxx.

virtual PyCallable* PyROOT::TMethodHolder::Clone ( )
inlinevirtual
Bool_t PyROOT::TMethodHolder::ConvertAndSetArgs ( PyObject args,
TCallContext ctxt = 0 
)
virtual

Definition at line 483 of file TMethodHolder.cxx.

Referenced by PyROOT::TClassMethodHolder::Call().

void PyROOT::TMethodHolder::Copy_ ( const TMethodHolder )
inlineprivate

Definition at line 36 of file TMethodHolder.cxx.

Referenced by TMethodHolder().

void PyROOT::TMethodHolder::Destroy_ ( ) const
inlineprivate

destroy executor and argument converters

Definition at line 51 of file TMethodHolder.cxx.

PyObject * PyROOT::TMethodHolder::Execute ( void self,
ptrdiff_t  offset,
TCallContext ctxt = 0 
)
virtual

call the interface method

Definition at line 515 of file TMethodHolder.cxx.

Referenced by PyROOT::TClassMethodHolder::Call().

PyObject * PyROOT::TMethodHolder::GetArgDefault ( Int_t  iarg)
virtual

get the default value (if any) of argument iarg of this method

Implements PyROOT::PyCallable.

Definition at line 391 of file TMethodHolder.cxx.

PyObject * PyROOT::TMethodHolder::GetCoVarNames ( )
virtual

Build a tuple of the argument types/names.

Implements PyROOT::PyCallable.

Definition at line 364 of file TMethodHolder.cxx.

TExecutor* PyROOT::TMethodHolder::GetExecutor ( )
inlineprotected

Definition at line 51 of file TMethodHolder.h.

Int_t PyROOT::TMethodHolder::GetMaxArgs ( )
virtual

Implements PyROOT::PyCallable.

Definition at line 356 of file TMethodHolder.cxx.

Cppyy::TCppMethod_t PyROOT::TMethodHolder::GetMethod ( )
inlineprotected

Definition at line 49 of file TMethodHolder.h.

Int_t PyROOT::TMethodHolder::GetPriority ( )
virtual

Method priorities exist (in lieu of true overloading) there to prevent void* or <unknown>* from usurping otherwise valid calls.

TODO: extend this to favour classes that are not bases.

Implements PyROOT::PyCallable.

Definition at line 297 of file TMethodHolder.cxx.

PyObject * PyROOT::TMethodHolder::GetPrototype ( )
virtual

Implements PyROOT::PyCallable.

Definition at line 282 of file TMethodHolder.cxx.

std::string PyROOT::TMethodHolder::GetReturnTypeName ( )
protected

Definition at line 603 of file TMethodHolder.cxx.

Referenced by PyROOT::TSetItemHolder::InitExecutor_().

Cppyy::TCppScope_t PyROOT::TMethodHolder::GetScope ( )
inlineprotected

Definition at line 50 of file TMethodHolder.h.

PyObject * PyROOT::TMethodHolder::GetScopeProxy ( )
virtual

Get or build the scope of this method.

Implements PyROOT::PyCallable.

Definition at line 416 of file TMethodHolder.cxx.

PyObject * PyROOT::TMethodHolder::GetSignature ( )
virtual

Implements PyROOT::PyCallable.

Definition at line 595 of file TMethodHolder.cxx.

std::string PyROOT::TMethodHolder::GetSignatureString ( )
protected

built a signature representation (used for doc strings)

Definition at line 181 of file TMethodHolder.cxx.

Bool_t PyROOT::TMethodHolder::InitConverters_ ( )
private

build buffers for argument dispatching

Definition at line 130 of file TMethodHolder.cxx.

Bool_t PyROOT::TMethodHolder::InitExecutor_ ( TExecutor *&  executor,
TCallContext ctxt = 0 
)
protectedvirtual

install executor conform to the return type

Reimplemented in PyROOT::TConstructorHolder, and PyROOT::TSetItemHolder.

Definition at line 166 of file TMethodHolder.cxx.

Referenced by PyROOT::TSetItemHolder::InitExecutor_().

Bool_t PyROOT::TMethodHolder::Initialize ( TCallContext ctxt = 0)
virtual

done if cache is already setup

Definition at line 424 of file TMethodHolder.cxx.

Referenced by PyROOT::TClassMethodHolder::Call().

PyROOT::TMethodHolder & PyROOT::TMethodHolder::operator= ( const TMethodHolder other)

assignment operator

Definition at line 260 of file TMethodHolder.cxx.

PyObject * PyROOT::TMethodHolder::PreProcessArgs ( ObjectProxy *&  self,
PyObject args,
PyObject kwds 
)
virtual

verify existence of self, return if ok

Reimplemented in PyROOT::TSetItemHolder, and PyROOT::TFunctionHolder.

Definition at line 447 of file TMethodHolder.cxx.

Referenced by PyROOT::TSetItemHolder::PreProcessArgs().

void PyROOT::TMethodHolder::SetPyError_ ( PyObject msg)
private

helper to report errors in a consistent format (derefs msg)

Definition at line 207 of file TMethodHolder.cxx.

Member Data Documentation

Int_t PyROOT::TMethodHolder::fArgsRequired
private

Definition at line 78 of file TMethodHolder.h.

Referenced by Copy_().

std::vector< TConverter* > PyROOT::TMethodHolder::fConverters
private

Definition at line 75 of file TMethodHolder.h.

TExecutor* PyROOT::TMethodHolder::fExecutor
private

Definition at line 72 of file TMethodHolder.h.

Referenced by Copy_(), and GetExecutor().

Bool_t PyROOT::TMethodHolder::fIsInitialized
private

Definition at line 81 of file TMethodHolder.h.

Referenced by Copy_().

Cppyy::TCppMethod_t PyROOT::TMethodHolder::fMethod
private

Definition at line 70 of file TMethodHolder.h.

Referenced by GetMethod(), and operator=().

Cppyy::TCppScope_t PyROOT::TMethodHolder::fScope
private

Definition at line 71 of file TMethodHolder.h.

Referenced by GetScope(), and operator=().


The documentation for this class was generated from the following files: