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
27
28
29namespace 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
40 class TGenericClassInfo {
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
45 const Internal::TInitBehavior *fAction;
47 const char *fClassName;
48 const char *fDeclFileName;
49 Int_t fDeclFileLine;
50 DictFuncPtr_t fDictionary;
51 const std::type_info &fInfo;
52 const char *fImplFileName;
53 Int_t fImplFileLine;
54 TVirtualIsAProxy *fIsA;
55 Int_t fVersion;
56 MergeFunc_t fMerge;
57 ResetAfterMergeFunc_t fResetAfterMerge;
58 NewFunc_t fNew;
59 NewArrFunc_t fNewArray;
60 DelFunc_t fDelete;
61 DelArrFunc_t fDeleteArray;
62 DesFunc_t fDestructor;
63 DirAutoAdd_t fDirAutoAdd;
64 TClassStreamer *fStreamer;
65 ClassStreamerFunc_t fStreamerFunc;
66 ClassConvStreamerFunc_t fConvStreamerFunc;
67 TVirtualCollectionProxy *fCollectionProxy;
68 Int_t fSizeof;
69 Int_t fPragmaBits;
70 Detail::TCollectionProxyInfo *fCollectionProxyInfo;
71 Detail::TCollectionProxyInfo *fCollectionStreamerInfo;
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);
94 ~TGenericClassInfo();
95
96 const Internal::TInitBehavior &GetAction() const;
98 const char *GetClassName() const;
99 Detail::TCollectionProxyInfo *GetCollectionProxyInfo() const;
100 Detail::TCollectionProxyInfo *GetCollectionStreamerInfo() const;
101 const char *GetDeclFileName() const;
102 Int_t GetDeclFileLine() const;
103 DelFunc_t GetDelete() const;
104 DelArrFunc_t GetDeleteArray() const;
105 DesFunc_t GetDestructor() const;
106 DirAutoAdd_t GetDirectoryAutoAdd() const;
107 const char *GetImplFileName();
108 Int_t GetImplFileLine();
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
119 Short_t AdoptStreamer(TClassStreamer*);
120 Short_t AdoptCollectionProxy(TVirtualCollectionProxy*);
121 void AdoptCollectionProxyInfo(Detail::TCollectionProxyInfo*);
122 void AdoptCollectionStreamerInfo(Detail::TCollectionProxyInfo*);
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);
131 void SetResetAfterMerge(ResetAfterMergeFunc_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 );
136 Short_t SetStreamer(ClassStreamerFunc_t);
137 void SetStreamerFunc(ClassStreamerFunc_t);
138 void SetConvStreamerFunc(ClassConvStreamerFunc_t);
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 &) = delete;
145 TGenericClassInfo& operator=(const TGenericClassInfo &) = delete;
146
147 private:
148 TGenericClassInfo();
149
150 };
151
152}
153
154#endif
Cppyy::TCppType_t fClass
bool Bool_t
Definition: RtypesCore.h:63
int Int_t
Definition: RtypesCore.h:45
short Short_t
Definition: RtypesCore.h:39
TClass *(* DictFuncPtr_t)()
Definition: Rtypes.h:80
void(* ClassStreamerFunc_t)(TBuffer &, void *)
Definition: Rtypes.h:72
void(* ClassConvStreamerFunc_t)(TBuffer &, void *, const TClass *)
Definition: Rtypes.h:73
Binding & operator=(OUT(*fun)(void))
TClass * IsA() const override
Definition: TStringLong.h:20
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:81
TLine * line
std::string GetDemangledTypeName(const std::type_info &t)
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
void(* DirAutoAdd_t)(void *, TDirectory *)
Definition: Rtypes.h:113
void(* ResetAfterMergeFunc_t)(void *, TFileMergeInfo *)
Definition: Rtypes.h:115
void(* DesFunc_t)(void *)
Definition: Rtypes.h:112
TClass * GetClass(T *)
Definition: TClass.h:659
void(* DelFunc_t)(void *)
Definition: Rtypes.h:110
void *(* NewArrFunc_t)(Long_t size, void *arena)
Definition: Rtypes.h:109
void(* DelArrFunc_t)(void *)
Definition: Rtypes.h:111
void *(* NewFunc_t)(void *)
Definition: Rtypes.h:108
Long64_t(* MergeFunc_t)(void *, TCollection *, TFileMergeInfo *)
Definition: Rtypes.h:114
void Init(TClassEdit::TInterpreterLookupHelper *helper)
Definition: TClassEdit.cxx:171
Definition: file.py:1