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

Definition at line 11 of file CPPFunction.h.

Public Member Functions

PyObjectCall (CPPInstance *&self, CPyCppyy_PyArgs_t args, size_t nargsf, PyObject *kwds, CallContext *ctxt=nullptr) override
PyCallableClone () override
 CPPMethod (const CPPMethod &)
 CPPMethod (Cppyy::TCppScope_t scope, Cppyy::TCppMethod_t method)
PyObjectGetArgDefault (int iarg, bool silent=true) override
int GetArgMatchScore (PyObject *args_tuple) override
PyObjectGetCoVarNames () override
virtual PyObjectGetDocString ()
Cppyy::TCppFuncAddr_t GetFunctionAddress () override
int GetMaxArgs () override
int GetPriority () override
PyObjectGetPrototype (bool show_formalargs=true) override
 Construct a Python string from the method's prototype.
PyObjectGetScopeProxy () override
PyObjectGetSignature (bool show_formalargs=true) override
PyObjectGetSignatureNames () override
 Returns a tuple with the names of the input parameters of this method.
PyObjectGetSignatureTypes () override
 Returns a dictionary with the types of the signature of this method.
PyObjectGetTypeName () override
bool IsConst () override
bool IsGreedy () override
PyObjectReflex (Cppyy::Reflex::RequestId_t request, Cppyy::Reflex::FormatId_t=Cppyy::Reflex::OPTIMAL) override

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)
bool ProcessArgs (PyCallArgs &args) override
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/stephan/code/root-2/bindings/pyroot/cppyy/CPyCppyy/src/CPPFunction.h>

Inheritance diagram for CPyCppyy::CPPFunction:
CPyCppyy::CPPMethod CPyCppyy::PyCallable CPyCppyy::CPPReverseBinary

Member Function Documentation

◆ Call()

PyObject * CPyCppyy::CPPFunction::Call ( CPPInstance *& self,
CPyCppyy_PyArgs_t args,
size_t nargsf,
PyObject * kwds,
CallContext * ctxt = nullptr )
overridevirtual

Implements CPyCppyy::PyCallable.

Reimplemented in CPyCppyy::CPPReverseBinary.

Definition at line 61 of file CPPFunction.cxx.

◆ Clone()

PyCallable * CPyCppyy::CPPFunction::Clone ( )
inlineoverridevirtual

Implements CPyCppyy::PyCallable.

Reimplemented in CPyCppyy::CPPReverseBinary.

Definition at line 19 of file CPPFunction.h.

◆ ConvertAndSetArgs()

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

Definition at line 975 of file CPPMethod.cxx.

◆ Copy_()

void CPyCppyy::CPPMethod::Copy_ ( const CPPMethod & )
inlineprivateinherited

Definition at line 88 of file CPPMethod.cxx.

◆ CPPMethod() [1/2]

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

Definition at line 48 of file CPPMethod.cxx.

◆ CPPMethod() [2/2]

◆ Destroy_()

void CPyCppyy::CPPMethod::Destroy_ ( )
inlineprivateinherited

Definition at line 99 of file CPPMethod.cxx.

◆ Execute()

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

Definition at line 1002 of file CPPMethod.cxx.

◆ ExecuteFast()

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

Definition at line 115 of file CPPMethod.cxx.

◆ ExecuteProtected()

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

Definition at line 194 of file CPPMethod.cxx.

◆ GetArgDefault()

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

Implements CPyCppyy::PyCallable.

Definition at line 634 of file CPPMethod.cxx.

◆ GetArgMatchScore()

int CPyCppyy::CPPMethod::GetArgMatchScore ( PyObject * args_tuple)
overridevirtualinherited

Reimplemented from CPyCppyy::PyCallable.

Definition at line 741 of file CPPMethod.cxx.

◆ GetCoVarNames()

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

Implements CPyCppyy::PyCallable.

Definition at line 610 of file CPPMethod.cxx.

◆ GetDocString()

virtual PyObject * CPyCppyy::PyCallable::GetDocString ( )
inlinevirtualinherited

Reimplemented in CPyCppyy::CPPConstructor.

Definition at line 25 of file PyCallable.h.

◆ GetExecutor()

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

Definition at line 90 of file CPPMethod.h.

◆ GetFunctionAddress()

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

Implements CPyCppyy::PyCallable.

Definition at line 734 of file CPPMethod.cxx.

◆ GetMaxArgs()

int CPyCppyy::CPPMethod::GetMaxArgs ( )
overridevirtualinherited

Implements CPyCppyy::PyCallable.

Definition at line 604 of file CPPMethod.cxx.

◆ GetMethod()

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

Definition at line 88 of file CPPMethod.h.

◆ GetPriority()

int CPyCppyy::CPPMethod::GetPriority ( )
overridevirtualinherited

Implements CPyCppyy::PyCallable.

Definition at line 479 of file CPPMethod.cxx.

◆ GetPrototype()

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

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 429 of file CPPMethod.cxx.

◆ GetReturnTypeName()

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

Definition at line 1146 of file CPPMethod.cxx.

◆ GetScope()

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

Definition at line 89 of file CPPMethod.h.

◆ GetScopeProxy()

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

Implements CPyCppyy::PyCallable.

Definition at line 726 of file CPPMethod.cxx.

◆ GetSignature()

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

Implements CPyCppyy::PyCallable.

Definition at line 1075 of file CPPMethod.cxx.

◆ GetSignatureNames()

PyObject * CPyCppyy::CPPMethod::GetSignatureNames ( )
overridevirtualinherited

Returns a tuple with the names of the input parameters of this method.

For example given a function with prototype:

double foo(int a, float b, double c)

this function returns:

('a', 'b', 'c')

Implements CPyCppyy::PyCallable.

Definition at line 1092 of file CPPMethod.cxx.

◆ GetSignatureString()

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

Definition at line 268 of file CPPMethod.cxx.

◆ GetSignatureTypes()

PyObject * CPyCppyy::CPPMethod::GetSignatureTypes ( )
overridevirtualinherited

Returns a dictionary with the types of the signature of this method.

This dictionary will store both the return type and the input parameter types of this method, respectively with keys "return_type" and "input_types", for example given a function with prototype:

double foo(int a, float b, double c)

this function returns:

{'input_types': ('int', 'float', 'double'), 'return_type': 'double'}

Implements CPyCppyy::PyCallable.

Definition at line 1120 of file CPPMethod.cxx.

◆ GetTypeName()

PyObject * CPyCppyy::CPPFunction::GetTypeName ( )
overridevirtual

Reimplemented from CPyCppyy::PyCallable.

Definition at line 106 of file CPPFunction.cxx.

◆ InitConverters_()

bool CPyCppyy::CPPMethod::InitConverters_ ( )
privateinherited

Definition at line 232 of file CPPMethod.cxx.

◆ InitExecutor_()

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

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

Definition at line 254 of file CPPMethod.cxx.

◆ Initialize()

bool CPyCppyy::CPPMethod::Initialize ( CallContext * ctxt = nullptr)
protectedinherited

Definition at line 775 of file CPPMethod.cxx.

◆ IsConst()

bool CPyCppyy::CPPMethod::IsConst ( )
overridevirtualinherited

Reimplemented from CPyCppyy::PyCallable.

Definition at line 720 of file CPPMethod.cxx.

◆ IsGreedy()

bool CPyCppyy::CPPMethod::IsGreedy ( )
overridevirtualinherited

Implements CPyCppyy::PyCallable.

Definition at line 585 of file CPPMethod.cxx.

◆ ProcessArgs()

bool CPyCppyy::CPPFunction::ProcessArgs ( PyCallArgs & args)
overrideprotectedvirtual

Reimplemented from CPyCppyy::CPPMethod.

Reimplemented in CPyCppyy::CPPReverseBinary.

Definition at line 52 of file CPPFunction.cxx.

◆ ProcessKwds()

bool CPyCppyy::CPPMethod::ProcessKwds ( PyObject * self_in,
PyCallArgs & args )
protectedinherited

Definition at line 794 of file CPPMethod.cxx.

◆ Reflex()

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

Reimplemented from CPyCppyy::PyCallable.

Definition at line 457 of file CPPMethod.cxx.

◆ SetPyError_()

void CPyCppyy::CPPMethod::SetPyError_ ( PyObject * msg)
privateinherited

Definition at line 275 of file CPPMethod.cxx.

◆ VerifyArgCount_()

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

Definition at line 68 of file CPPMethod.cxx.

Member Data Documentation

◆ fArgIndices

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

Definition at line 116 of file CPPMethod.h.

◆ fArgsRequired

int CPyCppyy::CPPMethod::fArgsRequired
protectedinherited

Definition at line 120 of file CPPMethod.h.

◆ fConverters

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

Definition at line 115 of file CPPMethod.h.

◆ fExecutor

Executor* CPyCppyy::CPPMethod::fExecutor
privateinherited

Definition at line 112 of file CPPMethod.h.

◆ fMethod

Cppyy::TCppMethod_t CPyCppyy::CPPMethod::fMethod
privateinherited

Definition at line 110 of file CPPMethod.h.

◆ fScope

Cppyy::TCppScope_t CPyCppyy::CPPMethod::fScope
privateinherited

Definition at line 111 of file CPPMethod.h.


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