Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMethodCall.cxx
Go to the documentation of this file.
1// @(#)Root/meta:$Id$
2// Author: Fons Rademakers 13/06/96
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12/** \class TMethodCall
13Method or function calling interface. Objects of this class contain
14the (CINT) environment to call a global function or a method for an
15object of a specific class with the desired arguments. This class is
16especially useful when a method has to be called more times for
17different objects and/or with different arguments. If a function or
18method needs to be called only once one better uses
19TInterpreter::Execute().
20
21A limitation is known with the present implementation: failures can
22occur if parameters involve temporary object construction.
23*/
24
25#include "TInterpreter.h"
26#include "TMethodCall.h"
27#include "TMethod.h"
28#include "TClass.h"
29#include "TROOT.h"
30#include "Strlen.h"
31#include "TVirtualMutex.h"
32#include "TError.h"
33
34
35////////////////////////////////////////////////////////////////////////////////
36/// Default TMethodCall ctor. Use Init() to initialize the method call
37/// environment.
38
40fFunc(nullptr), fOffset(0), fClass(nullptr), fMetPtr(nullptr), fDtorOnly(kFALSE), fRetType(kNone)
41{
42}
43
44////////////////////////////////////////////////////////////////////////////////
45/// Create a method invocation environment for a specific class, method
46/// described by the callfunc.
47
49fFunc(nullptr), fOffset(0), fClass(nullptr), fMetPtr(nullptr), fDtorOnly(kFALSE), fRetType(kNone)
50{
51 Init(cl, callfunc, offset);
52}
53
54////////////////////////////////////////////////////////////////////////////////
55/// Create a method invocation environment for a specific class, method and
56/// parameters. The parameter string has the form: "\"aap\", 3, 4.35".
57/// To execute the method call TMethodCall::Execute(object,...).
58/// This two step method is much more efficient than calling for
59/// every invocation TInterpreter::Execute(...).
60
61TMethodCall::TMethodCall(TClass *cl, const char *method, const char *params):
62fFunc(nullptr), fOffset(0), fClass(nullptr), fMetPtr(nullptr), fDtorOnly(kFALSE), fRetType(kNone)
63{
64 Init(cl, method, params);
65}
66
67////////////////////////////////////////////////////////////////////////////////
68/// Create a global function invocation environment. The parameter
69/// string has the form: "\"aap\", 3, 4,35". To execute the
70/// function call TMethodCall::Execute(...).
71/// This two step method is much more efficient than calling for
72/// every invocation TInterpreter::Execute(...).
73
74TMethodCall::TMethodCall(const char *function, const char *params):
75fFunc(nullptr), fOffset(0), fClass(nullptr), fMetPtr(nullptr), fDtorOnly(kFALSE), fRetType(kNone)
76{
77 Init(function, params);
78}
79
80////////////////////////////////////////////////////////////////////////////////
81/// Create a global function invocation environment base on a TFunction object.
82/// To execute the function call TMethodCall::Execute(...).
83/// This two step method is much more efficient than calling for
84/// every invocation TInterpreter::Execute(...).
85
87fFunc(nullptr), fOffset(0), fClass(nullptr), fMetPtr(nullptr), fDtorOnly(kFALSE), fRetType(kNone)
88{
89 Init(func);
90}
91////////////////////////////////////////////////////////////////////////////////
92/// Copy ctor.
93
96fFunc(orig.fFunc ? gCling->CallFunc_FactoryCopy(orig.fFunc) : nullptr),
97fOffset(orig.fOffset), fClass(orig.fClass), fMetPtr(nullptr /*!*/),
98fMethod(orig.fMethod), fParams(orig.fParams), fProto(orig.fProto),
99fDtorOnly(orig.fDtorOnly), fRetType(orig.fRetType)
100{
101}
102
103////////////////////////////////////////////////////////////////////////////////
104/// Assignment operator.
105
107{
108 if (this != &rhs) {
110 fFunc = rhs.fFunc ? gCling->CallFunc_FactoryCopy(rhs.fFunc) : nullptr;
111 fOffset = rhs.fOffset;
112 fClass = rhs.fClass;
113 fMethod = rhs.fMethod;
114 fParams = rhs.fParams;
115 fProto = rhs.fProto;
116 fDtorOnly = rhs.fDtorOnly;
117 fRetType = rhs.fRetType;
118
119 delete fMetPtr;
120 fMetPtr = nullptr;
121 }
122
123 return *this;
124}
125
126////////////////////////////////////////////////////////////////////////////////
127/// TMethodCall dtor.
128
134
135////////////////////////////////////////////////////////////////////////////////
136/// Return an exact copy of this object.
137
138TObject *TMethodCall::Clone(const char *) const
139{
140 TObject *newobj = new TMethodCall(*this);
141 return newobj;
142}
143
144////////////////////////////////////////////////////////////////////////////////
145/// Helper function to find the scope associated with a qualified
146/// function name
147
148static TClass *R__FindScope(const char *function, UInt_t &pos, ClassInfo_t *cinfo)
149{
150
151//______________________________________________________________________________
152// FIXME: We don't need to split that into lookup scope and lookup member.
153// Consider merging the implementation with the new lookup functionality.
154
155 if (function) {
156 UInt_t nested = 0;
157 for(int i=strlen(function); i>=0; --i) {
158 switch(function[i]) {
159 case '<': ++nested; break;
160 case '>': if (nested==0) { Error("TMethodCall R__FindScope","%s is not well formed function name",function); return nullptr; }
161 --nested; break;
162 case ':':
163 if (nested==0) {
164 if (i>1 && function[i-1]==':') {
165 TString scope(function);
166 scope[i-1] = 0;
167 pos = i+1;
169 if (!cl) gCling->ClassInfo_Init(cinfo, scope);
170 return cl;
171 }
172 }
173 break;
174 }
175 }
176 }
177 return nullptr;
178}
179
180////////////////////////////////////////////////////////////////////////////////
181/// Initialize the method invocation environment based on
182/// the CallFunc object and the TClass describing the function context.
183
185{
186 if (!function) {
187 fOffset = 0;
189 fRetType = kNone;
190 return;
191 }
192
193 MethodInfo_t* info = gCling->CallFunc_FactoryMethod(function);
194
195 if (!fFunc)
197 else
199
200 fClass = cl;
201 if (fClass) {
202 fMetPtr = new TMethod(info,cl);
203 } else {
204 fMetPtr = new TFunction(info);
205 }
207 fParams = "";
208 fProto = fMetPtr->GetSignature()+1; // skip leading )
209 Ssiz_t s = fProto.Last(')');
210 fProto.Remove(s); // still need to remove default values :(
211
212 fOffset = offset;
213
215 fRetType = kNone;
216
218
219}
220
221////////////////////////////////////////////////////////////////////////////////
222/// Initialize the method invocation environment based on
223/// the TFunction object.
224
225void TMethodCall::Init(const TFunction *function)
226{
227 if (!function) return;
228
229 if (!fFunc)
231 else
233
234 const TMethod *m = dynamic_cast<const TMethod*>(function);
235 fClass = m ? m->GetClass() : nullptr;
236 fMetPtr = (TFunction*)function->Clone();
238 fParams = "";
239 fProto = fMetPtr->GetSignature()+1; // skip leading )
240 Ssiz_t s = fProto.Last(')');
241 fProto.Remove(s); // still need to remove default values :(
242
244 fRetType = kNone;
245
246 gCling->CallFunc_SetFunc(fFunc,function->fInfo);
247
248}
249
250////////////////////////////////////////////////////////////////////////////////
251/// Initialize the method invocation environment. Necessary input
252/// information: the class, method name and the parameter string
253/// of the form "\"aap\", 3, 4.35".
254///
255/// To execute the method call TMethodCall::Execute(object,...).
256/// This two step method is much more efficient than calling for
257/// every invocation TInterpreter::Execute(...).
258
259void TMethodCall::Init(TClass *cl, const char *method, const char *params, Bool_t objectIsConst /* = kFALSE */)
260{
262 if (!cl) {
263 UInt_t pos = 0;
264 cl = R__FindScope(method,pos,cinfo);
265 method = method+pos;
266 }
267 InitImplementation(method,params,nullptr,objectIsConst,cl,cinfo);
269}
270
271////////////////////////////////////////////////////////////////////////////////
272/// Initialize the function invocation environment. Necessary input
273/// information: the function name and the parameter string of
274/// the form "\"aap\", 3, 4.35".
275///
276/// To execute the method call TMethodCall::Execute(...).
277/// This two step method is much more efficient than calling for
278/// every invocation TInterpreter::Execute(...).
279
280void TMethodCall::Init(const char *function, const char *params)
281{
282 UInt_t pos = 0;
284 TClass *cl = R__FindScope(function,pos,cinfo);
285 InitImplementation(function+pos, params, nullptr, false, cl, cinfo);
287}
288
289////////////////////////////////////////////////////////////////////////////////
290/// This function implements Init and InitWithPrototype.
291///
292/// 'methodname' should NOT have any scope information in it. The scope
293/// information should be passed via the TClass or CINT ClassInfo.
294
295void TMethodCall::InitImplementation(const char *methodname, const char *params,
296 const char *proto,
298 const ClassInfo_t *cinfo,
299 ROOT::EFunctionMatchMode mode /* = ROOT::kConversionMatch */)
300{
301 if (!fFunc) {
304 } else
306
307 fClass = cl;
308 fMetPtr = nullptr;
310 fParams = params ? params : "";
311 fProto = proto ? proto : "";
313 fRetType = kNone;
314
315 ClassInfo_t *scope = nullptr;
316 if (cl) scope = (ClassInfo_t*)cl->GetClassInfo();
317 else scope = (ClassInfo_t*)cinfo;
318
319 if (!scope) return;
320
322 if (params && params[0]) {
323 gCling->CallFunc_SetFunc(fFunc, scope, (char *)methodname, (char *)params, objectIsConst, &fOffset);
324 } else if (proto && proto[0]) {
326 } else {
327 // No parameters
329 }
330}
331
332////////////////////////////////////////////////////////////////////////////////
333/// Initialize the method invocation environment. Necessary input
334/// information: the class, method name and the prototype string of
335/// the form: "char*,int,float".
336///
337/// To execute the method call TMethodCall::Execute(object,...).
338/// This two step method is much more efficient than calling for
339/// every invocation TInterpreter::Execute(...).
340
341void TMethodCall::InitWithPrototype(TClass *cl, const char *method, const char *proto, Bool_t objectIsConst /* = kFALSE */, ROOT::EFunctionMatchMode mode /* = ROOT::kConversionMatch */)
342{
344 if (!cl) {
345 UInt_t pos = 0;
346 cl = R__FindScope(method,pos,cinfo);
347 method = method+pos;
348 }
351}
352
353////////////////////////////////////////////////////////////////////////////////
354/// Initialize the function invocation environment. Necessary input
355/// information: the function name and the prototype string of
356/// the form: "char*,int,float".
357///
358/// To execute the method call TMethodCall::Execute(...).
359/// This two step method is much more efficient than calling for
360/// every invocation TInterpreter::Execute(...).
361
362void TMethodCall::InitWithPrototype(const char *function, const char *proto, ROOT::EFunctionMatchMode mode /* = ROOT::kConversionMatch */)
363{
364 UInt_t pos = 0;
366 TClass *cl = R__FindScope(function,pos,cinfo);
367 InitImplementation(function+pos, nullptr, proto, false, cl, cinfo, mode);
369}
370
371////////////////////////////////////////////////////////////////////////////////
372/// Return true if the method call has been properly initialized and is
373/// usable.
374
379
380////////////////////////////////////////////////////////////////////////////////
381/// Returns the TMethod describing the method to be executed. This takes
382/// all overriding and overloading into account (call TClass::GetMethod()).
383/// Since finding the method is expensive the result is cached.
384
386{
387 // Since the object in the list of global function are often deleted
388 // we need to copy them.
389
390 if (!fMetPtr) {
392 if (fClass) {
394 } else {
396 }
397 } else if (fClass) {
398 if (fProto == "") {
400 } else {
402 }
403 TMethod *met = dynamic_cast<TMethod*>(fMetPtr);
404 if (met) fMetPtr = new TMethod(*met);
405 } else {
406 if (fProto == "")
407 fMetPtr = gROOT->GetGlobalFunction(fMethod.Data(), fParams.Data(), kFALSE);
408 else
409 fMetPtr = gROOT->GetGlobalFunctionWithPrototype(fMethod.Data(), fProto.Data(), kFALSE);
410 if (fMetPtr) fMetPtr = new TFunction(*fMetPtr);
411 }
412 }
413
414 return fMetPtr;
415}
416
417////////////////////////////////////////////////////////////////////////////////
418/// Execute the method (with preset arguments) for the specified object.
419
420void TMethodCall::Execute(void *object)
421{
422 if (!fFunc) return;
423
424 void *address = nullptr;
425 if (object) address = (void*)((Longptr_t)object + fOffset);
426 if (!fDtorOnly && fMethod[0]=='~') {
427 Error("Execute","TMethodCall can no longer be use to call the operator delete and the destructor at the same time");
428 }
429 gCling->CallFunc_Exec(fFunc,address);
430}
431
432////////////////////////////////////////////////////////////////////////////////
433/// Execute the method for the specified object and argument values.
434
435void TMethodCall::Execute(void *object, const char *params)
436{
437 if (!fFunc) return;
438
439 // SetArgs contains the necessary lock.
440 gCling->CallFunc_SetArgs(fFunc, (char *)params);
441
442 void *address = nullptr;
443 if (object) address = (void*)((Longptr_t)object + fOffset);
445 gCling->CallFunc_Exec(fFunc,address);
446 gCling->SetTempLevel(-1);
447}
448
449////////////////////////////////////////////////////////////////////////////////
450/// Execute the method (with preset arguments) for the specified object.
451
453{
454 if (!fFunc) return;
455
456 void *address = nullptr;
457 if (object) address = (void*)((Longptr_t)object + fOffset);
460 gCling->SetTempLevel(-1);
461}
462
463////////////////////////////////////////////////////////////////////////////////
464/// Execute the method for the specified object and argument values.
465
466void TMethodCall::Execute(void *object, const char *params, Longptr_t &retLong)
467{
468 if (!fFunc) return;
469
470 // SetArgs contains the necessary lock.
471 gCling->CallFunc_SetArgs(fFunc, (char *)params);
472
473 void *address = nullptr;
474 if (object) address = (void*)((Longptr_t)object + fOffset);
477 gCling->SetTempLevel(-1);
478}
479
480////////////////////////////////////////////////////////////////////////////////
481/// Execute the method (with preset arguments) for the specified object.
482
484{
485 if (!fFunc) return;
486
487 void *address = nullptr;
488 if (object) address = (void*)((Longptr_t)object + fOffset);
491 gCling->SetTempLevel(-1);
492}
493
494////////////////////////////////////////////////////////////////////////////////
495/// Execute the method for the specified object and argument values.
496
497void TMethodCall::Execute(void *object, const char *params, Double_t &retDouble)
498{
499 if (!fFunc) return;
500
501 gCling->CallFunc_SetArgs(fFunc, (char *)params);
502
503 void *address = nullptr;
504 if (object) address = (void*)((Longptr_t)object + fOffset);
507 gCling->SetTempLevel(-1);
508}
509
510////////////////////////////////////////////////////////////////////////////////
511/// Execute the method (with preset arguments) for the specified object.
512
513void TMethodCall::Execute(void *object, char **retText)
514{
515 if (!fFunc) return;
516
517 void *address = nullptr;
518 if (object) address = (void*)((Longptr_t)object + fOffset);
520 *retText =(char*) (gCling->CallFunc_ExecInt(fFunc,address));
521 gCling->SetTempLevel(-1);
522}
523
524////////////////////////////////////////////////////////////////////////////////
525/// Execute the method for the specified object and argument values.
526
527void TMethodCall::Execute(void *object, const char *params, char **retText)
528{
529 if (!fFunc) return;
530
531 // SetArgs contains the necessary lock.
532 gCling->CallFunc_SetArgs(fFunc, (char *)params);
533
534 void *address = nullptr;
535 if (object) address = (void*)((Longptr_t)object + fOffset);
537 *retText =(char*)(gCling->CallFunc_ExecInt(fFunc,address));
538 gCling->SetTempLevel(-1);
539}
540
541////////////////////////////////////////////////////////////////////////////////
542/// Invoke the method
543///
544/// \param[in] objAddress Address of the object to execute the method (nullptr if it is a free function)
545/// \param[in] args Array of pointer to the address of the argument to pass to the
546/// function as is. *No* conversion is done, the argument must be
547/// of the expected type.
548/// \param[in] nargs Number of arguments passed (must be less than actua size of args
549/// \param[out] ret Address of value (or object) to use for the return value.
550
551void TMethodCall::Execute(void *objAddress, const void* args[], int nargs, void *ret /* = 0 */)
552{
553 if (!fFunc) return;
554
556
557}
558
559////////////////////////////////////////////////////////////////////////////////
560/// Returns the return type of the method. Either (unsigned) long,
561/// int, short and char, or float and double or anything else.
562/// Since finding the return type is expensive the result is cached.
563
565{
566 if ( fRetType == kNone) {
567 TFunction *func = GetMethod();
568 if (func == nullptr) {
570 Error("ReturnType","Unknown method");
571 return kOther;
572 }
573
575 }
576
577 return fRetType;
578}
579
580////////////////////////////////////////////////////////////////////////////////
581/// \brief Set pointers to parameters
582/// \param paramArr an array containing the function argument values.
583/// \param nparam number of parameters should fulfill Nargs-NargsOpt <= nparam
584/// <= Nargs, where Nargs is the number of all arguments and NargsOpt is the
585/// number of default arguments.
586
592
593////////////////////////////////////////////////////////////////////////////////
594/// Reset parameter list. To be used before the first call the SetParam().
595
597{
598 if (!fFunc) return;
600}
601
602////////////////////////////////////////////////////////////////////////////////
603/// Add a long method parameter.
604
606{
607 if (!fFunc) return;
609}
610
611////////////////////////////////////////////////////////////////////////////////
612/// Add a double method parameter.
613
615{
616 if (!fFunc) return;
618}
619
620////////////////////////////////////////////////////////////////////////////////
621/// Add a double method parameter.
622
624{
625 if (!fFunc) return;
627}
628
629////////////////////////////////////////////////////////////////////////////////
630/// Add a long long method parameter.
631
633{
634 if (!fFunc) return;
636}
637
638////////////////////////////////////////////////////////////////////////////////
639/// Add a unsigned long long method parameter.
640
642{
643 if (!fFunc) return;
645}
std::string fRetType
Cppyy::TCppType_t fClass
const Handle_t kNone
Definition GuiTypes.h:88
#define d(i)
Definition RSha256.hxx:102
#define f(i)
Definition RSha256.hxx:104
long Longptr_t
Integer large enough to hold a pointer (platform-dependent)
Definition RtypesCore.h:89
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
Definition RtypesCore.h:68
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
Definition RtypesCore.h:60
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:71
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
long long Long64_t
Portable signed long integer 8 bytes.
Definition RtypesCore.h:83
unsigned long long ULong64_t
Portable unsigned long integer 8 bytes.
Definition RtypesCore.h:84
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition TError.cxx:208
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char mode
R__EXTERN TVirtualMutex * gInterpreterMutex
R__EXTERN TInterpreter * gCling
static TClass * R__FindScope(const char *function, UInt_t &pos, ClassInfo_t *cinfo)
Helper function to find the scope associated with a qualified function name.
#define gROOT
Definition TROOT.h:411
#define R__LOCKGUARD(mutex)
const char * proto
Definition civetweb.c:18822
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:84
TMethod * GetMethod(const char *method, const char *params, Bool_t objectIsConst=kFALSE)
Find the best method (if there is one) matching the parameters.
Definition TClass.cxx:4438
TMethod * GetMethodWithPrototype(const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Find the method with a given prototype.
Definition TClass.cxx:4483
ClassInfo_t * GetClassInfo() const
Definition TClass.h:445
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Definition TClass.cxx:2973
Global functions class (global functions are obtained from CINT).
Definition TFunction.h:30
const char * GetSignature()
Return signature of function.
virtual void CallFunc_SetArgs(CallFunc_t *, const char *) const
virtual void SetTempLevel(int) const
virtual Longptr_t CallFunc_ExecInt(CallFunc_t *, void *) const
virtual void ClassInfo_Delete(ClassInfo_t *) const
virtual EReturnType MethodCallReturnType(TFunction *func) const =0
virtual void CallFunc_ExecWithArgsAndReturn(CallFunc_t *, void *, const void *[]=nullptr, int=0, void *=nullptr) const
virtual void CallFunc_ResetArg(CallFunc_t *) const
virtual void CallFunc_SetFuncProto(CallFunc_t *, ClassInfo_t *, const char *, const char *, Longptr_t *, ROOT::EFunctionMatchMode=ROOT::kConversionMatch) const
virtual void CallFunc_Exec(CallFunc_t *, void *) const
virtual CallFunc_t * CallFunc_Factory() const
virtual void CallFunc_Init(CallFunc_t *) const
virtual ClassInfo_t * ClassInfo_Factory(Bool_t=kTRUE) const =0
virtual void CallFunc_SetFunc(CallFunc_t *, ClassInfo_t *, const char *, const char *, bool, Longptr_t *) const
virtual Bool_t CallFunc_IsValid(CallFunc_t *) const
virtual void CallFunc_SetArgArray(CallFunc_t *, Longptr_t *, Int_t) const
virtual CallFunc_t * CallFunc_FactoryCopy(CallFunc_t *) const
virtual void ClassInfo_Init(ClassInfo_t *, const char *) const
virtual void CallFunc_Delete(CallFunc_t *) const
virtual MethodInfo_t * CallFunc_FactoryMethod(CallFunc_t *) const
virtual Double_t CallFunc_ExecDouble(CallFunc_t *, void *) const
virtual void CallFunc_SetArg(CallFunc_t *, Long_t) const =0
Method or function calling interface.
Definition TMethodCall.h:37
EReturnType ReturnType()
Returns the return type of the method.
TMethodCall()
Default TMethodCall ctor.
TFunction * fMetPtr
Definition TMethodCall.h:57
TMethodCall & operator=(const TMethodCall &rhs)
Assignment operator.
~TMethodCall()
TMethodCall dtor.
Bool_t fDtorOnly
Definition TMethodCall.h:61
TString fParams
Definition TMethodCall.h:59
EReturnType fRetType
Definition TMethodCall.h:62
void ResetParam()
Reset parameter list. To be used before the first call the SetParam().
TObject * Clone(const char *newname="") const override
Return an exact copy of this object.
Longptr_t fOffset
Definition TMethodCall.h:55
static const EReturnType kOther
Definition TMethodCall.h:46
CallFunc_t * fFunc
Definition TMethodCall.h:54
TClass * fClass
Definition TMethodCall.h:56
TFunction * GetMethod()
Returns the TMethod describing the method to be executed.
static const EReturnType kNone
Definition TMethodCall.h:49
void Init(const TFunction *func)
Initialize the method invocation environment based on the TFunction object.
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.
Bool_t IsValid() const
Return true if the method call has been properly initialized and is usable.
TString fProto
Definition TMethodCall.h:60
void InitWithPrototype(TClass *cl, const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Initialize the method invocation environment.
void Execute()
void SetParam(Long_t l)
Add a long method parameter.
void SetParamPtrs(void *paramArr, Int_t nparam=-1)
Set pointers to parameters.
TString fMethod
Definition TMethodCall.h:58
Each ROOT class (see TClass) has a linked list of methods.
Definition TMethod.h:38
const char * GetName() const override
Returns name of object.
Definition TNamed.h:49
Mother of all ROOT objects.
Definition TObject.h:41
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:1071
Basic string class.
Definition TString.h:138
const char * Data() const
Definition TString.h:384
Ssiz_t Last(char c) const
Find last occurrence of a character c.
Definition TString.cxx:938
TString & Remove(Ssiz_t pos)
Definition TString.h:693
EFunctionMatchMode
TMarker m
Definition textangle.C:8
TLine l
Definition textangle.C:4