ROOT logo
ROOT » CORE » META » TMethodCall

class TMethodCall: public TObject


TMethodCall

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
espicially 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().


Function Members (Methods)

public:
TMethodCall()
TMethodCall(const TMethodCall& org)
TMethodCall(const char* function, const char* params)
TMethodCall(TClass* cl, const char* method, const char* params)
virtual~TMethodCall()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
voidCallDtorOnly(Bool_t set = kTRUE)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
voidExecute()
voidExecute(void* object)
voidExecute(const char* params)
voidExecute(Long_t& retLong)
voidExecute(Double_t& retDouble)
voidExecute(void* object, const char* params)
voidExecute(void* object, Long_t& retLong)
voidExecute(void* object, Double_t& retDouble)
voidExecute(void* object, char** retText)
voidExecute(const char* params, Long_t& retLong)
voidExecute(const char* params, Double_t& retDouble)
voidExecute(void* object, const char* params, Long_t& retLong)
voidExecute(void* object, const char* params, Double_t& retDouble)
voidExecute(void* object, const char* params, char** retText)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
TFunction*GetMethod()
const char*GetMethodName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
const char*GetParams() const
const char*GetProto() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
voidInit(const char* function, const char* params)
voidInit(TClass* cl, const char* method, const char* params)
voidInitWithPrototype(const char* function, const char* proto)
voidInitWithPrototype(TClass* cl, const char* method, const char* proto)
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tIsValid() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TMethodCall&operator=(const TMethodCall& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
voidResetParam()
TMethodCall::EReturnTypeReturnType()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetParam(Long_t l)
voidSetParam(Double_t d)
voidSetParam(Long64_t ll)
voidSetParam(ULong64_t ull)
voidSetParamPtrs(void* paramArr, Int_t nparam = -1)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
virtual voidExecute(const char*, const char*, int* = 0)
virtual voidExecute(TMethod*, TObjArray*, int* = 0)
voidInitImplementation(const char* methodname, const char* params, const char* proto, TClass* cl, const ClassInfo_t* cinfo)

Data Members

public:
enum EReturnType { kLong
kDouble
kString
kOther
kNone
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
private:
TClass*fClasspointer to the class info
Bool_tfDtorOnlycall only dtor and not delete when calling ~xxx
CallFunc_t*fFuncCINT method invocation environment
TFunction*fMetPtrpointer to the method or function info
TStringfMethodmethod name
Long_tfOffsetoffset added to object pointer before method invocation
TStringfParamsargument string
TStringfProtoprototype string
TMethodCall::EReturnTypefRetTypemethod return type

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TMethodCall()
 Default TMethodCall ctor. Use Init() to initialize the method call
 environment.
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(...).
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(...).
TMethodCall(const TMethodCall& org)
 Copy ctor.
TMethodCall & operator=(const TMethodCall& rhs)
 Assignement operator.
~TMethodCall()
 TMethodCall dtor.
TObject * Clone(const char* newname = "") const
 Return an exact copy of this object.
void Init(TClass* cl, const char* method, const char* params)
 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(...).
void 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(...).
void InitImplementation(const char* methodname, const char* params, const char* proto, TClass* cl, const ClassInfo_t* cinfo)
 This function implements Init and InitWithPrototype.
void InitWithPrototype(TClass* cl, const char* method, const char* proto)
 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(...).
void InitWithPrototype(const char* function, const char* proto)
 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(...).
Bool_t IsValid() const
 Return true if the method call has been properly initialized and is
 usable.
TFunction * 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.
void Execute(void* object)
 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, Long_t& retLong)
 Execute the method (with preset arguments) for the specified object.
void Execute(void* object, const char* params, Long_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, const char* params, Double_t& retDouble)
 Execute the method for the specified object and argument values.
void Execute(void* object, char** retText)
 Execute the method (with preset arguments) for the specified object.
void Execute(void* object, const char* params, char** retText)
 Execute the method for the specified object and argument values.
void 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.
void ResetParam()
 Reset parameter list. To be used before the first call the SetParam().
void SetParam(Long_t l)
 Add a long method parameter.
void SetParam(Double_t d)
 Add a double method parameter.
void SetParam(Long64_t ll)
 Add a long long method parameter.
void SetParam(ULong64_t ull)
 Add a unsigned long long method parameter.
void Execute()
{ Execute((void *)0); }
void Execute(const char* params)
{ Execute((void *)0, params); }
void Execute(Long_t& retLong)
{ Execute((void *)0, retLong); }
void Execute(const char* params, Long_t& retLong)
{ Execute((void *)0, params, retLong); }
void Execute(Double_t& retDouble)
{ Execute((void *)0, retDouble); }
void Execute(const char* params, Double_t& retDouble)
{ Execute((void *)0, params, retDouble); }
void Execute(const char* , const char* , int* = 0)
{ }
void Execute(TMethod* , TObjArray* , int* = 0)
{ }
void CallDtorOnly(Bool_t set = kTRUE)
{ fDtorOnly = set; }
const char * GetMethodName() const
{ return fMethod.Data(); }
const char * GetParams() const
{ return fParams.Data(); }
const char * GetProto() const
{ return fProto.Data(); }