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   	#include "Property.h"
49   	
50   	class TDictAttributeMap;
51   	
52   	typedef void CallFunc_t;
53   	typedef void ClassInfo_t;
54   	typedef void BaseClassInfo_t;
55   	typedef void DataMemberInfo_t;
56   	typedef void MethodInfo_t;
57   	typedef void MethodArgInfo_t;
58   	typedef void MethodArgInfo_t;
59   	typedef void TypeInfo_t;
60   	typedef void TypedefInfo_t;
61   	
62   	#ifndef ROOT_ESTLType
63   	#include "ESTLType.h"
64   	#endif
65   	
66   	enum EProperty {
67   	   kIsClass        = G__BIT_ISCLASS,
68   	   kIsStruct       = G__BIT_ISSTRUCT,
69   	   kIsUnion        = G__BIT_ISUNION,
70   	   kIsEnum         = G__BIT_ISENUM,
71   	   kIsNamespace    = G__BIT_ISNAMESPACE,
72   	   kIsTypedef      = G__BIT_ISTYPEDEF,
73   	   kIsFundamental  = G__BIT_ISFUNDAMENTAL,
74   	   kIsAbstract     = G__BIT_ISABSTRACT,
75   	   kIsVirtual      = G__BIT_ISVIRTUAL,
76   	   kIsPureVirtual  = G__BIT_ISPUREVIRTUAL,
77   	   kIsPublic       = G__BIT_ISPUBLIC,
78   	   kIsProtected    = G__BIT_ISPROTECTED,
79   	   kIsPrivate      = G__BIT_ISPRIVATE,
80   	   kIsPointer      = G__BIT_ISPOINTER,
81   	   kIsArray        = G__BIT_ISARRAY,
82   	   kIsStatic       = G__BIT_ISSTATIC,
83   	   kIsUsingVariable= G__BIT_ISUSINGVARIABLE,
84   	   kIsDefault      = G__BIT_ISDEFAULT,
85   	   kIsReference    = G__BIT_ISREFERENCE,
86   	   kIsConstant     = G__BIT_ISCONSTANT,
87   	   kIsConstPointer = G__BIT_ISPCONSTANT,
88   	   kIsMethConst    = G__BIT_ISMETHCONSTANT
89   	};
90   	
91   	
92   	class TDictionary : public TNamed {
93   	
94   	private:
95   	   TDictAttributeMap *fAttributeMap;    //pointer to a dictionary attribute map
96   	
97   	public:
98   	   TDictionary(): fAttributeMap(0) { }
99   	   TDictionary(const char* name): TNamed(name, ""), fAttributeMap(0) { }
100  	   TDictionary(const TDictionary& dict);
101  	   virtual ~TDictionary();
102  	
103  	   TDictionary& operator=(const TDictionary& other);
104  	   void               CreateAttributeMap();
105  	   TDictAttributeMap *GetAttributeMap() const
106  	   {
107  	      //Get the TDictAttributeMap pointer to be able to add attribute
108  	      //pairs key-value to the TClass.
109  	      return fAttributeMap;
110  	   }
111  	   virtual Long_t      Property() const = 0;
112  	   static TDictionary* GetDictionary(const char* name);
113  	   static TDictionary* GetDictionary(const type_info &typeinfo);
114  	
115  	   // Type of STL container (returned by IsSTLContainer).
116  	   enum ESTLType {
117  	      kNone      = ROOT::kNotSTL,
118  	      kVector    = ROOT::kSTLvector,
119  	      kList      = ROOT::kSTLlist,
120  	      kDeque     = ROOT::kSTLdeque,
121  	      kMap       = ROOT::kSTLmap,
122  	      kMultimap  = ROOT::kSTLmultimap,
123  	      kSet       = ROOT::kSTLset,
124  	      kMultiset  = ROOT::kSTLmultiset,
125  	      kBitset    = ROOT::kSTLbitset
126  	   };
127  	
128  	   ClassDef(TDictionary,0)  //ABC defining interface to dictionary
129  	};
130  	
131  	#endif
132