Logo ROOT   6.10/09
Reference Guide
List of all members | 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 &)
 
virtual ~TMethodHolder ()
 destructor More...
 
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 PyCallableClone ()
 
virtual Bool_t ConvertAndSetArgs (PyObject *args, TCallContext *ctxt=0)
 
virtual PyObjectExecute (void *self, ptrdiff_t offset, TCallContext *ctxt=0)
 call the interface method More...
 
virtual PyObjectGetArgDefault (Int_t iarg)
 get the default value (if any) of argument iarg of this method More...
 
virtual PyObjectGetCoVarNames ()
 Build a tuple of the argument types/names. More...
 
virtual Int_t GetMaxArgs ()
 
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 PyObjectGetPrototype ()
 
virtual PyObjectGetScopeProxy ()
 Get or build the scope of this method. More...
 
virtual PyObjectGetSignature ()
 
virtual Bool_t Initialize (TCallContext *ctxt=0)
 done if cache is already setup More...
 
TMethodHolderoperator= (const TMethodHolder &)
 assignment operator More...
 
virtual PyObjectPreProcessArgs (ObjectProxy *&self, PyObject *args, PyObject *kwds)
 verify existence of self, return if ok More...
 
- Public Member Functions inherited from PyROOT::PyCallable
virtual ~PyCallable ()
 
virtual PyObjectGetDocString ()
 

Protected Member Functions

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

Private Member Functions

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...
 
void Copy_ (const TMethodHolder &)
 
void Destroy_ () const
 destroy executor and argument converters 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

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

#include </mnt/build/workspace/root-makedoc-v610/rootspi/rdoc/src/v6-10-00-patches/bindings/pyroot/src/TMethodHolder.h>

Inheritance diagram for PyROOT::TMethodHolder:
[legend]

Constructor & Destructor Documentation

◆ TMethodHolder() [1/2]

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

Definition at line 246 of file TMethodHolder.cxx.

◆ TMethodHolder() [2/2]

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

Definition at line 254 of file TMethodHolder.cxx.

◆ ~TMethodHolder()

PyROOT::TMethodHolder::~TMethodHolder ( )
virtual

destructor

Definition at line 279 of file TMethodHolder.cxx.

Member Function Documentation

◆ Call()

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 544 of file TMethodHolder.cxx.

◆ CallFast()

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 64 of file TMethodHolder.cxx.

◆ CallSafe()

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 116 of file TMethodHolder.cxx.

◆ Clone()

virtual PyCallable* PyROOT::TMethodHolder::Clone ( )
inlinevirtual

◆ ConvertAndSetArgs()

Bool_t PyROOT::TMethodHolder::ConvertAndSetArgs ( PyObject args,
TCallContext ctxt = 0 
)
virtual

Definition at line 487 of file TMethodHolder.cxx.

◆ Copy_()

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

Definition at line 37 of file TMethodHolder.cxx.

◆ Destroy_()

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

destroy executor and argument converters

Definition at line 52 of file TMethodHolder.cxx.

◆ Execute()

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

call the interface method

Definition at line 519 of file TMethodHolder.cxx.

◆ GetArgDefault()

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 395 of file TMethodHolder.cxx.

◆ GetCoVarNames()

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

Build a tuple of the argument types/names.

Implements PyROOT::PyCallable.

Definition at line 368 of file TMethodHolder.cxx.

◆ GetExecutor()

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

Definition at line 51 of file TMethodHolder.h.

◆ GetMaxArgs()

Int_t PyROOT::TMethodHolder::GetMaxArgs ( )
virtual

Implements PyROOT::PyCallable.

Definition at line 360 of file TMethodHolder.cxx.

◆ GetMethod()

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

Definition at line 49 of file TMethodHolder.h.

◆ GetPriority()

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 301 of file TMethodHolder.cxx.

◆ GetPrototype()

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

Implements PyROOT::PyCallable.

Definition at line 286 of file TMethodHolder.cxx.

◆ GetReturnTypeName()

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

Definition at line 607 of file TMethodHolder.cxx.

◆ GetScope()

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

Definition at line 50 of file TMethodHolder.h.

◆ GetScopeProxy()

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

Get or build the scope of this method.

Implements PyROOT::PyCallable.

Definition at line 420 of file TMethodHolder.cxx.

◆ GetSignature()

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

Implements PyROOT::PyCallable.

Definition at line 599 of file TMethodHolder.cxx.

◆ GetSignatureString()

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

built a signature representation (used for doc strings)

Definition at line 185 of file TMethodHolder.cxx.

◆ InitConverters_()

Bool_t PyROOT::TMethodHolder::InitConverters_ ( )
private

build buffers for argument dispatching

Definition at line 134 of file TMethodHolder.cxx.

◆ InitExecutor_()

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 170 of file TMethodHolder.cxx.

◆ Initialize()

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

done if cache is already setup

Definition at line 428 of file TMethodHolder.cxx.

◆ operator=()

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

assignment operator

Definition at line 264 of file TMethodHolder.cxx.

◆ PreProcessArgs()

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 451 of file TMethodHolder.cxx.

◆ SetPyError_()

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

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

Definition at line 211 of file TMethodHolder.cxx.

Member Data Documentation

◆ fArgsRequired

Int_t PyROOT::TMethodHolder::fArgsRequired
private

Definition at line 78 of file TMethodHolder.h.

◆ fConverters

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

Definition at line 75 of file TMethodHolder.h.

◆ fExecutor

TExecutor* PyROOT::TMethodHolder::fExecutor
private

Definition at line 72 of file TMethodHolder.h.

◆ fIsInitialized

Bool_t PyROOT::TMethodHolder::fIsInitialized
private

Definition at line 81 of file TMethodHolder.h.

◆ fMethod

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

Definition at line 70 of file TMethodHolder.h.

◆ fScope

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

Definition at line 71 of file TMethodHolder.h.


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