Logo ROOT   6.16/01
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)
52class CallFunc_t;
53class ClassInfo_t;
54class BaseClassInfo_t;
55class DataMemberInfo_t;
56class FuncTempInfo_t;
57class MethodInfo_t;
58class MethodArgInfo_t;
59class MethodArgInfo_t;
60class TypeInfo_t;
61class TypedefInfo_t;
63
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 kIsPublic = 0x00000200,
75 kIsProtected = 0x00000400,
76 kIsPrivate = 0x00000800,
77 kIsPointer = 0x00001000,
78 kIsArray = 0x00002000,
79 kIsStatic = 0x00004000,
80 kIsDefault = 0x00008000,
81 kIsReference = 0x00010000,
82 kIsDirectInherit = 0x00020000,
83 kIsCCompiled = 0x00040000,
84 kIsCPPCompiled = 0x00080000,
85 kIsCompiled = 0x000C0000,
86 kIsConstant = 0x00100000,
87 kIsVirtualBase = 0x00200000,
88 kIsConstPointer = 0x00400000,
89 kIsScopedEnum = 0x00800000,
90 kIsExplicit = 0x04000000,
91 kIsNamespace = 0x08000000,
92 kIsConstMethod = 0x10000000,
93 kIsUsingVariable = 0x20000000,
94 kIsDefinedInStd = 0x40000000
95};
96
98/* The following are already defined
99 in EProperty and 'could' be part of this enums */
100/*
101 kIsAbstract = 0x00000040,
102 kIsVirtual = 0x00000080,
103 kIsPureVirtual = 0x00000100,
104 kIsPublic = 0x00000200,
105 kIsProtected = 0x00000400,
106 kIsPrivate = 0x00000800,
107 kIsStatic = 0x00004000,
108 kIsDefault = 0x00008000,
109 kIsExplicit = 0x04000000,
110 kIsConstMethod = 0x10000000,
111*/
112/* The following are already defined
113 in EProperty and related to the type of the return value */
114/*
115 kIsConstant = 0x00100000,
116 kIsPointer = 0x00001000,
117 kIsArray = 0x00002000,
118 kIsReference = 0x00010000,
119 kIsConstPointer = 0x00400000,
120*/
121 kIsConstructor = 0x00000001,
122 kIsConversion = 0x00000002,
123 kIsDestructor = 0x00000004,
124 kIsOperator = 0x00000008
126
128 kClassIsValid = 0x00000001,
131 kClassHasCtor = 0x00000030,
133 kClassHasAssignOpr = 0x00000080,
136 kClassHasDtor = 0x00000300,
137 kClassHasVirtual = 0x00001000,
138 kClassIsAbstract = 0x00002000
140
142 kParaNormal = 0, // not used
144 kParaP2P = 2, // not used
145 kParaP2P2P = 3, // not used
146 kParaRef = 100,
147 kParaRefP2P = 102, // not used
148 kParaRefP2P2P = 103 // not used
150
151namespace ROOT {
155 };
156}
157
158
159class TDictionary : public TNamed {
160
161private:
162 TDictAttributeMap *fAttributeMap; //pointer to a class attribute map
163 ULong64_t fUpdatingTransactionCount; //!the Cling ID of the transaction that last updated the object
164
165protected:
167
168public:
171 TDictionary(const TDictionary& dict);
172 virtual ~TDictionary();
173
174 TDictionary& operator=(const TDictionary& other);
175
176 void CreateAttributeMap();
178 {
179 //Get the TDictAttributeMap pointer to be able to add attribute
180 //pairs key-value to the TClass.
181
182 return fAttributeMap;
183 }
184 virtual Long_t Property() const = 0;
185 static TDictionary* GetDictionary(const char* name);
186 static TDictionary* GetDictionary(const std::type_info &typeinfo);
187
188 // Type of STL container (returned by IsSTLContainer).
189 enum ESTLType {
204 };
205
206 typedef const void *DeclId_t;
207 ClassDef(TDictionary,2) //Interface to dictionary
208};
209
210#endif
long Long_t
Definition: RtypesCore.h:50
bool Bool_t
Definition: RtypesCore.h:59
unsigned long long ULong64_t
Definition: RtypesCore.h:70
#define ClassDef(name, id)
Definition: Rtypes.h:324
EFunctionProperty
Definition: TDictionary.h:97
@ kIsDestructor
Definition: TDictionary.h:123
@ kIsConversion
Definition: TDictionary.h:122
@ kIsConstructor
Definition: TDictionary.h:121
@ kIsOperator
Definition: TDictionary.h:124
EClassProperty
Definition: TDictionary.h:127
@ kClassHasExplicitCtor
Definition: TDictionary.h:129
@ kClassHasAssignOpr
Definition: TDictionary.h:133
@ kClassHasImplicitCtor
Definition: TDictionary.h:130
@ kClassHasDefaultCtor
Definition: TDictionary.h:132
@ kClassIsValid
Definition: TDictionary.h:128
@ kClassIsAbstract
Definition: TDictionary.h:138
@ kClassHasVirtual
Definition: TDictionary.h:137
@ kClassHasCtor
Definition: TDictionary.h:131
@ kClassHasExplicitDtor
Definition: TDictionary.h:134
@ kClassHasImplicitDtor
Definition: TDictionary.h:135
@ kClassHasDtor
Definition: TDictionary.h:136
EProperty
Definition: TDictionary.h:64
@ kIsPublic
Definition: TDictionary.h:74
@ kIsCPPCompiled
Definition: TDictionary.h:84
@ kIsDefault
Definition: TDictionary.h:80
@ kIsCCompiled
Definition: TDictionary.h:83
@ kIsPointer
Definition: TDictionary.h:77
@ kIsScopedEnum
Definition: TDictionary.h:89
@ kIsConstant
Definition: TDictionary.h:86
@ kIsConstMethod
Definition: TDictionary.h:92
@ kIsClass
Definition: TDictionary.h:65
@ kIsReference
Definition: TDictionary.h:81
@ kIsEnum
Definition: TDictionary.h:68
@ kIsPrivate
Definition: TDictionary.h:76
@ kIsConstPointer
Definition: TDictionary.h:88
@ kIsFundamental
Definition: TDictionary.h:70
@ kIsCompiled
Definition: TDictionary.h:85
@ kIsAbstract
Definition: TDictionary.h:71
@ kIsArray
Definition: TDictionary.h:78
@ kIsStatic
Definition: TDictionary.h:79
@ kIsExplicit
Definition: TDictionary.h:90
@ kIsStruct
Definition: TDictionary.h:66
@ kIsProtected
Definition: TDictionary.h:75
@ kIsVirtual
Definition: TDictionary.h:72
@ kIsUnion
Definition: TDictionary.h:67
@ kIsPureVirtual
Definition: TDictionary.h:73
@ kIsNamespace
Definition: TDictionary.h:91
@ kIsUsingVariable
Definition: TDictionary.h:93
@ kIsVirtualBase
Definition: TDictionary.h:87
@ kIsTypedef
Definition: TDictionary.h:69
@ kIsDefinedInStd
Definition: TDictionary.h:94
@ kIsDirectInherit
Definition: TDictionary.h:82
ERefTypeValues
Definition: TDictionary.h:141
@ kParaRef
Definition: TDictionary.h:146
@ kParaNormal
Definition: TDictionary.h:142
@ kParaRefP2P
Definition: TDictionary.h:147
@ kParaReference
Definition: TDictionary.h:143
@ kParaP2P
Definition: TDictionary.h:144
@ kParaP2P2P
Definition: TDictionary.h:145
@ kParaRefP2P2P
Definition: TDictionary.h:148
The ROOT object has a list of properties which are stored and retrieved using TDictAttributeMap.
This class defines an abstract interface that must be implemented by all classes that contain diction...
Definition: TDictionary.h:159
virtual Long_t Property() const =0
TDictAttributeMap * fAttributeMap
Definition: TDictionary.h:162
TDictAttributeMap * GetAttributeMap() const
Definition: TDictionary.h:177
TDictionary(const char *name)
Definition: TDictionary.h:170
ULong64_t fUpdatingTransactionCount
Definition: TDictionary.h:163
Bool_t UpdateInterpreterStateMarker()
the Cling ID of the transaction that last updated the object
@ kUnorderedMultimap
Definition: TDictionary.h:202
@ kUnorderedMultiset
Definition: TDictionary.h:200
TDictionary & operator=(const TDictionary &other)
Definition: TDictionary.cxx:62
static TDictionary * GetDictionary(const char *name)
Definition: TDictionary.cxx:84
const void * DeclId_t
Definition: TDictionary.h:206
void CreateAttributeMap()
Definition: TDictionary.cxx:75
virtual ~TDictionary()
Definition: TDictionary.cxx:56
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
@ kSTLbitset
Definition: ESTLType.h:37
@ kSTLmap
Definition: ESTLType.h:33
@ kSTLunorderedmultiset
Definition: ESTLType.h:43
@ kSTLset
Definition: ESTLType.h:35
@ kSTLmultiset
Definition: ESTLType.h:36
@ kSTLdeque
Definition: ESTLType.h:32
@ kSTLvector
Definition: ESTLType.h:30
@ kSTLunorderedmultimap
Definition: ESTLType.h:45
@ kSTLunorderedset
Definition: ESTLType.h:42
@ kSTLlist
Definition: ESTLType.h:31
@ kSTLforwardlist
Definition: ESTLType.h:41
@ kSTLunorderedmap
Definition: ESTLType.h:44
@ kNotSTL
Definition: ESTLType.h:29
@ kSTLmultimap
Definition: ESTLType.h:34
EFunctionMatchMode
Definition: TDictionary.h:152
@ kExactMatch
Definition: TDictionary.h:153
@ kConversionMatch
Definition: TDictionary.h:154