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