Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
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#include <unordered_map>
25
26// Forward declarations
28
29
30namespace ROOT {
31
32 namespace Internal {
33 /// Returns a string with the demangled and normalized name for the given type.
34 std::string GetDemangledTypeName(const std::type_info&);
35 }
36
37 namespace Detail {
39 }
40
42 // This class in not inlined because it is used is non time critical
43 // section (the dictionaries) and inline would lead to too much
44 // repetition of the code (once per class!).
45
48 const char *fClassName;
49 const char *fDeclFileName;
52 const std::type_info &fInfo;
53 const char *fImplFileName;
70 std::size_t fAlignment;
72 std::string fRNTupleSoARecord;
75 std::vector<ROOT::Internal::TSchemaHelper> fReadRules;
76 std::vector<ROOT::Internal::TSchemaHelper> fReadRawRules;
77 std::vector<ROOT::TClassAlt*> fAlternate;
78 std::unordered_map<std::string, TMemberStreamer *> fAdoptedMemberStreamers;
79
80 public:
81 TGenericClassInfo(const char *fullClassname, const char *declFileName, Int_t declFileLine,
82 const std::type_info &info, const Internal::TInitBehavior *action, DictFuncPtr_t dictionary,
83 TVirtualIsAProxy *isa, Int_t pragmabits, Int_t sizof, std::size_t alignof_ = 0);
84
85 TGenericClassInfo(const char *fullClassname, Int_t version, const char *declFileName, Int_t declFileLine,
86 const std::type_info &info, const Internal::TInitBehavior *action, DictFuncPtr_t dictionary,
87 TVirtualIsAProxy *isa, Int_t pragmabits, Int_t sizof, std::size_t alignof_ = 0);
88
89 TGenericClassInfo(const char *fullClassname, Int_t version,
90 const char *declFileName, Int_t declFileLine,
91 const Internal::TInitBehavior *action,
92 DictFuncPtr_t dictionary, Int_t pragmabits);
93
94 void Init(Int_t pragmabits);
96
99 const char *GetClassName() const;
102 const char *GetDeclFileName() const;
103 Int_t GetDeclFileLine() const;
104 DelFunc_t GetDelete() const;
106 DesFunc_t GetDestructor() const;
108 const char *GetImplFileName();
110 const std::type_info &GetInfo() const;
111 TVirtualIsAProxy *GetIsA() const;
112 NewFunc_t GetNew() const;
114 const std::vector<ROOT::Internal::TSchemaHelper> &GetReadRawRules() const;
115 const std::vector<ROOT::Internal::TSchemaHelper> &GetReadRules() const;
116 Int_t GetVersion() const;
117
118 TClass *IsA(const void *obj);
119
121 bool AdoptMemberStreamer(const char *name, TMemberStreamer *strm);
126 Int_t SetDeclFile(const char *file, Int_t line);
127 void SetDelete(DelFunc_t deleteFunc);
128 void SetDeleteArray(DelArrFunc_t deleteArrayFunc);
129 void SetDestructor(DesFunc_t destructorFunc);
130 void SetDirectoryAutoAdd(DirAutoAdd_t dirAutoAdd);
131 void SetFromTemplate();
132 Int_t SetImplFile(const char *file, Int_t line);
133 void SetMerge(MergeFunc_t);
135 void SetNew(NewFunc_t newFunc);
136 void SetNewArray(NewArrFunc_t newArrayFunc);
137 void SetReadRawRules( const std::vector<ROOT::Internal::TSchemaHelper>& rules );
138 void SetReadRules( const std::vector<ROOT::Internal::TSchemaHelper>& rules );
142 Short_t SetVersion(Short_t version);
143 void SetRNTupleSoARecord(const std::string &recordName);
144
145 // protected:
146 private:
147 void CreateRuleSet( std::vector<ROOT::Internal::TSchemaHelper>& vect, Bool_t ProcessReadRules );
150
151 private:
153
154 };
155
156}
157
158#endif
TClass * IsA() const override
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
short Short_t
Signed Short integer 2 bytes (short).
Definition RtypesCore.h:53
TClass *(* DictFuncPtr_t)()
Definition Rtypes.h:86
void(* ClassStreamerFunc_t)(TBuffer &, void *)
Definition Rtypes.h:78
void(* ClassConvStreamerFunc_t)(TBuffer &, void *, const TClass *)
Definition Rtypes.h:79
char name[80]
Definition TGX11.cxx:148
std::vector< ROOT::TClassAlt * > fAlternate
void AdoptAlternate(ROOT::TClassAlt *alt)
DesFunc_t GetDestructor() const
const Internal::TInitBehavior * fAction
TVirtualIsAProxy * GetIsA() const
DelArrFunc_t GetDeleteArray() const
Short_t AdoptCollectionProxy(TVirtualCollectionProxy *)
const char * GetClassName() const
void SetDelete(DelFunc_t deleteFunc)
void SetDirectoryAutoAdd(DirAutoAdd_t dirAutoAdd)
void SetDeleteArray(DelArrFunc_t deleteArrayFunc)
TVirtualCollectionProxy * fCollectionProxy
void SetResetAfterMerge(ResetAfterMergeFunc_t)
std::unordered_map< std::string, TMemberStreamer * > fAdoptedMemberStreamers
std::vector< ROOT::Internal::TSchemaHelper > fReadRules
void CreateRuleSet(std::vector< ROOT::Internal::TSchemaHelper > &vect, Bool_t ProcessReadRules)
Attach the schema evolution information to TClassObject.
Short_t SetVersion(Short_t version)
void SetConvStreamerFunc(ClassConvStreamerFunc_t)
Detail::TCollectionProxyInfo * fCollectionProxyInfo
TVirtualIsAProxy * fIsA
void SetRNTupleSoARecord(const std::string &recordName)
Detail::TCollectionProxyInfo * fCollectionStreamerInfo
void SetNewArray(NewArrFunc_t newArrayFunc)
std::vector< ROOT::Internal::TSchemaHelper > fReadRawRules
Int_t SetImplFile(const char *file, Int_t line)
const std::type_info & fInfo
NewArrFunc_t GetNewArray() const
const Internal::TInitBehavior & GetAction() const
ClassStreamerFunc_t fStreamerFunc
Detail::TCollectionProxyInfo * GetCollectionStreamerInfo() const
void SetReadRawRules(const std::vector< ROOT::Internal::TSchemaHelper > &rules)
DirAutoAdd_t GetDirectoryAutoAdd() const
const std::vector< ROOT::Internal::TSchemaHelper > & GetReadRawRules() const
void SetReadRules(const std::vector< ROOT::Internal::TSchemaHelper > &rules)
ClassConvStreamerFunc_t fConvStreamerFunc
TGenericClassInfo(const TGenericClassInfo &)=delete
const std::type_info & GetInfo() const
Detail::TCollectionProxyInfo * GetCollectionProxyInfo() const
void Init(Int_t pragmabits)
ResetAfterMergeFunc_t fResetAfterMerge
const char * GetDeclFileName() const
void SetDestructor(DesFunc_t destructorFunc)
TGenericClassInfo(const char *fullClassname, const char *declFileName, Int_t declFileLine, const std::type_info &info, const Internal::TInitBehavior *action, DictFuncPtr_t dictionary, TVirtualIsAProxy *isa, Int_t pragmabits, Int_t sizof, std::size_t alignof_=0)
void AdoptCollectionProxyInfo(Detail::TCollectionProxyInfo *)
const std::vector< ROOT::Internal::TSchemaHelper > & GetReadRules() const
bool AdoptMemberStreamer(const char *name, TMemberStreamer *strm)
Returns false if the member streamer could not be adopted (this happens if the underlying TClass had ...
Int_t SetDeclFile(const char *file, Int_t line)
Short_t SetStreamer(ClassStreamerFunc_t)
Short_t AdoptStreamer(TClassStreamer *)
void AdoptCollectionStreamerInfo(Detail::TCollectionProxyInfo *)
void SetNew(NewFunc_t newFunc)
void SetStreamerFunc(ClassStreamerFunc_t)
TGenericClassInfo & operator=(const TGenericClassInfo &)=delete
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:84
Defines a common interface to inspect/change the contents of an object that represents a collection.
TLine * line
Special implementation of ROOT::RRangeCast for TCollection, including a check that the cast target ty...
Definition TObject.h:395
std::string GetDemangledTypeName(const std::type_info &)
Returns a string with the demangled and normalized name for the given type.
void(* DirAutoAdd_t)(void *, TDirectory *)
Definition Rtypes.h:120
void(* ResetAfterMergeFunc_t)(void *, TFileMergeInfo *)
Definition Rtypes.h:122
void(* DesFunc_t)(void *)
Definition Rtypes.h:119
void(* DelFunc_t)(void *)
Definition Rtypes.h:117
void *(* NewArrFunc_t)(Long_t size, void *arena)
Definition Rtypes.h:116
void(* DelArrFunc_t)(void *)
Definition Rtypes.h:118
void *(* NewFunc_t)(void *)
Definition Rtypes.h:115
Long64_t(* MergeFunc_t)(void *, TCollection *, TFileMergeInfo *)
Definition Rtypes.h:121