Logo ROOT  
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 #include <string>
27 
28 class TMethodCall;
29 
30 class TFunction : public TDictionary {
31 
32 friend class TCling;
33 friend class TMethodCall;
34 
35 protected:
36  MethodInfo_t *fInfo; //pointer to Interpreter function info
37  TString fMangledName; //Mangled name as determined by CINT.
38  TString fSignature; //string containing function signature
39  TList *fMethodArgs; //list of function arguments
40 
41  virtual void CreateSignature();
42 
43 public:
44  TFunction(MethodInfo_t *info = 0);
45  TFunction(const TFunction &orig);
46  TFunction& operator=(const TFunction &rhs);
47  virtual ~TFunction();
48  virtual TObject *Clone(const char *newname="") const;
49  virtual const char *GetMangledName() const;
50  virtual const char *GetPrototype() const;
51  const char *GetSignature();
52  const char *GetReturnTypeName() const;
53  std::string GetReturnTypeNormalizedName() const;
55  Int_t GetNargs() const;
56  Int_t GetNargsOpt() const;
57  DeclId_t GetDeclId() const;
58  void *InterfaceMethod() const;
59  virtual Bool_t IsValid();
60  virtual void Print(Option_t *option="") const;
61  Long_t Property() const;
62  Long_t ExtraProperty() const;
63  virtual bool Update(MethodInfo_t *info);
64 
65  virtual void ls(Option_t *option="") const;
66 
67  ClassDef(TFunction,0) //Dictionary for global function
68 };
69 
70 #endif
TFunction::operator=
TFunction & operator=(const TFunction &rhs)
Assignment operator.
Definition: TFunction.cxx:63
TFunction::TFunction
TFunction(MethodInfo_t *info=0)
Default TFunction ctor.
Definition: TFunction.cxx:35
Option_t
const char Option_t
Definition: RtypesCore.h:66
TFunction::fMangledName
TString fMangledName
Definition: TFunction.h:37
TFunction::GetListOfMethodArgs
TList * GetListOfMethodArgs()
Return list containing the TMethodArgs of a TFunction.
Definition: TFunction.cxx:127
TFunction::fSignature
TString fSignature
Definition: TFunction.h:38
TFunction::GetDeclId
DeclId_t GetDeclId() const
Definition: TFunction.cxx:199
TFunction::Print
virtual void Print(Option_t *option="") const
Print TFunction name and title.
Definition: TFunction.cxx:268
TCling
This class defines an interface to the cling C++ interpreter.
Definition: TCling.h:102
TString
Basic string class.
Definition: TString.h:136
TFunction::Clone
virtual TObject * Clone(const char *newname="") const
Clone method.
Definition: TFunction.cxx:97
bool
TFunction::fInfo
MethodInfo_t * fInfo
Definition: TFunction.h:36
TFunction::IsValid
virtual Bool_t IsValid()
Return true if this function object is pointing to a currently loaded function.
Definition: TFunction.cxx:219
TDictionary.h
TFunction::GetPrototype
virtual const char * GetPrototype() const
Returns the prototype of a function as defined by CINT, or 0 in case of error.
Definition: TFunction.cxx:246
TFunction::GetNargsOpt
Int_t GetNargsOpt() const
Number of function optional (default) arguments.
Definition: TFunction.cxx:175
TFunction::GetReturnTypeNormalizedName
std::string GetReturnTypeNormalizedName() const
Get the normalized name of the return type.
Definition: TFunction.cxx:155
TFunction::Property
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
Definition: TFunction.cxx:184
TFunction::InterfaceMethod
void * InterfaceMethod() const
Return pointer to the interface method.
Definition: TFunction.cxx:209
TDictionary::DeclId_t
const void * DeclId_t
Definition: TDictionary.h:209
TFunction::fMethodArgs
TList * fMethodArgs
Definition: TFunction.h:39
Long_t
long Long_t
Definition: RtypesCore.h:54
TFunction::GetReturnTypeName
const char * GetReturnTypeName() const
Get full type description of function return type, e,g.: "class TDirectory*".
Definition: TFunction.cxx:141
TFunction::GetNargs
Int_t GetNargs() const
Number of function arguments.
Definition: TFunction.cxx:165
TFunction::ExtraProperty
Long_t ExtraProperty() const
Get property description word. For meaning of bits see EProperty.
Definition: TFunction.cxx:192
TDictionary
This class defines an abstract interface that must be implemented by all classes that contain diction...
Definition: TDictionary.h:162
TFunction::GetMangledName
virtual const char * GetMangledName() const
Returns the mangled name as defined by CINT, or 0 in case of error.
Definition: TFunction.cxx:237
TFunction::Update
virtual bool Update(MethodInfo_t *info)
Update the TFunction to reflect the new info.
Definition: TFunction.cxx:279
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
TFunction::~TFunction
virtual ~TFunction()
TFunction dtor deletes adopted CINT MethodInfo.
Definition: TFunction.cxx:85
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TFunction::GetSignature
const char * GetSignature()
Return signature of function.
Definition: TFunction.cxx:116
TMethodCall
Method or function calling interface.
Definition: TMethodCall.h:37
TFunction::CreateSignature
virtual void CreateSignature()
Using the CINT method arg information to create a complete signature string.
Definition: TFunction.cxx:107
TFunction
Global functions class (global functions are obtained from CINT).
Definition: TFunction.h:30
TList
A doubly linked list.
Definition: TList.h:44
int
TFunction::ls
virtual void ls(Option_t *option="") const
List TFunction name and title.
Definition: TFunction.cxx:258