Logo ROOT   6.14/05
Reference Guide
TFunction.h
Go to the documentation of this file.
1 // @(#)root/meta:$Id$
2 // Author: Fons Rademakers 07/02/97
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 #ifndef ROOT_TFunction
13 #define ROOT_TFunction
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TFunction //
19 // //
20 // Dictionary of global functions. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #include "TDictionary.h"
25 
26 class TMethodCall;
27 
28 class TFunction : public TDictionary {
29 
30 friend class TCling;
31 friend class TMethodCall;
32 
33 protected:
34  MethodInfo_t *fInfo; //pointer to Interpreter function info
35  TString fMangledName; //Mangled name as determined by CINT.
36  TString fSignature; //string containing function signature
37  TList *fMethodArgs; //list of function arguments
38 
39  virtual void CreateSignature();
40 
41 public:
42  TFunction(MethodInfo_t *info = 0);
43  TFunction(const TFunction &orig);
44  TFunction& operator=(const TFunction &rhs);
45  virtual ~TFunction();
46  virtual TObject *Clone(const char *newname="") const;
47  virtual const char *GetMangledName() const;
48  virtual const char *GetPrototype() const;
49  const char *GetSignature();
50  const char *GetReturnTypeName() const;
51  std::string GetReturnTypeNormalizedName() const;
53  Int_t GetNargs() const;
54  Int_t GetNargsOpt() const;
55  DeclId_t GetDeclId() const;
56  void *InterfaceMethod() const;
57  virtual Bool_t IsValid();
58  virtual void Print(Option_t *option="") const;
59  Long_t Property() const;
60  Long_t ExtraProperty() const;
61  virtual bool Update(MethodInfo_t *info);
62 
63  virtual void ls(Option_t *option="") const;
64 
65  ClassDef(TFunction,0) //Dictionary for global function
66 };
67 
68 #endif
virtual void CreateSignature()
Using the CINT method arg information to create a complete signature string.
Definition: TFunction.cxx:106
virtual TObject * Clone(const char *newname="") const
Clone method.
Definition: TFunction.cxx:96
const char * GetReturnTypeName() const
Get full type description of function return type, e,g.: "class TDirectory*".
Definition: TFunction.cxx:140
const char Option_t
Definition: RtypesCore.h:62
TFunction(MethodInfo_t *info=0)
Default TFunction ctor.
Definition: TFunction.cxx:34
Basic string class.
Definition: TString.h:131
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const void * DeclId_t
Definition: TDictionary.h:205
MethodInfo_t * fInfo
Definition: TFunction.h:34
TString fSignature
Definition: TFunction.h:36
#define ClassDef(name, id)
Definition: Rtypes.h:320
TFunction & operator=(const TFunction &rhs)
Assignment operator.
Definition: TFunction.cxx:62
void * InterfaceMethod() const
Return pointer to the interface method.
Definition: TFunction.cxx:208
std::string GetReturnTypeNormalizedName() const
Get the normalized name of the return type.
Definition: TFunction.cxx:154
friend class TCling
Definition: TFunction.h:30
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
Definition: TFunction.cxx:183
Method or function calling interface.
Definition: TMethodCall.h:37
TList * fMethodArgs
Definition: TFunction.h:37
A doubly linked list.
Definition: TList.h:44
virtual void ls(Option_t *option="") const
List TFunction name and title.
Definition: TFunction.cxx:257
Int_t GetNargs() const
Number of function arguments.
Definition: TFunction.cxx:164
This class defines an abstract interface that must be implemented by all classes that contain diction...
Definition: TDictionary.h:158
virtual bool Update(MethodInfo_t *info)
Update the TFunction to reflect the new info.
Definition: TFunction.cxx:278
long Long_t
Definition: RtypesCore.h:50
TString fMangledName
Definition: TFunction.h:35
TList * GetListOfMethodArgs()
Return list containing the TMethodArgs of a TFunction.
Definition: TFunction.cxx:126
virtual ~TFunction()
TFunction dtor deletes adopted CINT MethodInfo.
Definition: TFunction.cxx:84
virtual const char * GetPrototype() const
Returns the prototype of a function as defined by CINT, or 0 in case of error.
Definition: TFunction.cxx:245
Long_t ExtraProperty() const
Get property description word. For meaning of bits see EProperty.
Definition: TFunction.cxx:191
Mother of all ROOT objects.
Definition: TObject.h:37
virtual void Print(Option_t *option="") const
Print TFunction name and title.
Definition: TFunction.cxx:267
virtual const char * GetMangledName() const
Returns the mangled name as defined by CINT, or 0 in case of error.
Definition: TFunction.cxx:236
Global functions class (global functions are obtained from CINT).
Definition: TFunction.h:28
virtual Bool_t IsValid()
Return true if this function object is pointing to a currently loaded function.
Definition: TFunction.cxx:218
Int_t GetNargsOpt() const
Number of function optional (default) arguments.
Definition: TFunction.cxx:174
DeclId_t GetDeclId() const
Definition: TFunction.cxx:198
const char * GetSignature()
Return signature of function.
Definition: TFunction.cxx:115