TMethodCall


class description - source file - inheritance tree

class TMethodCall : public TObject

    private:
virtual void Execute(const char*, const char*) virtual void Execute(TMethod*, TObjArray*) 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) TClass* Class() void Execute(void* object, const char* params, Double_t& retDouble) void Execute(void* object, const char* params, char** retText) void Execute(void* object, const char* params, Long_t& retLong) void Execute(const char* params, Double_t& retDouble) void Execute(Double_t& retDouble) void Execute(const char* params, Long_t& retLong) void Execute(Long_t& retLong) void Execute(void* object) void Execute(void* object, const char* params) void Execute(void* object, Long_t& retLong) void Execute(const char* params) void Execute(void* object, Double_t& retDouble) void Execute() void Execute(void* object, char** retText) TFunction* GetMethod() const char* GetMethodName() const const char* GetParams() const const char* GetProto() const void Init(const char* function, const char* params) void Init(TClass* cl, const char* method, const char* params) void InitWithPrototype(const char* function, const char* proto) void InitWithPrototype(TClass* cl, const char* method, const char* proto) virtual TClass* IsA() const EReturnType ReturnType() void SetParamPtrs(void* paramArr) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(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 EReturnType fRetType method return type

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.

EReturnType 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.

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
               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)
        TMethodCall TMethodCall(TMethodCall&)


Author: Fons Rademakers 13/06/96
Last update: 2.23/12 26/01/2000 10.02.18 by Rene Brun
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *


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.