Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMethodCall Class Reference

Method or function calling interface.

Objects of this class contain the (CINT) environment to call a global function or a method for an object of a specific class with the desired arguments. This class is especially useful when a method has to be called more times for different objects and/or with different arguments. If a function or method needs to be called only once one better uses TInterpreter::Execute().

A limitation is known with the present implementation: failures can occur if parameters involve temporary object construction.

Definition at line 37 of file TMethodCall.h.

Public Types

using EReturnType = TInterpreter::EReturnType
 
- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = (1ULL << ( 0 )) , kOverwrite = (1ULL << ( 1 )) , kWriteDelete = (1ULL << ( 2 )) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = (1ULL << ( 3 )) }
 
enum  EStatusBits {
  kCanDelete = (1ULL << ( 0 )) , kMustCleanup = (1ULL << ( 3 )) , kIsReferenced = (1ULL << ( 4 )) , kHasUUID = (1ULL << ( 5 )) ,
  kCannotPick = (1ULL << ( 6 )) , kNoContextMenu = (1ULL << ( 8 )) , kInvalidObject = (1ULL << ( 13 ))
}
 

Public Member Functions

 TMethodCall ()
 Default TMethodCall ctor.
 
 TMethodCall (const char *function, const char *params)
 Create a global function invocation environment.
 
 TMethodCall (const TFunction *func)
 Create a global function invocation environment base on a TFunction object.
 
 TMethodCall (const TMethodCall &org)
 Copy ctor.
 
 TMethodCall (TClass *cl, CallFunc_t *callfunc, Longptr_t offset=0)
 Create a method invocation environment for a specific class, method described by the callfunc.
 
 TMethodCall (TClass *cl, const char *method, const char *params)
 Create a method invocation environment for a specific class, method and parameters.
 
 ~TMethodCall ()
 TMethodCall dtor.
 
void CallDtorOnly (Bool_t set=kTRUE)
 
TObjectClone (const char *newname="") const override
 Return an exact copy of this object.
 
void Execute ()
 
void Execute (const char *params)
 
void Execute (const char *params, Double_t &retDouble)
 
void Execute (const char *params, Longptr_t &retLong)
 
void Execute (Double_t &retDouble)
 
void Execute (Longptr_t &retLong)
 
void Execute (void *objAddress, const void *args[], int nargs, void *ret=nullptr)
 Invoke the method.
 
void Execute (void *object)
 Execute the method (with preset arguments) for the specified object.
 
void Execute (void *object, char **retText)
 Execute the method (with preset arguments) for the specified object.
 
void Execute (void *object, const char *params)
 Execute the method for the specified object and argument values.
 
void Execute (void *object, const char *params, char **retText)
 Execute the method for the specified object and argument values.
 
void Execute (void *object, const char *params, Double_t &retDouble)
 Execute the method for the specified object and argument values.
 
void Execute (void *object, const char *params, Longptr_t &retLong)
 Execute the method for the specified object and argument values.
 
void Execute (void *object, Double_t &retDouble)
 Execute the method (with preset arguments) for the specified object.
 
void Execute (void *object, Longptr_t &retLong)
 Execute the method (with preset arguments) for the specified object.
 
CallFunc_t * GetCallFunc () const
 
TFunctionGetMethod ()
 Returns the TMethod describing the method to be executed.
 
const char * GetMethodName () const
 
const char * GetParams () const
 
const char * GetProto () const
 
void Init (const char *function, const char *params)
 Initialize the function invocation environment.
 
void Init (const TFunction *func)
 Initialize the method invocation environment based on the TFunction object.
 
void Init (TClass *cl, CallFunc_t *func, Longptr_t offset=0)
 Initialize the method invocation environment based on the CallFunc object and the TClass describing the function context.
 
void Init (TClass *cl, const char *method, const char *params, Bool_t objectIsConst=kFALSE)
 Initialize the method invocation environment.
 
void InitWithPrototype (const char *function, const char *proto, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
 Initialize the function invocation environment.
 
void InitWithPrototype (TClass *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
 Initialize the method invocation environment.
 
TClassIsA () const override
 
Bool_t IsValid () const
 Return true if the method call has been properly initialized and is usable.
 
TMethodCalloperator= (const TMethodCall &rhs)
 Assignment operator.
 
void ResetParam ()
 Reset parameter list. To be used before the first call the SetParam().
 
EReturnType ReturnType ()
 Returns the return type of the method.
 
void SetParam (Double_t d)
 Add a double method parameter.
 
void SetParam (Float_t f)
 Add a double method parameter.
 
void SetParam (Long64_t ll)
 Add a long long method parameter.
 
void SetParam (Long_t l)
 Add a long method parameter.
 
void SetParam (ULong64_t ull)
 Add a unsigned long long method parameter.
 
void SetParamPtrs (void *paramArr, Int_t nparam=-1)
 ParamArr is an array containing the function argument values.
 
template<typename... T>
void SetParams (const T &... params)
 
void Streamer (TBuffer &) override
 Stream an object of class TObject.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor.
 
 TObject (const TObject &object)
 TObject copy ctor.
 
virtual ~TObject ()
 TObject destructor.
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action.
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
 
virtual void Clear (Option_t *="")
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method.
 
virtual void Copy (TObject &object) const
 Copy this to obj.
 
virtual void Delete (Option_t *option="")
 Delete this object.
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object.
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects.
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
 
virtual void Dump () const
 Dump contents of object on stdout.
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py).
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes.
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes.
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
 
virtual const char * GetIconName () const
 Returns mime type name of object.
 
virtual const char * GetName () const
 Returns name of object.
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py).
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object.
 
virtual UInt_t GetUniqueID () const
 Return the unique object id.
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
 
virtual ULong_t Hash () const
 Return hash value for this object.
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e.
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 IsDestructed.
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout.
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary).
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification (the base implementation is no-op).
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
 
void operator delete (void *ptr)
 Operator delete.
 
void operator delete (void *ptr, void *vp)
 Only called by placement new when throwing an exception.
 
void operator delete[] (void *ptr)
 Operator delete [].
 
void operator delete[] (void *ptr, void *vp)
 Only called by placement new[] when throwing an exception.
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *vp)
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator.
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself.
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself.
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list.
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename.
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out".
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object.
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked.
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 Return destructor only flag.
 
static Bool_t GetObjectStat ()
 Get status of object stat flag.
 
static void SetDtorOnly (void *obj)
 Set destructor only flag.
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
 

Static Public Attributes

static const EReturnType kDouble = TInterpreter::EReturnType::kDouble
 
static const EReturnType kLong = TInterpreter::EReturnType::kLong
 
static const EReturnType kNone = TInterpreter::EReturnType::kNoReturnType
 
static const EReturnType kNoReturnType = TInterpreter::EReturnType::kNoReturnType
 
static const EReturnType kOther = TInterpreter::EReturnType::kOther
 
static const EReturnType kString = TInterpreter::EReturnType::kString
 

Private Member Functions

void Execute (const char *, const char *, int *=nullptr) override
 Execute method on this object with the given parameter string, e.g.
 
void Execute (TMethod *, TObjArray *, int *=nullptr) override
 Execute method on this object with parameters stored in the TObjArray.
 
void InitImplementation (const char *methodname, const char *params, const char *proto, Bool_t objectIsConst, TClass *cl, const ClassInfo_t *cinfo, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
 This function implements Init and InitWithPrototype.
 

Private Attributes

TClassfClass
 
Bool_t fDtorOnly
 
CallFunc_t * fFunc
 
TString fMethod
 
TFunctionfMetPtr
 
Longptr_t fOffset
 
TString fParams
 
TString fProto
 
EReturnType fRetType
 

Additional Inherited Members

- Protected Types inherited from TObject
enum  { kOnlyPrepStep = (1ULL << ( 3 )) }
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected).
 
void MakeZombie ()
 

#include <TMethodCall.h>

Inheritance diagram for TMethodCall:
[legend]

Member Typedef Documentation

◆ EReturnType

Constructor & Destructor Documentation

◆ TMethodCall() [1/6]

TMethodCall::TMethodCall ( )

Default TMethodCall ctor.

Use Init() to initialize the method call environment.

Definition at line 40 of file TMethodCall.cxx.

◆ TMethodCall() [2/6]

TMethodCall::TMethodCall ( TClass cl,
CallFunc_t *  callfunc,
Longptr_t  offset = 0 
)

Create a method invocation environment for a specific class, method described by the callfunc.

Definition at line 49 of file TMethodCall.cxx.

◆ TMethodCall() [3/6]

TMethodCall::TMethodCall ( TClass cl,
const char *  method,
const char *  params 
)

Create a method invocation environment for a specific class, method and parameters.

The parameter string has the form: "\"aap\", 3, 4.35". To execute the method call TMethodCall::Execute(object,...). This two step method is much more efficient than calling for every invocation TInterpreter::Execute(...).

Definition at line 62 of file TMethodCall.cxx.

◆ TMethodCall() [4/6]

TMethodCall::TMethodCall ( const char *  function,
const char *  params 
)

Create a global function invocation environment.

The parameter string has the form: "\"aap\", 3, 4,35". To execute the function call TMethodCall::Execute(...). This two step method is much more efficient than calling for every invocation TInterpreter::Execute(...).

Definition at line 75 of file TMethodCall.cxx.

◆ TMethodCall() [5/6]

TMethodCall::TMethodCall ( const TFunction func)

Create a global function invocation environment base on a TFunction object.

To execute the function call TMethodCall::Execute(...). This two step method is much more efficient than calling for every invocation TInterpreter::Execute(...).

Definition at line 87 of file TMethodCall.cxx.

◆ TMethodCall() [6/6]

TMethodCall::TMethodCall ( const TMethodCall org)

Copy ctor.

Definition at line 95 of file TMethodCall.cxx.

◆ ~TMethodCall()

TMethodCall::~TMethodCall ( )

TMethodCall dtor.

Definition at line 130 of file TMethodCall.cxx.

Member Function Documentation

◆ CallDtorOnly()

void TMethodCall::CallDtorOnly ( Bool_t  set = kTRUE)
inline

Definition at line 87 of file TMethodCall.h.

◆ Class()

static TClass * TMethodCall::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TMethodCall::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TMethodCall::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 128 of file TMethodCall.h.

◆ Clone()

TObject * TMethodCall::Clone ( const char *  newname = "") const
overridevirtual

Return an exact copy of this object.

Reimplemented from TObject.

Definition at line 139 of file TMethodCall.cxx.

◆ DeclFileName()

static const char * TMethodCall::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 128 of file TMethodCall.h.

◆ Execute() [1/17]

void TMethodCall::Execute ( )
inline

Definition at line 131 of file TMethodCall.h.

◆ Execute() [2/17]

void TMethodCall::Execute ( const char *  method,
const char *  params,
int error = nullptr 
)
inlineoverrideprivatevirtual

Execute method on this object with the given parameter string, e.g.

"3.14,1,\"text\"".

Reimplemented from TObject.

Definition at line 64 of file TMethodCall.h.

◆ Execute() [3/17]

void TMethodCall::Execute ( const char *  params)
inline

Definition at line 133 of file TMethodCall.h.

◆ Execute() [4/17]

void TMethodCall::Execute ( const char *  params,
Double_t retDouble 
)
inline

Definition at line 141 of file TMethodCall.h.

◆ Execute() [5/17]

void TMethodCall::Execute ( const char *  params,
Longptr_t retLong 
)
inline

Definition at line 137 of file TMethodCall.h.

◆ Execute() [6/17]

void TMethodCall::Execute ( Double_t retDouble)
inline

Definition at line 139 of file TMethodCall.h.

◆ Execute() [7/17]

void TMethodCall::Execute ( Longptr_t retLong)
inline

Definition at line 135 of file TMethodCall.h.

◆ Execute() [8/17]

void TMethodCall::Execute ( TMethod method,
TObjArray params,
int error = nullptr 
)
inlineoverrideprivatevirtual

Execute method on this object with parameters stored in the TObjArray.

The TObjArray should contain an argv vector like:

argv[0] ... argv[n] = the list of TObjString parameters
Collectable string class.
Definition TObjString.h:28
const Int_t n
Definition legend1.C:16

Reimplemented from TObject.

Definition at line 65 of file TMethodCall.h.

◆ Execute() [9/17]

void TMethodCall::Execute ( void *  objAddress,
const void *  args[],
int  nargs,
void *  ret = nullptr 
)

Invoke the method.

Parameters
[in]objAddressAddress of the object to execute the method (nullptr if it is a free function)
[in]argsArray of pointer to the address of the argument to pass to the function as is. No conversion is done, the argument must be of the expected type.
[in]nargsNumber of arguments passed (must be less than actua size of args
[out]retAddress of value (or object) to use for the return value.

Definition at line 552 of file TMethodCall.cxx.

◆ Execute() [10/17]

void TMethodCall::Execute ( void *  object)

Execute the method (with preset arguments) for the specified object.

Definition at line 421 of file TMethodCall.cxx.

◆ Execute() [11/17]

void TMethodCall::Execute ( void *  object,
char **  retText 
)

Execute the method (with preset arguments) for the specified object.

Definition at line 514 of file TMethodCall.cxx.

◆ Execute() [12/17]

void TMethodCall::Execute ( void *  object,
const char *  params 
)

Execute the method for the specified object and argument values.

Definition at line 436 of file TMethodCall.cxx.

◆ Execute() [13/17]

void TMethodCall::Execute ( void *  object,
const char *  params,
char **  retText 
)

Execute the method for the specified object and argument values.

Definition at line 528 of file TMethodCall.cxx.

◆ Execute() [14/17]

void TMethodCall::Execute ( void *  object,
const char *  params,
Double_t retDouble 
)

Execute the method for the specified object and argument values.

Definition at line 498 of file TMethodCall.cxx.

◆ Execute() [15/17]

void TMethodCall::Execute ( void *  object,
const char *  params,
Longptr_t retLong 
)

Execute the method for the specified object and argument values.

Definition at line 467 of file TMethodCall.cxx.

◆ Execute() [16/17]

void TMethodCall::Execute ( void *  object,
Double_t retDouble 
)

Execute the method (with preset arguments) for the specified object.

Definition at line 484 of file TMethodCall.cxx.

◆ Execute() [17/17]

void TMethodCall::Execute ( void *  object,
Longptr_t retLong 
)

Execute the method (with preset arguments) for the specified object.

Definition at line 453 of file TMethodCall.cxx.

◆ GetCallFunc()

CallFunc_t * TMethodCall::GetCallFunc ( ) const
inline

Definition at line 93 of file TMethodCall.h.

◆ GetMethod()

TFunction * TMethodCall::GetMethod ( )

Returns the TMethod describing the method to be executed.

This takes all overriding and overloading into account (call TClass::GetMethod()). Since finding the method is expensive the result is cached.

Definition at line 386 of file TMethodCall.cxx.

◆ GetMethodName()

const char * TMethodCall::GetMethodName ( ) const
inline

Definition at line 90 of file TMethodCall.h.

◆ GetParams()

const char * TMethodCall::GetParams ( ) const
inline

Definition at line 91 of file TMethodCall.h.

◆ GetProto()

const char * TMethodCall::GetProto ( ) const
inline

Definition at line 92 of file TMethodCall.h.

◆ Init() [1/4]

void TMethodCall::Init ( const char *  function,
const char *  params 
)

Initialize the function invocation environment.

Necessary input information: the function name and the parameter string of the form "\"aap\", 3, 4.35".

To execute the method call TMethodCall::Execute(...). This two step method is much more efficient than calling for every invocation TInterpreter::Execute(...).

Definition at line 281 of file TMethodCall.cxx.

◆ Init() [2/4]

void TMethodCall::Init ( const TFunction func)

Initialize the method invocation environment based on the TFunction object.

Definition at line 226 of file TMethodCall.cxx.

◆ Init() [3/4]

void TMethodCall::Init ( TClass cl,
CallFunc_t *  func,
Longptr_t  offset = 0 
)

Initialize the method invocation environment based on the CallFunc object and the TClass describing the function context.

Definition at line 185 of file TMethodCall.cxx.

◆ Init() [4/4]

void TMethodCall::Init ( TClass cl,
const char *  method,
const char *  params,
Bool_t  objectIsConst = kFALSE 
)

Initialize the method invocation environment.

Necessary input information: the class, method name and the parameter string of the form "\"aap\", 3, 4.35".

To execute the method call TMethodCall::Execute(object,...). This two step method is much more efficient than calling for every invocation TInterpreter::Execute(...).

Definition at line 260 of file TMethodCall.cxx.

◆ InitImplementation()

void TMethodCall::InitImplementation ( const char *  methodname,
const char *  params,
const char *  proto,
Bool_t  objectIsConst,
TClass cl,
const ClassInfo_t *  cinfo,
ROOT::EFunctionMatchMode  mode = ROOT::kConversionMatch 
)
private

This function implements Init and InitWithPrototype.

'methodname' should NOT have any scope information in it. The scope information should be passed via the TClass or CINT ClassInfo.

Definition at line 296 of file TMethodCall.cxx.

◆ InitWithPrototype() [1/2]

void TMethodCall::InitWithPrototype ( const char *  function,
const char *  proto,
ROOT::EFunctionMatchMode  mode = ROOT::kConversionMatch 
)

Initialize the function invocation environment.

Necessary input information: the function name and the prototype string of the form: "char*,int,float".

To execute the method call TMethodCall::Execute(...). This two step method is much more efficient than calling for every invocation TInterpreter::Execute(...).

Definition at line 363 of file TMethodCall.cxx.

◆ InitWithPrototype() [2/2]

void TMethodCall::InitWithPrototype ( TClass cl,
const char *  method,
const char *  proto,
Bool_t  objectIsConst = kFALSE,
ROOT::EFunctionMatchMode  mode = ROOT::kConversionMatch 
)

Initialize the method invocation environment.

Necessary input information: the class, method name and the prototype string of the form: "char*,int,float".

To execute the method call TMethodCall::Execute(object,...). This two step method is much more efficient than calling for every invocation TInterpreter::Execute(...).

Definition at line 342 of file TMethodCall.cxx.

◆ IsA()

TClass * TMethodCall::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TObject.

Definition at line 128 of file TMethodCall.h.

◆ IsValid()

Bool_t TMethodCall::IsValid ( ) const

Return true if the method call has been properly initialized and is usable.

Definition at line 376 of file TMethodCall.cxx.

◆ operator=()

TMethodCall & TMethodCall::operator= ( const TMethodCall rhs)

Assignment operator.

Definition at line 107 of file TMethodCall.cxx.

◆ ResetParam()

void TMethodCall::ResetParam ( )

Reset parameter list. To be used before the first call the SetParam().

Definition at line 597 of file TMethodCall.cxx.

◆ ReturnType()

TMethodCall::EReturnType TMethodCall::ReturnType ( )

Returns the return type of the method.

Either (unsigned) long, int, short and char, or float and double or anything else. Since finding the return type is expensive the result is cached.

Definition at line 565 of file TMethodCall.cxx.

◆ SetParam() [1/5]

void TMethodCall::SetParam ( Double_t  d)

Add a double method parameter.

Definition at line 624 of file TMethodCall.cxx.

◆ SetParam() [2/5]

void TMethodCall::SetParam ( Float_t  f)

Add a double method parameter.

Definition at line 615 of file TMethodCall.cxx.

◆ SetParam() [3/5]

void TMethodCall::SetParam ( Long64_t  ll)

Add a long long method parameter.

Definition at line 633 of file TMethodCall.cxx.

◆ SetParam() [4/5]

void TMethodCall::SetParam ( Long_t  l)

Add a long method parameter.

Definition at line 606 of file TMethodCall.cxx.

◆ SetParam() [5/5]

void TMethodCall::SetParam ( ULong64_t  ull)

Add a unsigned long long method parameter.

Definition at line 642 of file TMethodCall.cxx.

◆ SetParamPtrs()

void TMethodCall::SetParamPtrs ( void *  paramArr,
Int_t  nparam = -1 
)

ParamArr is an array containing the function argument values.

If nparam = -1 then paramArr must contain values for all function arguments, otherwise Nargs-NargsOpt <= nparam <= Nargs, where Nargs is the number of all arguments and NargsOpt is the number of default arguments.

Definition at line 588 of file TMethodCall.cxx.

◆ SetParams()

template<typename... T>
void TMethodCall::SetParams ( const T &...  params)
inline

Definition at line 104 of file TMethodCall.h.

◆ Streamer()

void TMethodCall::Streamer ( TBuffer R__b)
overridevirtual

Stream an object of class TObject.

Reimplemented from TObject.

◆ StreamerNVirtual()

void TMethodCall::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 128 of file TMethodCall.h.

Member Data Documentation

◆ fClass

TClass* TMethodCall::fClass
private

Definition at line 56 of file TMethodCall.h.

◆ fDtorOnly

Bool_t TMethodCall::fDtorOnly
private

Definition at line 61 of file TMethodCall.h.

◆ fFunc

CallFunc_t* TMethodCall::fFunc
private

Definition at line 54 of file TMethodCall.h.

◆ fMethod

TString TMethodCall::fMethod
private

Definition at line 58 of file TMethodCall.h.

◆ fMetPtr

TFunction* TMethodCall::fMetPtr
private

Definition at line 57 of file TMethodCall.h.

◆ fOffset

Longptr_t TMethodCall::fOffset
private

Definition at line 55 of file TMethodCall.h.

◆ fParams

TString TMethodCall::fParams
private

Definition at line 59 of file TMethodCall.h.

◆ fProto

TString TMethodCall::fProto
private

Definition at line 60 of file TMethodCall.h.

◆ fRetType

EReturnType TMethodCall::fRetType
private

Definition at line 62 of file TMethodCall.h.

◆ kDouble

const EReturnType TMethodCall::kDouble = TInterpreter::EReturnType::kDouble
static

Definition at line 44 of file TMethodCall.h.

◆ kLong

const EReturnType TMethodCall::kLong = TInterpreter::EReturnType::kLong
static

Definition at line 43 of file TMethodCall.h.

◆ kNone

const EReturnType TMethodCall::kNone = TInterpreter::EReturnType::kNoReturnType
static

Definition at line 49 of file TMethodCall.h.

◆ kNoReturnType

const EReturnType TMethodCall::kNoReturnType = TInterpreter::EReturnType::kNoReturnType
static

Definition at line 47 of file TMethodCall.h.

◆ kOther

const EReturnType TMethodCall::kOther = TInterpreter::EReturnType::kOther
static

Definition at line 46 of file TMethodCall.h.

◆ kString

const EReturnType TMethodCall::kString = TInterpreter::EReturnType::kString
static

Definition at line 45 of file TMethodCall.h.

  • core/meta/inc/TMethodCall.h
  • core/meta/src/TMethodCall.cxx