Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
CPyCppyy::CPPMethod Class Reference

Definition at line 45 of file CPPMethod.h.

Public Member Functions

 CPPMethod (const CPPMethod &)
 
 CPPMethod (Cppyy::TCppScope_t scope, Cppyy::TCppMethod_t method)
 
virtual ~CPPMethod ()
 
virtual PyObjectCall (CPPInstance *&self, CPyCppyy_PyArgs_t args, size_t nargsf, PyObject *kwds, CallContext *ctxt=nullptr)
 
virtual PyCallableClone ()
 
virtual PyObjectGetArgDefault (int iarg, bool silent=true)
 
virtual int GetArgMatchScore (PyObject *args_tuple)
 
virtual PyObjectGetCoVarNames ()
 
virtual Cppyy::TCppFuncAddr_t GetFunctionAddress ()
 
virtual int GetMaxArgs ()
 
virtual int GetPriority ()
 
virtual PyObjectGetPrototype (bool show_formalargs=true)
 Construct a Python string from the method's prototype.
 
virtual PyObjectGetScopeProxy ()
 
virtual PyObjectGetSignature (bool show_formalargs=true)
 
virtual PyObjectGetTypeName ()
 
virtual bool IsConst ()
 
virtual bool IsGreedy ()
 
CPPMethodoperator= (const CPPMethod &)
 
virtual PyObjectReflex (Cppyy::Reflex::RequestId_t request, Cppyy::Reflex::FormatId_t=Cppyy::Reflex::OPTIMAL)
 
- Public Member Functions inherited from CPyCppyy::PyCallable
virtual ~PyCallable ()
 
virtual PyObjectGetDocString ()
 

Protected Member Functions

bool ConvertAndSetArgs (CPyCppyy_PyArgs_t, size_t nargsf, CallContext *ctxt=nullptr)
 
PyObjectExecute (void *self, ptrdiff_t offset, CallContext *ctxt=nullptr)
 
ExecutorGetExecutor ()
 
Cppyy::TCppMethod_t GetMethod ()
 
std::string GetReturnTypeName ()
 
Cppyy::TCppScope_t GetScope ()
 
std::string GetSignatureString (bool show_formalargs=true)
 
virtual bool InitExecutor_ (Executor *&, CallContext *ctxt=nullptr)
 
bool Initialize (CallContext *ctxt=nullptr)
 
virtual bool ProcessArgs (PyCallArgs &args)
 
bool ProcessKwds (PyObject *self_in, PyCallArgs &args)
 

Protected Attributes

int fArgsRequired
 

Private Member Functions

void Copy_ (const CPPMethod &)
 
void Destroy_ ()
 
PyObjectExecuteFast (void *, ptrdiff_t, CallContext *)
 
PyObjectExecuteProtected (void *, ptrdiff_t, CallContext *)
 
bool InitConverters_ ()
 
void SetPyError_ (PyObject *msg)
 
bool VerifyArgCount_ (Py_ssize_t)
 

Private Attributes

std::map< std::string, int > * fArgIndices
 
std::vector< Converter * > fConverters
 
ExecutorfExecutor
 
Cppyy::TCppMethod_t fMethod
 
Cppyy::TCppScope_t fScope
 

#include </home/sftnight/build/workspace/root-makedoc-master/rootspi/rdoc/src/master/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h>

Inheritance diagram for CPyCppyy::CPPMethod:
[legend]

Constructor & Destructor Documentation

◆ CPPMethod() [1/2]

CPyCppyy::CPPMethod::CPPMethod ( Cppyy::TCppScope_t  scope,
Cppyy::TCppMethod_t  method 
)

Definition at line 336 of file CPPMethod.cxx.

◆ CPPMethod() [2/2]

CPyCppyy::CPPMethod::CPPMethod ( const CPPMethod other)

Definition at line 345 of file CPPMethod.cxx.

◆ ~CPPMethod()

CPyCppyy::CPPMethod::~CPPMethod ( )
virtual

Definition at line 365 of file CPPMethod.cxx.

Member Function Documentation

◆ Call()

◆ Clone()

◆ ConvertAndSetArgs()

bool CPyCppyy::CPPMethod::ConvertAndSetArgs ( CPyCppyy_PyArgs_t  args,
size_t  nargsf,
CallContext ctxt = nullptr 
)
protected

Definition at line 918 of file CPPMethod.cxx.

◆ Copy_()

void CPyCppyy::CPPMethod::Copy_ ( const CPPMethod )
inlineprivate

Definition at line 88 of file CPPMethod.cxx.

◆ Destroy_()

void CPyCppyy::CPPMethod::Destroy_ ( )
inlineprivate

Definition at line 99 of file CPPMethod.cxx.

◆ Execute()

PyObject * CPyCppyy::CPPMethod::Execute ( void *  self,
ptrdiff_t  offset,
CallContext ctxt = nullptr 
)
protected

Definition at line 945 of file CPPMethod.cxx.

◆ ExecuteFast()

PyObject * CPyCppyy::CPPMethod::ExecuteFast ( void *  self,
ptrdiff_t  offset,
CallContext ctxt 
)
inlineprivate

Definition at line 115 of file CPPMethod.cxx.

◆ ExecuteProtected()

PyObject * CPyCppyy::CPPMethod::ExecuteProtected ( void *  self,
ptrdiff_t  offset,
CallContext ctxt 
)
inlineprivate

Definition at line 194 of file CPPMethod.cxx.

◆ GetArgDefault()

PyObject * CPyCppyy::CPPMethod::GetArgDefault ( int  iarg,
bool  silent = true 
)
virtual

Implements CPyCppyy::PyCallable.

Definition at line 596 of file CPPMethod.cxx.

◆ GetArgMatchScore()

int CPyCppyy::CPPMethod::GetArgMatchScore ( PyObject args_tuple)
virtual

Reimplemented from CPyCppyy::PyCallable.

Definition at line 684 of file CPPMethod.cxx.

◆ GetCoVarNames()

PyObject * CPyCppyy::CPPMethod::GetCoVarNames ( )
virtual

Implements CPyCppyy::PyCallable.

Definition at line 572 of file CPPMethod.cxx.

◆ GetExecutor()

Executor * CPyCppyy::CPPMethod::GetExecutor ( )
inlineprotected

Definition at line 88 of file CPPMethod.h.

◆ GetFunctionAddress()

Cppyy::TCppFuncAddr_t CPyCppyy::CPPMethod::GetFunctionAddress ( )
virtual

Implements CPyCppyy::PyCallable.

Definition at line 677 of file CPPMethod.cxx.

◆ GetMaxArgs()

int CPyCppyy::CPPMethod::GetMaxArgs ( )
virtual

Implements CPyCppyy::PyCallable.

Definition at line 566 of file CPPMethod.cxx.

◆ GetMethod()

Cppyy::TCppMethod_t CPyCppyy::CPPMethod::GetMethod ( )
inlineprotected

Definition at line 86 of file CPPMethod.h.

◆ GetPriority()

int CPyCppyy::CPPMethod::GetPriority ( )
virtual

Implements CPyCppyy::PyCallable.

Definition at line 441 of file CPPMethod.cxx.

◆ GetPrototype()

PyObject * CPyCppyy::CPPMethod::GetPrototype ( bool  fa = true)
virtual

Construct a Python string from the method's prototype.

Parameters
faShow formal arguments of the method
Returns
PyObject* A Python string with the full method prototype, namespaces included.

For example, given:

int foo(int x);

namespace a { namespace b { namespace c { int foo(int x); }}}

This function returns:

'int foo(int x)' 'int a::b::c::foo(int x)'

Implements CPyCppyy::PyCallable.

Definition at line 393 of file CPPMethod.cxx.

◆ GetReturnTypeName()

std::string CPyCppyy::CPPMethod::GetReturnTypeName ( )
protected

Definition at line 1033 of file CPPMethod.cxx.

◆ GetScope()

Cppyy::TCppScope_t CPyCppyy::CPPMethod::GetScope ( )
inlineprotected

Definition at line 87 of file CPPMethod.h.

◆ GetScopeProxy()

PyObject * CPyCppyy::CPPMethod::GetScopeProxy ( )
virtual

Implements CPyCppyy::PyCallable.

Definition at line 669 of file CPPMethod.cxx.

◆ GetSignature()

PyObject * CPyCppyy::CPPMethod::GetSignature ( bool  show_formalargs = true)
virtual

Implements CPyCppyy::PyCallable.

Definition at line 1026 of file CPPMethod.cxx.

◆ GetSignatureString()

std::string CPyCppyy::CPPMethod::GetSignatureString ( bool  show_formalargs = true)
protected

Definition at line 268 of file CPPMethod.cxx.

◆ GetTypeName()

PyObject * CPyCppyy::CPPMethod::GetTypeName ( )
virtual

Reimplemented from CPyCppyy::PyCallable.

Definition at line 411 of file CPPMethod.cxx.

◆ InitConverters_()

bool CPyCppyy::CPPMethod::InitConverters_ ( )
private

Definition at line 232 of file CPPMethod.cxx.

◆ InitExecutor_()

bool CPyCppyy::CPPMethod::InitExecutor_ ( Executor *&  executor,
CallContext ctxt = nullptr 
)
protectedvirtual

Reimplemented in CPyCppyy::CPPConstructor, and CPyCppyy::CPPSetItem.

Definition at line 254 of file CPPMethod.cxx.

◆ Initialize()

bool CPyCppyy::CPPMethod::Initialize ( CallContext ctxt = nullptr)
protected

Definition at line 718 of file CPPMethod.cxx.

◆ IsConst()

bool CPyCppyy::CPPMethod::IsConst ( )
virtual

Reimplemented from CPyCppyy::PyCallable.

Definition at line 663 of file CPPMethod.cxx.

◆ IsGreedy()

bool CPyCppyy::CPPMethod::IsGreedy ( )
virtual

Implements CPyCppyy::PyCallable.

Definition at line 547 of file CPPMethod.cxx.

◆ operator=()

CPyCppyy::CPPMethod & CPyCppyy::CPPMethod::operator= ( const CPPMethod other)

Definition at line 352 of file CPPMethod.cxx.

◆ ProcessArgs()

bool CPyCppyy::CPPMethod::ProcessArgs ( PyCallArgs args)
protectedvirtual

◆ ProcessKwds()

bool CPyCppyy::CPPMethod::ProcessKwds ( PyObject self_in,
PyCallArgs args 
)
protected

Definition at line 737 of file CPPMethod.cxx.

◆ Reflex()

PyObject * CPyCppyy::CPPMethod::Reflex ( Cppyy::Reflex::RequestId_t  request,
Cppyy::Reflex::FormatId_t  format = Cppyy::Reflex::OPTIMAL 
)
virtual

Reimplemented from CPyCppyy::PyCallable.

Reimplemented in CPyCppyy::CPPConstructor.

Definition at line 419 of file CPPMethod.cxx.

◆ SetPyError_()

void CPyCppyy::CPPMethod::SetPyError_ ( PyObject msg)
private

Definition at line 275 of file CPPMethod.cxx.

◆ VerifyArgCount_()

bool CPyCppyy::CPPMethod::VerifyArgCount_ ( Py_ssize_t  actual)
inlineprivate

Definition at line 68 of file CPPMethod.cxx.

Member Data Documentation

◆ fArgIndices

std::map<std::string, int>* CPyCppyy::CPPMethod::fArgIndices
private

Definition at line 114 of file CPPMethod.h.

◆ fArgsRequired

int CPyCppyy::CPPMethod::fArgsRequired
protected

Definition at line 118 of file CPPMethod.h.

◆ fConverters

std::vector<Converter*> CPyCppyy::CPPMethod::fConverters
private

Definition at line 113 of file CPPMethod.h.

◆ fExecutor

Executor* CPyCppyy::CPPMethod::fExecutor
private

Definition at line 110 of file CPPMethod.h.

◆ fMethod

Cppyy::TCppMethod_t CPyCppyy::CPPMethod::fMethod
private

Definition at line 108 of file CPPMethod.h.

◆ fScope

Cppyy::TCppScope_t CPyCppyy::CPPMethod::fScope
private

Definition at line 109 of file CPPMethod.h.

  • bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h
  • bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx