ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 #ifndef ROOT_TNamed
45 #include "TNamed.h"
46 #endif
47 
48 #ifndef ROOT_ESTLType
49 #include "ESTLType.h"
50 #endif
51 
52 // The following are opaque type and are never really declared
53 // The specific implemenation of TInterpreter will cast the
54 // value of pointer to this types to the correct type (possibly
55 // distinct from these)
56 class CallFunc_t;
57 class ClassInfo_t;
58 class BaseClassInfo_t;
59 class DataMemberInfo_t;
60 class FuncTempInfo_t;
61 class MethodInfo_t;
62 class MethodArgInfo_t;
63 class MethodArgInfo_t;
64 class TypeInfo_t;
65 class TypedefInfo_t;
66 class TDictAttributeMap;
67 
68 enum EProperty {
69  kIsClass = 0x00000001,
70  kIsStruct = 0x00000002,
71  kIsUnion = 0x00000004,
72  kIsEnum = 0x00000008,
73  kIsTypedef = 0x00000010,
74  kIsFundamental = 0x00000020,
75  kIsAbstract = 0x00000040,
76  kIsVirtual = 0x00000080,
77  kIsPureVirtual = 0x00000100,
78  kIsPublic = 0x00000200,
79  kIsProtected = 0x00000400,
80  kIsPrivate = 0x00000800,
81  kIsPointer = 0x00001000,
82  kIsArray = 0x00002000,
83  kIsStatic = 0x00004000,
84  kIsDefault = 0x00008000,
85  kIsReference = 0x00010000,
86  kIsDirectInherit = 0x00020000,
87  kIsCCompiled = 0x00040000,
88  kIsCPPCompiled = 0x00080000,
89  kIsCompiled = 0x000C0000,
90  kIsConstant = 0x00100000,
91  kIsVirtualBase = 0x00200000,
92  kIsConstPointer = 0x00400000,
93  kIsExplicit = 0x04000000,
94  kIsNamespace = 0x08000000,
95  kIsConstMethod = 0x10000000,
96  kIsUsingVariable = 0x20000000,
97  kIsDefinedInStd = 0x40000000
98 };
99 
101 /* The following are already defined
102  in EProperty and 'could' be part of this enums */
103 /*
104  kIsAbstract = 0x00000040,
105  kIsVirtual = 0x00000080,
106  kIsPureVirtual = 0x00000100,
107  kIsPublic = 0x00000200,
108  kIsProtected = 0x00000400,
109  kIsPrivate = 0x00000800,
110  kIsStatic = 0x00004000,
111  kIsDefault = 0x00008000,
112  kIsExplicit = 0x04000000,
113  kIsConstMethod = 0x10000000,
114 */
115 /* The following are already defined
116  in EProperty and related to the type of the return value */
117 /*
118  kIsConstant = 0x00100000,
119  kIsPointer = 0x00001000,
120  kIsArray = 0x00002000,
121  kIsReference = 0x00010000,
122  kIsConstPointer = 0x00400000,
123 */
124  kIsConstructor = 0x00000001,
125  kIsConversion = 0x00000002,
126  kIsDestructor = 0x00000004,
127  kIsOperator = 0x00000008
128 };
129 
131  kClassIsValid = 0x00000001,
132  kClassHasExplicitCtor = 0x00000010,
133  kClassHasImplicitCtor = 0x00000020,
134  kClassHasCtor = 0x00000030,
135  kClassHasDefaultCtor = 0x00000040,
136  kClassHasAssignOpr = 0x00000080,
137  kClassHasExplicitDtor = 0x00000100,
138  kClassHasImplicitDtor = 0x00000200,
139  kClassHasDtor = 0x00000300,
140  kClassHasVirtual = 0x00001000,
141  kClassIsAbstract = 0x00002000
142 };
143 
145  kParaNormal = 0, // not used
147  kParaP2P = 2, // not used
148  kParaP2P2P = 3, // not used
149  kParaRef = 100,
150  kParaRefP2P = 102, // not used
151  kParaRefP2P2P = 103 // not used
152 };
153 
154 namespace ROOT {
158  };
159 }
160 
161 
162 class TDictionary : public TNamed {
163 
164 private:
165  TDictAttributeMap *fAttributeMap; //pointer to a class attribute map
166  ULong64_t fUpdatingTransactionCount; //!the Cling ID of the transaction that last updated the object
167 
168 protected:
170 
171 public:
173  TDictionary(const char* name): TNamed(name, ""), fAttributeMap(0), fUpdatingTransactionCount(0) { }
174  TDictionary(const TDictionary& dict);
175  virtual ~TDictionary();
176 
177  TDictionary& operator=(const TDictionary& other);
178 
179  void CreateAttributeMap();
181  {
182  //Get the TDictAttributeMap pointer to be able to add attribute
183  //pairs key-value to the TClass.
184 
185  return fAttributeMap;
186  }
187  virtual Long_t Property() const = 0;
188  static TDictionary* GetDictionary(const char* name);
189  static TDictionary* GetDictionary(const type_info &typeinfo);
190 
191  // Type of STL container (returned by IsSTLContainer).
192  enum ESTLType {
207  };
208 
209  typedef const void *DeclId_t;
210  ClassDef(TDictionary,2) //Interface to dictionary
211 };
212 
213 #endif
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
bool Bool_t
Definition: RtypesCore.h:59
void CreateAttributeMap()
Definition: TDictionary.cxx:75
const void * DeclId_t
Definition: TDictionary.h:209
ULong64_t fUpdatingTransactionCount
Definition: TDictionary.h:166
#define ClassDef(name, id)
Definition: Rtypes.h:254
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
EFunctionMatchMode
Definition: TDictionary.h:155
EProperty
Definition: TDictionary.h:68
virtual ~TDictionary()
Definition: TDictionary.cxx:56
EClassProperty
Definition: TDictionary.h:130
This class defines an abstract interface that must be implemented by all classes that contain diction...
Definition: TDictionary.h:162
ERefTypeValues
Definition: TDictionary.h:144
TDictAttributeMap * GetAttributeMap() const
Definition: TDictionary.h:180
TDictionary(const char *name)
Definition: TDictionary.h:173
TDictAttributeMap * fAttributeMap
Definition: TDictionary.h:165
TEllipse dict(9, 20, 3, 1.5)
long Long_t
Definition: RtypesCore.h:50
The ROOT object has a list of properties which are stored and retrieved using TDictAttributeMap.
unsigned long long ULong64_t
Definition: RtypesCore.h:70
EFunctionProperty
Definition: TDictionary.h:100
virtual Long_t Property() const =0
#define name(a, b)
Definition: linkTestLib0.cpp:5