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 };
133 
135  kClassIsValid = 0x00000001,
136  kClassHasExplicitCtor = 0x00000010,
137  kClassHasImplicitCtor = 0x00000020,
138  kClassHasCtor = 0x00000030,
139  kClassHasDefaultCtor = 0x00000040,
140  kClassHasAssignOpr = 0x00000080,
141  kClassHasExplicitDtor = 0x00000100,
142  kClassHasImplicitDtor = 0x00000200,
143  kClassHasDtor = 0x00000300,
144  kClassHasVirtual = 0x00001000,
145  kClassIsAbstract = 0x00002000
146 };
147 
149  kParaNormal = 0, // not used
151  kParaP2P = 2, // not used
152  kParaP2P2P = 3, // not used
153  kParaRef = 100,
154  kParaRefP2P = 102, // not used
155  kParaRefP2P2P = 103 // not used
156 };
157 
158 namespace ROOT {
162  };
163 }
164 
165 
166 class TDictionary : public TNamed {
167 
168 private:
169  TDictAttributeMap *fAttributeMap; //pointer to a class attribute map
170  ULong64_t fUpdatingTransactionCount; //!the Cling ID of the transaction that last updated the object
171 
172 protected:
174 
175 public:
178  TDictionary(const TDictionary& dict);
179  virtual ~TDictionary();
180 
181  TDictionary& operator=(const TDictionary& other);
182 
183  void CreateAttributeMap();
185  {
186  //Get the TDictAttributeMap pointer to be able to add attribute
187  //pairs key-value to the TClass.
188 
189  return fAttributeMap;
190  }
191  virtual Long_t Property() const = 0;
192  static TDictionary* GetDictionary(const char* name);
193  static TDictionary* GetDictionary(const std::type_info &typeinfo);
194 
195  // Type of STL container (returned by IsSTLContainer).
196  enum ESTLType {
211  };
212 
213  /// Kinds of members to include in lists.
214  enum class EMemberSelection {
218  };
221 
222  typedef const void *DeclId_t;
223  ClassDef(TDictionary,2) //Interface to dictionary
224 };
225 
226 #endif
EMemberSelection
Kinds of members to include in lists.
Definition: TDictionary.h:214
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: StringConv.hxx:21
Bool_t UpdateInterpreterStateMarker()
the Cling ID of the transaction that last updated the object
TDictionary & operator=(const TDictionary &other)
Definition: TDictionary.cxx:62
static TDictionary * GetDictionary(const char *name)
Definition: TDictionary.cxx:84
void CreateAttributeMap()
Definition: TDictionary.cxx:75
const void * DeclId_t
Definition: TDictionary.h:222
ULong64_t fUpdatingTransactionCount
Definition: TDictionary.h:170
#define ClassDef(name, id)
Definition: Rtypes.h:322
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
EFunctionMatchMode
Definition: TDictionary.h:159
EProperty
Definition: TDictionary.h:64
virtual ~TDictionary()
Definition: TDictionary.cxx:56
EClassProperty
Definition: TDictionary.h:134
This class defines an abstract interface that must be implemented by all classes that contain diction...
Definition: TDictionary.h:166
ERefTypeValues
Definition: TDictionary.h:148
static bool WantsUsingDecls(EMemberSelection sel)
Definition: TDictionary.h:220
TDictionary(const char *name)
Definition: TDictionary.h:177
TDictAttributeMap * fAttributeMap
Definition: TDictionary.h:169
long Long_t
Definition: RtypesCore.h:52
The ROOT object has a list of properties which are stored and retrieved using TDictAttributeMap.
unsigned long long ULong64_t
Definition: RtypesCore.h:72
TDictAttributeMap * GetAttributeMap() const
Definition: TDictionary.h:184
EFunctionProperty
Definition: TDictionary.h:102
virtual Long_t Property() const =0
static bool WantsRegularMembers(EMemberSelection sel)
Definition: TDictionary.h:219
char name[80]
Definition: TGX11.cxx:109