Logo ROOT  
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_Rtypes
13 // Include Rtypes.h outside of the code guard to insure the intended
14 // ordering of Rtypes.h and TGenericClassInfo.h
15 #include "Rtypes.h"
16 #endif
17 
18 #ifndef ROOT_TGenericClassInfo
19 #define ROOT_TGenericClassInfo
20 
21 #include "TSchemaHelper.h"
22 #include <vector>
23 #include <string>
24 
25 // Forward declarations
26 class TVirtualIsAProxy;
27 
28 
29 namespace ROOT {
30 
31  namespace Internal {
32  /// Returns a string with the demangled and normalized name for the given type.
33  std::string GetDemangledTypeName(const std::type_info&);
34  }
35 
36  namespace Detail {
37  class TCollectionProxyInfo;
38  }
39 
41  // This class in not inlined because it is used is non time critical
42  // section (the dictionaries) and inline would lead to too much
43  // repetition of the code (once per class!).
44 
47  const char *fClassName;
48  const char *fDeclFileName;
51  const std::type_info &fInfo;
52  const char *fImplFileName;
72  std::vector<ROOT::Internal::TSchemaHelper> fReadRules;
73  std::vector<ROOT::Internal::TSchemaHelper> fReadRawRules;
74 
75  public:
76  TGenericClassInfo(const char *fullClassname,
77  const char *declFileName, Int_t declFileLine,
78  const std::type_info &info, const Internal::TInitBehavior *action,
79  DictFuncPtr_t dictionary,
80  TVirtualIsAProxy *isa, Int_t pragmabits, Int_t sizof);
81 
82  TGenericClassInfo(const char *fullClassname, Int_t version,
83  const char *declFileName, Int_t declFileLine,
84  const std::type_info &info, const Internal::TInitBehavior *action,
85  DictFuncPtr_t dictionary,
86  TVirtualIsAProxy *isa, Int_t pragmabits, Int_t sizof);
87 
88  TGenericClassInfo(const char *fullClassname, Int_t version,
89  const char *declFileName, Int_t declFileLine,
90  const Internal::TInitBehavior *action,
91  DictFuncPtr_t dictionary, Int_t pragmabits);
92 
93  void Init(Int_t pragmabits);
95 
96  const Internal::TInitBehavior &GetAction() const;
97  TClass *GetClass();
98  const char *GetClassName() const;
101  const char *GetDeclFileName() const;
102  Int_t GetDeclFileLine() const;
103  DelFunc_t GetDelete() const;
105  DesFunc_t GetDestructor() const;
107  const char *GetImplFileName();
109  const std::type_info &GetInfo() const;
110  TVirtualIsAProxy *GetIsA() const;
111  NewFunc_t GetNew() const;
112  NewArrFunc_t GetNewArray() const;
113  const std::vector<ROOT::Internal::TSchemaHelper> &GetReadRawRules() const;
114  const std::vector<ROOT::Internal::TSchemaHelper> &GetReadRules() const;
115  Int_t GetVersion() const;
116 
117  TClass *IsA(const void *obj);
118 
123  Int_t SetDeclFile(const char *file, Int_t line);
124  void SetDelete(DelFunc_t deleteFunc);
125  void SetDeleteArray(DelArrFunc_t deleteArrayFunc);
126  void SetDestructor(DesFunc_t destructorFunc);
127  void SetDirectoryAutoAdd(DirAutoAdd_t dirAutoAdd);
128  void SetFromTemplate();
129  Int_t SetImplFile(const char *file, Int_t line);
130  void SetMerge(MergeFunc_t);
132  void SetNew(NewFunc_t newFunc);
133  void SetNewArray(NewArrFunc_t newArrayFunc);
134  void SetReadRawRules( const std::vector<ROOT::Internal::TSchemaHelper>& rules );
135  void SetReadRules( const std::vector<ROOT::Internal::TSchemaHelper>& rules );
139  Short_t SetVersion(Short_t version);
140 
141  // protected:
142  private:
143  void CreateRuleSet( std::vector<ROOT::Internal::TSchemaHelper>& vect, Bool_t ProcessReadRules );
144  TGenericClassInfo(const TGenericClassInfo&); // Not implemented
145  TGenericClassInfo& operator=(const TGenericClassInfo&); // Not implemented
146 
147  private:
149 
150  };
151 
152 }
153 
154 #endif
ROOT::TGenericClassInfo::TGenericClassInfo
TGenericClassInfo()
ROOT::TGenericClassInfo::SetDeleteArray
void SetDeleteArray(DelArrFunc_t deleteArrayFunc)
Definition: TGenericClassInfo.cxx:592
ROOT::TGenericClassInfo::SetDelete
void SetDelete(DelFunc_t deleteFunc)
Definition: TGenericClassInfo.cxx:584
ROOT::TGenericClassInfo::SetConvStreamerFunc
void SetConvStreamerFunc(ClassConvStreamerFunc_t)
Definition: TGenericClassInfo.cxx:509
ROOT::DesFunc_t
void(* DesFunc_t)(void *)
Definition: Rtypes.h:112
ROOT::TGenericClassInfo::Init
void Init(Int_t pragmabits)
Definition: TGenericClassInfo.cxx:202
ROOT::Detail::TCollectionProxyInfo
Definition: TCollectionProxyInfo.h:53
ROOT::TGenericClassInfo::GetReadRawRules
const std::vector< ROOT::Internal::TSchemaHelper > & GetReadRawRules() const
Definition: TGenericClassInfo.cxx:379
ROOT::TGenericClassInfo::fCollectionProxy
TVirtualCollectionProxy * fCollectionProxy
Definition: TGenericClassInfo.h:67
ROOT::ResetAfterMergeFunc_t
void(* ResetAfterMergeFunc_t)(void *, TFileMergeInfo *)
Definition: Rtypes.h:115
ROOT::TGenericClassInfo::fVersion
Int_t fVersion
Definition: TGenericClassInfo.h:55
ROOT::TGenericClassInfo::AdoptCollectionStreamerInfo
void AdoptCollectionStreamerInfo(Detail::TCollectionProxyInfo *)
Definition: TGenericClassInfo.cxx:439
ROOT::TGenericClassInfo::fClassName
const char * fClassName
Definition: TGenericClassInfo.h:47
ROOT::TGenericClassInfo::SetImplFile
Int_t SetImplFile(const char *file, Int_t line)
Definition: TGenericClassInfo.cxx:401
ROOT::TGenericClassInfo::GetClassName
const char * GetClassName() const
Definition: TGenericClassInfo.cxx:350
ROOT::TGenericClassInfo::fMerge
MergeFunc_t fMerge
Definition: TGenericClassInfo.h:56
ROOT::TGenericClassInfo::fDeclFileLine
Int_t fDeclFileLine
Definition: TGenericClassInfo.h:49
ROOT::DelFunc_t
void(* DelFunc_t)(void *)
Definition: Rtypes.h:110
ROOT::TGenericClassInfo::operator=
TGenericClassInfo & operator=(const TGenericClassInfo &)
ROOT::TGenericClassInfo::fIsA
TVirtualIsAProxy * fIsA
Definition: TGenericClassInfo.h:54
ROOT::TGenericClassInfo::SetVersion
Short_t SetVersion(Short_t version)
Definition: TGenericClassInfo.cxx:421
ROOT::TGenericClassInfo::fClass
TClass * fClass
Definition: TGenericClassInfo.h:46
ROOT::TGenericClassInfo::SetDeclFile
Int_t SetDeclFile(const char *file, Int_t line)
Definition: TGenericClassInfo.cxx:411
ROOT::TGenericClassInfo::SetDestructor
void SetDestructor(DesFunc_t destructorFunc)
Definition: TGenericClassInfo.cxx:600
ROOT::TGenericClassInfo::~TGenericClassInfo
~TGenericClassInfo()
Definition: TGenericClassInfo.cxx:216
ROOT::TGenericClassInfo::fReadRules
std::vector< ROOT::Internal::TSchemaHelper > fReadRules
Definition: TGenericClassInfo.h:72
ROOT::TGenericClassInfo::fCollectionStreamerInfo
Detail::TCollectionProxyInfo * fCollectionStreamerInfo
Definition: TGenericClassInfo.h:71
ROOT::TGenericClassInfo::GetDeleteArray
DelArrFunc_t GetDeleteArray() const
Definition: TGenericClassInfo.cxx:653
ROOT::NewArrFunc_t
void *(* NewArrFunc_t)(Long_t size, void *arena)
Definition: Rtypes.h:109
ROOT::TGenericClassInfo::SetStreamerFunc
void SetStreamerFunc(ClassStreamerFunc_t)
Definition: TGenericClassInfo.cxx:501
ROOT::TGenericClassInfo::IsA
TClass * IsA(const void *obj)
Definition: TGenericClassInfo.cxx:554
ROOT::Internal::TInitBehavior
Definition: Rtypes.h:145
ROOT::TGenericClassInfo::GetClass
TClass * GetClass()
Definition: TGenericClassInfo.cxx:237
ROOT::TGenericClassInfo::GetDelete
DelFunc_t GetDelete() const
Definition: TGenericClassInfo.cxx:646
ROOT::TGenericClassInfo::GetIsA
TVirtualIsAProxy * GetIsA() const
Definition: TGenericClassInfo.cxx:561
ROOT::TGenericClassInfo::fDictionary
DictFuncPtr_t fDictionary
Definition: TGenericClassInfo.h:50
ROOT::Internal::GetDemangledTypeName
std::string GetDemangledTypeName(const std::type_info &)
Returns a string with the demangled and normalized name for the given type.
Definition: TGenericClassInfo.cxx:42
ROOT::TGenericClassInfo::SetDirectoryAutoAdd
void SetDirectoryAutoAdd(DirAutoAdd_t dirAutoAdd)
Definition: TGenericClassInfo.cxx:608
ROOT::TGenericClassInfo::GetCollectionProxyInfo
Detail::TCollectionProxyInfo * GetCollectionProxyInfo() const
Definition: TGenericClassInfo.cxx:358
ROOT::TGenericClassInfo::GetCollectionStreamerInfo
Detail::TCollectionProxyInfo * GetCollectionStreamerInfo() const
Definition: TGenericClassInfo.cxx:365
ROOT::TGenericClassInfo::GetVersion
Int_t GetVersion() const
Definition: TGenericClassInfo.cxx:547
bool
ROOT::DirAutoAdd_t
void(* DirAutoAdd_t)(void *, TDirectory *)
Definition: Rtypes.h:113
ClassStreamerFunc_t
void(* ClassStreamerFunc_t)(TBuffer &, void *)
Definition: Rtypes.h:72
ROOT::TGenericClassInfo::fCollectionProxyInfo
Detail::TCollectionProxyInfo * fCollectionProxyInfo
Definition: TGenericClassInfo.h:70
ROOT::MergeFunc_t
Long64_t(* MergeFunc_t)(void *, TCollection *, TFileMergeInfo *)
Definition: Rtypes.h:114
ROOT::TGenericClassInfo::GetNew
NewFunc_t GetNew() const
Definition: TGenericClassInfo.cxx:632
ROOT::DelArrFunc_t
void(* DelArrFunc_t)(void *)
Definition: Rtypes.h:111
ROOT::TGenericClassInfo::fDeclFileName
const char * fDeclFileName
Definition: TGenericClassInfo.h:48
ROOT::TGenericClassInfo::fPragmaBits
Int_t fPragmaBits
Definition: TGenericClassInfo.h:69
ROOT::TGenericClassInfo::SetResetAfterMerge
void SetResetAfterMerge(ResetAfterMergeFunc_t)
Definition: TGenericClassInfo.cxx:624
ROOT::TGenericClassInfo::GetImplFileName
const char * GetImplFileName()
Definition: TGenericClassInfo.cxx:531
ROOT::TGenericClassInfo::AdoptCollectionProxy
Short_t AdoptCollectionProxy(TVirtualCollectionProxy *)
Definition: TGenericClassInfo.cxx:462
ROOT::TGenericClassInfo::GetDestructor
DesFunc_t GetDestructor() const
Definition: TGenericClassInfo.cxx:660
ROOT::TGenericClassInfo::SetReadRawRules
void SetReadRawRules(const std::vector< ROOT::Internal::TSchemaHelper > &rules)
Definition: TGenericClassInfo.cxx:475
ROOT::TGenericClassInfo::fDeleteArray
DelArrFunc_t fDeleteArray
Definition: TGenericClassInfo.h:61
ROOT::TGenericClassInfo::fImplFileLine
Int_t fImplFileLine
Definition: TGenericClassInfo.h:53
ROOT::TGenericClassInfo::GetDeclFileName
const char * GetDeclFileName() const
Definition: TGenericClassInfo.cxx:517
ROOT::TGenericClassInfo::fAction
const Internal::TInitBehavior * fAction
Definition: TGenericClassInfo.h:45
ROOT::TGenericClassInfo::fImplFileName
const char * fImplFileName
Definition: TGenericClassInfo.h:52
ROOT::TGenericClassInfo::GetDeclFileLine
Int_t GetDeclFileLine() const
Definition: TGenericClassInfo.cxx:524
ROOT::TGenericClassInfo::fNewArray
NewArrFunc_t fNewArray
Definition: TGenericClassInfo.h:59
Short_t
short Short_t
Definition: RtypesCore.h:39
ROOT::TGenericClassInfo::GetImplFileLine
Int_t GetImplFileLine()
Definition: TGenericClassInfo.cxx:539
line
TLine * line
Definition: entrylistblock_figure1.C:235
ROOT::TGenericClassInfo::fStreamerFunc
ClassStreamerFunc_t fStreamerFunc
Definition: TGenericClassInfo.h:65
TSchemaHelper.h
ROOT::TGenericClassInfo::fDestructor
DesFunc_t fDestructor
Definition: TGenericClassInfo.h:62
ROOT::TGenericClassInfo::SetStreamer
Short_t SetStreamer(ClassStreamerFunc_t)
Definition: TGenericClassInfo.cxx:488
ROOT::TGenericClassInfo::fConvStreamerFunc
ClassConvStreamerFunc_t fConvStreamerFunc
Definition: TGenericClassInfo.h:66
ROOT::TGenericClassInfo::GetAction
const Internal::TInitBehavior & GetAction() const
Definition: TGenericClassInfo.cxx:230
ROOT::TGenericClassInfo::SetNewArray
void SetNewArray(NewArrFunc_t newArrayFunc)
Definition: TGenericClassInfo.cxx:576
ROOT::TGenericClassInfo::fNew
NewFunc_t fNew
Definition: TGenericClassInfo.h:58
ROOT::TGenericClassInfo::fInfo
const std::type_info & fInfo
Definition: TGenericClassInfo.h:51
ROOT::TGenericClassInfo::GetInfo
const std::type_info & GetInfo() const
Definition: TGenericClassInfo.cxx:372
TClass
Definition: TClass.h:80
file
Definition: file.py:1
ROOT::TGenericClassInfo::fSizeof
Int_t fSizeof
Definition: TGenericClassInfo.h:68
ROOT::TGenericClassInfo::CreateRuleSet
void CreateRuleSet(std::vector< ROOT::Internal::TSchemaHelper > &vect, Bool_t ProcessReadRules)
Attach the schema evolution information to TClassObject.
Definition: TGenericClassInfo.cxx:301
ROOT::TGenericClassInfo
Definition: TGenericClassInfo.h:40
ROOT::TGenericClassInfo::fResetAfterMerge
ResetAfterMergeFunc_t fResetAfterMerge
Definition: TGenericClassInfo.h:57
ClassConvStreamerFunc_t
void(* ClassConvStreamerFunc_t)(TBuffer &, void *, const TClass *)
Definition: Rtypes.h:73
ROOT::TGenericClassInfo::SetMerge
void SetMerge(MergeFunc_t)
Definition: TGenericClassInfo.cxx:616
ROOT::NewFunc_t
void *(* NewFunc_t)(void *)
Definition: Rtypes.h:108
ROOT::TGenericClassInfo::GetDirectoryAutoAdd
DirAutoAdd_t GetDirectoryAutoAdd() const
Definition: TGenericClassInfo.cxx:667
ROOT::TGenericClassInfo::SetReadRules
void SetReadRules(const std::vector< ROOT::Internal::TSchemaHelper > &rules)
Definition: TGenericClassInfo.cxx:482
ROOT::TGenericClassInfo::GetNewArray
NewArrFunc_t GetNewArray() const
Definition: TGenericClassInfo.cxx:639
ROOT::TGenericClassInfo::fStreamer
TClassStreamer * fStreamer
Definition: TGenericClassInfo.h:64
TClassStreamer
Definition: TClassStreamer.h:26
DictFuncPtr_t
TClass *(* DictFuncPtr_t)()
Definition: Rtypes.h:80
TVirtualIsAProxy
Definition: TVirtualIsAProxy.h:27
ROOT::TGenericClassInfo::SetFromTemplate
void SetFromTemplate()
Definition: TGenericClassInfo.cxx:393
ROOT::TGenericClassInfo::GetReadRules
const std::vector< ROOT::Internal::TSchemaHelper > & GetReadRules() const
Definition: TGenericClassInfo.cxx:387
ROOT::TGenericClassInfo::AdoptStreamer
Short_t AdoptStreamer(TClassStreamer *)
Definition: TGenericClassInfo.cxx:448
ROOT::TGenericClassInfo::SetNew
void SetNew(NewFunc_t newFunc)
Definition: TGenericClassInfo.cxx:568
ROOT::TGenericClassInfo::fDelete
DelFunc_t fDelete
Definition: TGenericClassInfo.h:60
ROOT::TGenericClassInfo::fReadRawRules
std::vector< ROOT::Internal::TSchemaHelper > fReadRawRules
Definition: TGenericClassInfo.h:73
Rtypes.h
ROOT
VSD Structures.
Definition: StringConv.hxx:21
TVirtualCollectionProxy
Definition: TVirtualCollectionProxy.h:38
int
ROOT::TGenericClassInfo::AdoptCollectionProxyInfo
void AdoptCollectionProxyInfo(Detail::TCollectionProxyInfo *)
Definition: TGenericClassInfo.cxx:430
ROOT::TGenericClassInfo::fDirAutoAdd
DirAutoAdd_t fDirAutoAdd
Definition: TGenericClassInfo.h:63