Logo ROOT   6.12/07
Reference Guide
TGenericClassInfo.h
Go to the documentation of this file.
1 // @(#)root/meta:$Id$
2 // Author: Philippe Canal 23/2/02
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2002, Rene Brun, Fons Rademakers and al. *
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 #ifndef ROOT_TGenericClassInfo
13 #define ROOT_TGenericClassInfo
14 
15 #include <vector>
16 #include "TSchemaHelper.h"
17 #include "Rtypes.h"
18 
19 // Forward declarations
20 class TVirtualIsAProxy;
21 //class TClass;
22 //class TClassStreamer;
23 //class TVirtualCollectionProxy;
24 
25 
26 namespace ROOT {
27 
28  namespace Internal {
29  /// Returns a string with the demangled and normalized name for the given type.
30  std::string GetDemangledTypeName(const std::type_info&);
31  }
32 
33  namespace Detail {
34  class TCollectionProxyInfo;
35  }
36 
38  // This class in not inlined because it is used is non time critical
39  // section (the dictionaries) and inline would lead to too much
40  // repetition of the code (once per class!).
41 
44  const char *fClassName;
45  const char *fDeclFileName;
48  const std::type_info &fInfo;
49  const char *fImplFileName;
69  std::vector<ROOT::Internal::TSchemaHelper> fReadRules;
70  std::vector<ROOT::Internal::TSchemaHelper> fReadRawRules;
71 
72  public:
73  TGenericClassInfo(const char *fullClassname,
74  const char *declFileName, Int_t declFileLine,
75  const std::type_info &info, const Internal::TInitBehavior *action,
76  DictFuncPtr_t dictionary,
77  TVirtualIsAProxy *isa, Int_t pragmabits, Int_t sizof);
78 
79  TGenericClassInfo(const char *fullClassname, Int_t version,
80  const char *declFileName, Int_t declFileLine,
81  const std::type_info &info, const Internal::TInitBehavior *action,
82  DictFuncPtr_t dictionary,
83  TVirtualIsAProxy *isa, Int_t pragmabits, Int_t sizof);
84 
85  TGenericClassInfo(const char *fullClassname, Int_t version,
86  const char *declFileName, Int_t declFileLine,
87  const Internal::TInitBehavior *action,
88  DictFuncPtr_t dictionary, Int_t pragmabits);
89 
90  void Init(Int_t pragmabits);
92 
93  const Internal::TInitBehavior &GetAction() const;
94  TClass *GetClass();
95  const char *GetClassName() const;
96  Detail::TCollectionProxyInfo *GetCollectionProxyInfo() const;
97  Detail::TCollectionProxyInfo *GetCollectionStreamerInfo() const;
98  const char *GetDeclFileName() const;
99  Int_t GetDeclFileLine() const;
100  DelFunc_t GetDelete() const;
101  DelArrFunc_t GetDeleteArray() const;
102  DesFunc_t GetDestructor() const;
103  DirAutoAdd_t GetDirectoryAutoAdd() const;
104  const char *GetImplFileName();
105  Int_t GetImplFileLine();
106  const std::type_info &GetInfo() const;
107  TVirtualIsAProxy *GetIsA() const;
108  NewFunc_t GetNew() const;
109  NewArrFunc_t GetNewArray() const;
110  const std::vector<ROOT::Internal::TSchemaHelper> &GetReadRawRules() const;
111  const std::vector<ROOT::Internal::TSchemaHelper> &GetReadRules() const;
112  Int_t GetVersion() const;
113 
114  TClass *IsA(const void *obj);
115 
116  Short_t AdoptStreamer(TClassStreamer*);
117  Short_t AdoptCollectionProxy(TVirtualCollectionProxy*);
118  void AdoptCollectionProxyInfo(Detail::TCollectionProxyInfo*);
119  void AdoptCollectionStreamerInfo(Detail::TCollectionProxyInfo*);
120  Int_t SetDeclFile(const char *file, Int_t line);
121  void SetDelete(DelFunc_t deleteFunc);
122  void SetDeleteArray(DelArrFunc_t deleteArrayFunc);
123  void SetDestructor(DesFunc_t destructorFunc);
124  void SetDirectoryAutoAdd(DirAutoAdd_t dirAutoAdd);
125  void SetFromTemplate();
126  Int_t SetImplFile(const char *file, Int_t line);
127  void SetMerge(MergeFunc_t);
128  void SetResetAfterMerge(ResetAfterMergeFunc_t);
129  void SetNew(NewFunc_t newFunc);
130  void SetNewArray(NewArrFunc_t newArrayFunc);
131  void SetReadRawRules( const std::vector<ROOT::Internal::TSchemaHelper>& rules );
132  void SetReadRules( const std::vector<ROOT::Internal::TSchemaHelper>& rules );
133  Short_t SetStreamer(ClassStreamerFunc_t);
134  void SetStreamerFunc(ClassStreamerFunc_t);
135  void SetConvStreamerFunc(ClassConvStreamerFunc_t);
136  Short_t SetVersion(Short_t version);
137 
138  // protected:
139  private:
140  void CreateRuleSet( std::vector<ROOT::Internal::TSchemaHelper>& vect, Bool_t ProcessReadRules );
141  TGenericClassInfo(const TGenericClassInfo&); // Not implemented
142  TGenericClassInfo& operator=(const TGenericClassInfo&); // Not implemented
143 
144  private:
146 
147  };
148 
149 }
150 
151 #endif
void(* ClassStreamerFunc_t)(TBuffer &, void *)
Definition: Rtypes.h:65
Detail::TCollectionProxyInfo * fCollectionProxyInfo
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
TLine * line
void(* DelArrFunc_t)(void *)
Definition: Rtypes.h:108
Long64_t(* MergeFunc_t)(void *, TCollection *, TFileMergeInfo *)
Definition: Rtypes.h:111
const std::type_info & fInfo
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
ClassConvStreamerFunc_t fConvStreamerFunc
TClass * GetClass(T *)
Definition: TClass.h:577
ResetAfterMergeFunc_t fResetAfterMerge
void Init(TClassEdit::TInterpreterLookupHelper *helper)
Definition: TClassEdit.cxx:119
void *(* NewFunc_t)(void *)
Definition: Rtypes.h:105
TClass *(* DictFuncPtr_t)()
Definition: Rtypes.h:73
void(* ClassConvStreamerFunc_t)(TBuffer &, void *, const TClass *)
Definition: Rtypes.h:66
void(* ResetAfterMergeFunc_t)(void *, TFileMergeInfo *)
Definition: Rtypes.h:112
std::vector< ROOT::Internal::TSchemaHelper > fReadRawRules
const Internal::TInitBehavior * fAction
void *(* NewArrFunc_t)(Long_t size, void *arena)
Definition: Rtypes.h:106
TClassStreamer * fStreamer
Detail::TCollectionProxyInfo * fCollectionStreamerInfo
ClassStreamerFunc_t fStreamerFunc
short Short_t
Definition: RtypesCore.h:35
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:75
TVirtualIsAProxy * fIsA
std::vector< ROOT::Internal::TSchemaHelper > fReadRules
TVirtualCollectionProxy * fCollectionProxy
Binding & operator=(OUT(*fun)(void))
void(* DelFunc_t)(void *)
Definition: Rtypes.h:107
void(* DirAutoAdd_t)(void *, TDirectory *)
Definition: Rtypes.h:110
Definition: file.py:1
std::string GetDemangledTypeName(const std::type_info &)
Returns a string with the demangled and normalized name for the given type.
void(* DesFunc_t)(void *)
Definition: Rtypes.h:109