TMethodCall


class description - source file - inheritance tree

class TMethodCall : public TObject

    private:
virtual void Execute(const char*, const char*, int* = 0) virtual void Execute(TMethod*, TObjArray*, int* = 0) public:
TMethodCall TMethodCall() TMethodCall TMethodCall(TClass* cl, const char* method, const char* params) TMethodCall TMethodCall(const char* function, const char* params) TMethodCall TMethodCall(TMethodCall&) virtual void ~TMethodCall() void CallDtorOnly(Bool_t set = kTRUE) static TClass* Class() void Execute(void* object) void Execute(void* object, const char* params) void Execute(void* object, Long_t& retLong) void Execute(void* object, const char* params, Long_t& retLong) void Execute(void* object, Double_t& retDouble) void Execute(void* object, const char* params, Double_t& retDouble) void Execute(void* object, char** retText) void Execute(void* object, const char* params, char** retText) void Execute() void Execute(const char* params) void Execute(Long_t& retLong) void Execute(const char* params, Long_t& retLong) void Execute(Double_t& retDouble) void Execute(const char* params, Double_t& retDouble) TFunction* GetMethod() const char* GetMethodName() const const char* GetParams() const const char* GetProto() const void Init(TClass* cl, const char* method, const char* params) void Init(const char* function, const char* params) void InitWithPrototype(TClass* cl, const char* method, const char* proto) void InitWithPrototype(const char* function, const char* proto) virtual TClass* IsA() const TMethodCall::EReturnType ReturnType() void SetParamPtrs(void* paramArr) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
G__CallFunc* fFunc CINT method invocation environment Long_t fOffset offset added to object pointer before method invocation TClass* fClass pointer to the class info TFunction* fMetPtr pointer to the method or function info TString fMethod method name TString fParams argument string TString fProto prototype string Bool_t fDtorOnly call only dtor and not delete when calling ~xxx TMethodCall::EReturnType fRetType method return type public:
static const TMethodCall::EReturnType kLong static const TMethodCall::EReturnType kDouble static const TMethodCall::EReturnType kString static const TMethodCall::EReturnType kOther

Class Description

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


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()
 TMethodCall dtor.

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

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)
 ParamArr is an array containing the addresses where to take the
 function parameters. At least as many pointers should be present in
 the array as there are required arguments (all arguments - default args).



Inline Functions


                            void CallDtorOnly(Bool_t set = kTRUE)
                     const char* GetMethodName() const
                     const char* GetParams() const
                     const char* GetProto() const
        TMethodCall::EReturnType ReturnType()
                            void Execute(void* object, char** retText)
                            void Execute(void* object, const char* params, char** retText)
                            void Execute()
                            void Execute(const char* params)
                            void Execute(Long_t& retLong)
                            void Execute(const char* params, Long_t& retLong)
                            void Execute(Double_t& retDouble)
                            void Execute(const char* params, Double_t& retDouble)
                         TClass* Class()
                         TClass* IsA() const
                            void ShowMembers(TMemberInspector& insp, char* parent)
                            void Streamer(TBuffer& b)
                            void StreamerNVirtual(TBuffer& b)
                     TMethodCall TMethodCall(TMethodCall&)


Author: Fons Rademakers 13/06/96
Last update: root/meta:$Name: $:$Id: TMethodCall.cxx,v 1.10 2002/02/23 16:05:46 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.