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