Logo ROOT   6.08/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 //#ifndef ROOT_TSchemaHelper
17 #include "TSchemaHelper.h"
18 //#endif
19 //#ifndef ROOT_Rtypes
20 #include "Rtypes.h"
21 //#endif
22 
23 // Forward declarations
24 class TVirtualIsAProxy;
25 //class TClass;
26 //class TClassStreamer;
27 //class TVirtualCollectionProxy;
28 
29 
30 namespace ROOT {
31 
32  namespace Detail {
33  class TCollectionProxyInfo;
34  }
35 
37  // This class in not inlined because it is used is non time critical
38  // section (the dictionaries) and inline would lead to too much
39  // repetition of the code (once per class!).
40 
43  const char *fClassName;
44  const char *fDeclFileName;
47  const std::type_info &fInfo;
48  const char *fImplFileName;
68  std::vector<ROOT::Internal::TSchemaHelper> fReadRules;
69  std::vector<ROOT::Internal::TSchemaHelper> fReadRawRules;
70 
71  public:
72  TGenericClassInfo(const char *fullClassname,
73  const char *declFileName, Int_t declFileLine,
74  const std::type_info &info, const Internal::TInitBehavior *action,
75  DictFuncPtr_t dictionary,
76  TVirtualIsAProxy *isa, Int_t pragmabits, Int_t sizof);
77 
78  TGenericClassInfo(const char *fullClassname, Int_t version,
79  const char *declFileName, Int_t declFileLine,
80  const std::type_info &info, const Internal::TInitBehavior *action,
81  DictFuncPtr_t dictionary,
82  TVirtualIsAProxy *isa, Int_t pragmabits, Int_t sizof);
83 
84  TGenericClassInfo(const char *fullClassname, Int_t version,
85  const char *declFileName, Int_t declFileLine,
86  const Internal::TInitBehavior *action,
87  DictFuncPtr_t dictionary, Int_t pragmabits);
88 
89  void Init(Int_t pragmabits);
91 
92  const Internal::TInitBehavior &GetAction() const;
93  TClass *GetClass();
94  const char *GetClassName() const;
95  Detail::TCollectionProxyInfo *GetCollectionProxyInfo() const;
96  Detail::TCollectionProxyInfo *GetCollectionStreamerInfo() const;
97  const char *GetDeclFileName() const;
98  Int_t GetDeclFileLine() const;
99  DelFunc_t GetDelete() const;
100  DelArrFunc_t GetDeleteArray() const;
101  DesFunc_t GetDestructor() const;
102  DirAutoAdd_t GetDirectoryAutoAdd() const;
103  const char *GetImplFileName();
104  Int_t GetImplFileLine();
105  const std::type_info &GetInfo() const;
106  TVirtualIsAProxy *GetIsA() const;
107  NewFunc_t GetNew() const;
108  NewArrFunc_t GetNewArray() const;
109  const std::vector<ROOT::Internal::TSchemaHelper> &GetReadRawRules() const;
110  const std::vector<ROOT::Internal::TSchemaHelper> &GetReadRules() const;
111  Int_t GetVersion() const;
112 
113  TClass *IsA(const void *obj);
114 
115  Short_t AdoptStreamer(TClassStreamer*);
116  Short_t AdoptCollectionProxy(TVirtualCollectionProxy*);
117  void AdoptCollectionProxyInfo(Detail::TCollectionProxyInfo*);
118  void AdoptCollectionStreamerInfo(Detail::TCollectionProxyInfo*);
119  Int_t SetDeclFile(const char *file, Int_t line);
120  void SetDelete(DelFunc_t deleteFunc);
121  void SetDeleteArray(DelArrFunc_t deleteArrayFunc);
122  void SetDestructor(DesFunc_t destructorFunc);
123  void SetDirectoryAutoAdd(DirAutoAdd_t dirAutoAdd);
124  void SetFromTemplate();
125  Int_t SetImplFile(const char *file, Int_t line);
126  void SetMerge(MergeFunc_t);
127  void SetResetAfterMerge(ResetAfterMergeFunc_t);
128  void SetNew(NewFunc_t newFunc);
129  void SetNewArray(NewArrFunc_t newArrayFunc);
130  void SetReadRawRules( const std::vector<ROOT::Internal::TSchemaHelper>& rules );
131  void SetReadRules( const std::vector<ROOT::Internal::TSchemaHelper>& rules );
132  Short_t SetStreamer(ClassStreamerFunc_t);
133  void SetStreamerFunc(ClassStreamerFunc_t);
134  void SetConvStreamerFunc(ClassConvStreamerFunc_t);
135  Short_t SetVersion(Short_t version);
136 
137  // protected:
138  private:
139  void CreateRuleSet( std::vector<ROOT::Internal::TSchemaHelper>& vect, Bool_t ProcessReadRules );
140  TGenericClassInfo(const TGenericClassInfo&); // Not implemented
141  TGenericClassInfo& operator=(const TGenericClassInfo&); // Not implemented
142 
143  private:
145 
146  };
147 
148 }
149 
150 #endif
void(* ClassStreamerFunc_t)(TBuffer &, void *)
Definition: Rtypes.h:67
Detail::TCollectionProxyInfo * fCollectionProxyInfo
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Definition: StringConv.hxx:21
TLine * line
void(* DelArrFunc_t)(void *)
Definition: Rtypes.h:150
Long64_t(* MergeFunc_t)(void *, TCollection *, TFileMergeInfo *)
Definition: Rtypes.h:153
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:555
ResetAfterMergeFunc_t fResetAfterMerge
void Init(TClassEdit::TInterpreterLookupHelper *helper)
Definition: TClassEdit.cxx:119
void *(* NewFunc_t)(void *)
Definition: Rtypes.h:147
TClass *(* DictFuncPtr_t)()
Definition: Rtypes.h:75
void(* ClassConvStreamerFunc_t)(TBuffer &, void *, const TClass *)
Definition: Rtypes.h:68
void(* ResetAfterMergeFunc_t)(void *, TFileMergeInfo *)
Definition: Rtypes.h:154
std::vector< ROOT::Internal::TSchemaHelper > fReadRawRules
const Internal::TInitBehavior * fAction
void *(* NewArrFunc_t)(Long_t size, void *arena)
Definition: Rtypes.h:148
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:81
TVirtualIsAProxy * fIsA
std::vector< ROOT::Internal::TSchemaHelper > fReadRules
TVirtualCollectionProxy * fCollectionProxy
void(* DelFunc_t)(void *)
Definition: Rtypes.h:149
void(* DirAutoAdd_t)(void *, TDirectory *)
Definition: Rtypes.h:152
Definition: file.py:1
void(* DesFunc_t)(void *)
Definition: Rtypes.h:151