Logo ROOT  
Reference Guide
TDictionary.h
Go to the documentation of this file.
1 // @(#)root/meta:$Id$
2 // Author: Fons Rademakers 20/06/96
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 
13 #ifndef ROOT_TDictionary
14 #define ROOT_TDictionary
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TDictionary //
19 // //
20 // This class defines an abstract interface that must be implemented //
21 // by all classes that contain dictionary information. //
22 // //
23 // The dictionary is defined by the followling classes: //
24 // TDataType (typedef definitions) //
25 // TGlobal (global variables) //
26 // TFunction (global functions) //
27 // TClass (classes) //
28 // TBaseClass (base classes) //
29 // TDataMember (class datamembers) //
30 // TMethod (class methods) //
31 // TMethodArg (method arguments) //
32 // //
33 // All the above classes implement the TDictionary abstract interface //
34 // (note: the indentation shows aggregation not inheritance). //
35 // The ROOT dictionary system provides a very extensive RTTI //
36 // environment that facilitates a.o. object inspectors, object I/O, //
37 // ROOT Trees, etc. Most of the type information is provided by the //
38 // CINT C++ interpreter. //
39 // //
40 // TMethodCall (method call environment) //
41 // //
42 //////////////////////////////////////////////////////////////////////////
43 
44 #include "TNamed.h"
45 
46 #include "ESTLType.h"
47 
48 // The following are opaque type and are never really declared
49 // The specific implementation of TInterpreter will cast the
50 // value of pointer to this types to the correct type (possibly
51 // distinct from these)
52 class CallFunc_t;
53 class ClassInfo_t;
54 class BaseClassInfo_t;
55 class DataMemberInfo_t;
56 class FuncTempInfo_t;
57 class MethodInfo_t;
58 class MethodArgInfo_t;
59 class MethodArgInfo_t;
60 class TypeInfo_t;
61 class TypedefInfo_t;
62 class TDictAttributeMap;
63 
64 enum EProperty {
65  kIsClass = 0x00000001,
66  kIsStruct = 0x00000002,
67  kIsUnion = 0x00000004,
68  kIsEnum = 0x00000008,
69  kIsTypedef = 0x00000010,
70  kIsFundamental = 0x00000020,
71  kIsAbstract = 0x00000040,
72  kIsVirtual = 0x00000080,
73  kIsPureVirtual = 0x00000100,
74  kIsUnionMember = 0x00000100,
75  kIsPublic = 0x00000200,
76  kIsProtected = 0x00000400,
77  kIsPrivate = 0x00000800,
78  kIsPointer = 0x00001000,
79  kIsArray = 0x00002000,
80  kIsStatic = 0x00004000,
81  kIsDefault = 0x00008000,
82  kIsReference = 0x00010000,
83  kIsDirectInherit = 0x00020000,
84  kIsCCompiled = 0x00040000,
87  // 0x00080000 is available
88  kIsConstant = 0x00100000,
89  kIsVirtualBase = 0x00200000,
90  kIsConstPointer = 0x00400000,
91  kIsScopedEnum = 0x00800000,
92  // 0x01000000 is available
93  kIsConstexpr = 0x02000000,
94  kIsExplicit = 0x04000000,
95  kIsNamespace = 0x08000000,
96  kIsConstMethod = 0x10000000,
97  kIsUsing = 0x20000000,
98  kIsDefinedInStd = 0x40000000
99  // 0x80000000 is available
100 };
101 
103 /* The following are already defined
104  in EProperty and 'could' be part of this enums */
105 /*
106  kIsAbstract = 0x00000040,
107  kIsVirtual = 0x00000080,
108  kIsPureVirtual = 0x00000100,
109  kIsPublic = 0x00000200,
110  kIsProtected = 0x00000400,
111  kIsPrivate = 0x00000800,
112  kIsStatic = 0x00004000,
113  kIsDefault = 0x00008000,
114  kIsConstexpr = 0x02000000
115  kIsExplicit = 0x04000000,
116  kIsConstMethod = 0x10000000,
117 */
118 /* The following are already defined
119  in EProperty and related to the type of the return value */
120 /*
121  kIsConstant = 0x00100000,
122  kIsPointer = 0x00001000,
123  kIsArray = 0x00002000,
124  kIsReference = 0x00010000,
125  kIsConstPointer = 0x00400000,
126 */
127  kIsConstructor = 0x00000001,
128  kIsConversion = 0x00000002,
129  kIsDestructor = 0x00000004,
130  kIsOperator = 0x00000008,
131  kIsInlined = 0x00000010,
132  kIsTemplateSpec= 0x00000020
133 };
134 
136  kClassIsValid = 0x00000001,
137  kClassHasExplicitCtor = 0x00000010,
138  kClassHasImplicitCtor = 0x00000020,
139  kClassHasCtor = 0x00000030,
140  kClassHasDefaultCtor = 0x00000040,
141  kClassHasAssignOpr = 0x00000080,
142  kClassHasExplicitDtor = 0x00000100,
143  kClassHasImplicitDtor = 0x00000200,
144  kClassHasDtor = 0x00000300,
145  kClassHasVirtual = 0x00001000,
146  kClassIsAbstract = 0x00002000
147 };
148 
150  kParaNormal = 0, // not used
152  kParaP2P = 2, // not used
153  kParaP2P2P = 3, // not used
154  kParaRef = 100,
155  kParaRefP2P = 102, // not used
156  kParaRefP2P2P = 103 // not used
157 };
158 
159 namespace ROOT {
162  kConversionMatch = 1
163  };
164 }
165 
166 
167 class TDictionary : public TNamed {
168 
169 private:
170  TDictAttributeMap *fAttributeMap; //pointer to a class attribute map
171  ULong64_t fUpdatingTransactionCount; //!the Cling ID of the transaction that last updated the object
172 
173 protected:
175 
176 public:
179  TDictionary(const TDictionary& dict);
180  virtual ~TDictionary();
181 
182  TDictionary& operator=(const TDictionary& other);
183 
184  void CreateAttributeMap();
186  {
187  //Get the TDictAttributeMap pointer to be able to add attribute
188  //pairs key-value to the TClass.
189 
190  return fAttributeMap;
191  }
192  virtual Long_t Property() const = 0;
193  static TDictionary* GetDictionary(const char* name);
194  static TDictionary* GetDictionary(const std::type_info &typeinfo);
195 
196  // Type of STL container (returned by IsSTLContainer).
197  enum ESTLType {
212  };
213 
214  /// Kinds of members to include in lists.
215  enum class EMemberSelection {
219  };
222 
223  typedef const void *DeclId_t;
224  ClassDef(TDictionary,2) //Interface to dictionary
225 };
226 
227 #endif
TDictionary::kMap
@ kMap
Definition: TDictionary.h:203
kIsConstructor
@ kIsConstructor
Definition: TDictionary.h:127
kIsReference
@ kIsReference
Definition: TDictionary.h:82
ROOT::kSTLdeque
@ kSTLdeque
Definition: ESTLType.h:32
TDictionary::fUpdatingTransactionCount
ULong64_t fUpdatingTransactionCount
Definition: TDictionary.h:171
TDictionary::kUnorderedMultiset
@ kUnorderedMultiset
Definition: TDictionary.h:208
ROOT::kSTLvector
@ kSTLvector
Definition: ESTLType.h:30
ROOT::kSTLset
@ kSTLset
Definition: ESTLType.h:35
ROOT::kSTLunorderedmultimap
@ kSTLunorderedmultimap
Definition: ESTLType.h:45
ROOT::kSTLbitset
@ kSTLbitset
Definition: ESTLType.h:37
TDictionary::kMultiset
@ kMultiset
Definition: TDictionary.h:206
kIsClass
@ kIsClass
Definition: TDictionary.h:65
kIsPrivate
@ kIsPrivate
Definition: TDictionary.h:77
ROOT::kConversionMatch
@ kConversionMatch
Definition: TDictionary.h:162
TDictionary::TDictionary
TDictionary()
Definition: TDictionary.h:177
kIsPureVirtual
@ kIsPureVirtual
Definition: TDictionary.h:73
kIsVirtual
@ kIsVirtual
Definition: TDictionary.h:72
TDictionary::kNone
@ kNone
Definition: TDictionary.h:198
ROOT::kSTLunorderedmultiset
@ kSTLunorderedmultiset
Definition: ESTLType.h:43
ROOT::kNotSTL
@ kNotSTL
Definition: ESTLType.h:29
kIsOperator
@ kIsOperator
Definition: TDictionary.h:130
kClassIsAbstract
@ kClassIsAbstract
Definition: TDictionary.h:146
kIsPointer
@ kIsPointer
Definition: TDictionary.h:78
kIsArray
@ kIsArray
Definition: TDictionary.h:79
kIsNamespace
@ kIsNamespace
Definition: TDictionary.h:95
TNamed.h
TDictionary::~TDictionary
virtual ~TDictionary()
Definition: TDictionary.cxx:56
kIsDefinedInStd
@ kIsDefinedInStd
Definition: TDictionary.h:98
kClassIsValid
@ kClassIsValid
Definition: TDictionary.h:136
kClassHasImplicitDtor
@ kClassHasImplicitDtor
Definition: TDictionary.h:143
TDictionary::kForwardlist
@ kForwardlist
Definition: TDictionary.h:201
TDictionary::operator=
TDictionary & operator=(const TDictionary &other)
Definition: TDictionary.cxx:62
kIsExplicit
@ kIsExplicit
Definition: TDictionary.h:94
kIsCPPCompiled
@ kIsCPPCompiled
Definition: TDictionary.h:85
kIsCCompiled
@ kIsCCompiled
Definition: TDictionary.h:84
TDictionary::WantsUsingDecls
static bool WantsUsingDecls(EMemberSelection sel)
Definition: TDictionary.h:221
ROOT::kSTLlist
@ kSTLlist
Definition: ESTLType.h:31
TDictionary::kVector
@ kVector
Definition: TDictionary.h:199
TDictionary::kBitset
@ kBitset
Definition: TDictionary.h:211
kClassHasAssignOpr
@ kClassHasAssignOpr
Definition: TDictionary.h:141
kIsVirtualBase
@ kIsVirtualBase
Definition: TDictionary.h:89
bool
TDictionary::kUnorderedSet
@ kUnorderedSet
Definition: TDictionary.h:207
kIsDirectInherit
@ kIsDirectInherit
Definition: TDictionary.h:83
ROOT::kSTLmap
@ kSTLmap
Definition: ESTLType.h:33
TDictionary::fAttributeMap
TDictAttributeMap * fAttributeMap
Definition: TDictionary.h:170
TDictionary::kDeque
@ kDeque
Definition: TDictionary.h:202
EFunctionProperty
EFunctionProperty
Definition: TDictionary.h:102
kIsConstant
@ kIsConstant
Definition: TDictionary.h:88
TDictionary::kUnorderedMultimap
@ kUnorderedMultimap
Definition: TDictionary.h:210
TDictAttributeMap
The ROOT object has a list of properties which are stored and retrieved using TDictAttributeMap.
Definition: TDictAttributeMap.h:30
kClassHasDtor
@ kClassHasDtor
Definition: TDictionary.h:144
kIsProtected
@ kIsProtected
Definition: TDictionary.h:76
TDictionary::kList
@ kList
Definition: TDictionary.h:200
ROOT::kSTLmultiset
@ kSTLmultiset
Definition: ESTLType.h:36
TDictionary::EMemberSelection::kOnlyUsingDecls
@ kOnlyUsingDecls
ROOT::kSTLforwardlist
@ kSTLforwardlist
Definition: ESTLType.h:41
TDictionary::kMultimap
@ kMultimap
Definition: TDictionary.h:204
kIsStatic
@ kIsStatic
Definition: TDictionary.h:80
kParaRef
@ kParaRef
Definition: TDictionary.h:154
TDictionary::DeclId_t
const void * DeclId_t
Definition: TDictionary.h:223
TDictionary::EMemberSelection::kNoUsingDecls
@ kNoUsingDecls
ERefTypeValues
ERefTypeValues
Definition: TDictionary.h:149
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
TDictionary::kUnorderedMap
@ kUnorderedMap
Definition: TDictionary.h:209
TDictionary::WantsRegularMembers
static bool WantsRegularMembers(EMemberSelection sel)
Definition: TDictionary.h:220
kParaP2P2P
@ kParaP2P2P
Definition: TDictionary.h:153
TDictionary::EMemberSelection::kAlsoUsingDecls
@ kAlsoUsingDecls
Long_t
long Long_t
Definition: RtypesCore.h:54
TDictionary::kSet
@ kSet
Definition: TDictionary.h:205
kIsFundamental
@ kIsFundamental
Definition: TDictionary.h:70
EProperty
EProperty
Definition: TDictionary.h:64
TDictionary::GetAttributeMap
TDictAttributeMap * GetAttributeMap() const
Definition: TDictionary.h:185
ROOT::kSTLunorderedset
@ kSTLunorderedset
Definition: ESTLType.h:42
ROOT::kSTLmultimap
@ kSTLmultimap
Definition: ESTLType.h:34
kClassHasExplicitCtor
@ kClassHasExplicitCtor
Definition: TDictionary.h:137
ROOT::kExactMatch
@ kExactMatch
Definition: TDictionary.h:161
kClassHasImplicitCtor
@ kClassHasImplicitCtor
Definition: TDictionary.h:138
kParaRefP2P
@ kParaRefP2P
Definition: TDictionary.h:155
TDictionary
This class defines an abstract interface that must be implemented by all classes that contain diction...
Definition: TDictionary.h:167
kIsConversion
@ kIsConversion
Definition: TDictionary.h:128
TDictionary::ESTLType
ESTLType
Definition: TDictionary.h:197
ROOT::EFunctionMatchMode
EFunctionMatchMode
Definition: TDictionary.h:160
kIsDefault
@ kIsDefault
Definition: TDictionary.h:81
kParaNormal
@ kParaNormal
Definition: TDictionary.h:150
kClassHasExplicitDtor
@ kClassHasExplicitDtor
Definition: TDictionary.h:142
ULong64_t
unsigned long long ULong64_t
Definition: RtypesCore.h:74
kParaRefP2P2P
@ kParaRefP2P2P
Definition: TDictionary.h:156
kIsTemplateSpec
@ kIsTemplateSpec
Definition: TDictionary.h:132
kIsStruct
@ kIsStruct
Definition: TDictionary.h:66
kIsConstMethod
@ kIsConstMethod
Definition: TDictionary.h:96
kClassHasCtor
@ kClassHasCtor
Definition: TDictionary.h:139
kIsEnum
@ kIsEnum
Definition: TDictionary.h:68
kParaReference
@ kParaReference
Definition: TDictionary.h:151
kIsUnionMember
@ kIsUnionMember
Definition: TDictionary.h:74
kIsCompiled
@ kIsCompiled
Definition: TDictionary.h:86
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TDictionary::EMemberSelection
EMemberSelection
Kinds of members to include in lists.
Definition: TDictionary.h:215
kIsDestructor
@ kIsDestructor
Definition: TDictionary.h:129
name
char name[80]
Definition: TGX11.cxx:110
kIsPublic
@ kIsPublic
Definition: TDictionary.h:75
ROOT::kSTLunorderedmap
@ kSTLunorderedmap
Definition: ESTLType.h:44
kClassHasDefaultCtor
@ kClassHasDefaultCtor
Definition: TDictionary.h:140
TDictionary::UpdateInterpreterStateMarker
Bool_t UpdateInterpreterStateMarker()
the Cling ID of the transaction that last updated the object
Definition: TDictionary.cxx:109
kParaP2P
@ kParaP2P
Definition: TDictionary.h:152
ESTLType.h
kIsInlined
@ kIsInlined
Definition: TDictionary.h:131
TDictionary::TDictionary
TDictionary(const char *name)
Definition: TDictionary.h:178
kIsUnion
@ kIsUnion
Definition: TDictionary.h:67
kIsScopedEnum
@ kIsScopedEnum
Definition: TDictionary.h:91
kClassHasVirtual
@ kClassHasVirtual
Definition: TDictionary.h:145
kIsConstexpr
@ kIsConstexpr
Definition: TDictionary.h:93
TDictionary::Property
virtual Long_t Property() const =0
TDictionary::GetDictionary
static TDictionary * GetDictionary(const char *name)
Definition: TDictionary.cxx:84
kIsUsing
@ kIsUsing
Definition: TDictionary.h:97
kIsTypedef
@ kIsTypedef
Definition: TDictionary.h:69
kIsConstPointer
@ kIsConstPointer
Definition: TDictionary.h:90
ROOT
VSD Structures.
Definition: StringConv.hxx:21
EClassProperty
EClassProperty
Definition: TDictionary.h:135
TDictionary::CreateAttributeMap
void CreateAttributeMap()
Definition: TDictionary.cxx:75
kIsAbstract
@ kIsAbstract
Definition: TDictionary.h:71