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
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 std::vector<ROOT::TClassAlt*> fAlternate;
75
76 public:
77 TGenericClassInfo(const char *fullClassname,
78 const char *declFileName, Int_t declFileLine,
79 const std::type_info &info, const Internal::TInitBehavior *action,
80 DictFuncPtr_t dictionary,
81 TVirtualIsAProxy *isa, Int_t pragmabits, Int_t sizof);
82
83 TGenericClassInfo(const char *fullClassname, Int_t version,
84 const char *declFileName, Int_t declFileLine,
85 const std::type_info &info, const Internal::TInitBehavior *action,
86 DictFuncPtr_t dictionary,
87 TVirtualIsAProxy *isa, Int_t pragmabits, Int_t sizof);
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);
95 ~TGenericClassInfo();
96
97 const Internal::TInitBehavior &GetAction() const;
99 const char *GetClassName() const;
100 Detail::TCollectionProxyInfo *GetCollectionProxyInfo() const;
101 Detail::TCollectionProxyInfo *GetCollectionStreamerInfo() const;
102 const char *GetDeclFileName() const;
103 Int_t GetDeclFileLine() const;
104 DelFunc_t GetDelete() const;
105 DelArrFunc_t GetDeleteArray() const;
106 DesFunc_t GetDestructor() const;
107 DirAutoAdd_t GetDirectoryAutoAdd() const;
108 const char *GetImplFileName();
109 Int_t GetImplFileLine();
110 const std::type_info &GetInfo() const;
111 TVirtualIsAProxy *GetIsA() const;
112 NewFunc_t GetNew() const;
113 NewArrFunc_t GetNewArray() 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
120 void AdoptAlternate(ROOT::TClassAlt *alt);
121 Short_t AdoptStreamer(TClassStreamer*);
122 Short_t AdoptCollectionProxy(TVirtualCollectionProxy*);
123 void AdoptCollectionProxyInfo(Detail::TCollectionProxyInfo*);
124 void AdoptCollectionStreamerInfo(Detail::TCollectionProxyInfo*);
125 Int_t SetDeclFile(const char *file, Int_t line);
126 void SetDelete(DelFunc_t deleteFunc);
127 void SetDeleteArray(DelArrFunc_t deleteArrayFunc);
128 void SetDestructor(DesFunc_t destructorFunc);
129 void SetDirectoryAutoAdd(DirAutoAdd_t dirAutoAdd);
130 void SetFromTemplate();
131 Int_t SetImplFile(const char *file, Int_t line);
132 void SetMerge(MergeFunc_t);
133 void SetResetAfterMerge(ResetAfterMergeFunc_t);
134 void SetNew(NewFunc_t newFunc);
135 void SetNewArray(NewArrFunc_t newArrayFunc);
136 void SetReadRawRules( const std::vector<ROOT::Internal::TSchemaHelper>& rules );
137 void SetReadRules( const std::vector<ROOT::Internal::TSchemaHelper>& rules );
138 Short_t SetStreamer(ClassStreamerFunc_t);
139 void SetStreamerFunc(ClassStreamerFunc_t);
140 void SetConvStreamerFunc(ClassConvStreamerFunc_t);
141 Short_t SetVersion(Short_t version);
142
143 // protected:
144 private:
145 void CreateRuleSet( std::vector<ROOT::Internal::TSchemaHelper>& vect, Bool_t ProcessReadRules );
146 TGenericClassInfo(const TGenericClassInfo &) = delete;
147 TGenericClassInfo& operator=(const TGenericClassInfo &) = delete;
148
149 private:
150 TGenericClassInfo();
151
152 };
153
154}
155
156#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
Defines a common interface to inspect/change the contents of an object that represents a collection.
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:114
void(* ResetAfterMergeFunc_t)(void *, TFileMergeInfo *)
Definition Rtypes.h:116
void(* DesFunc_t)(void *)
Definition Rtypes.h:113
TClass * GetClass(T *)
Definition TClass.h:663
void(* DelFunc_t)(void *)
Definition Rtypes.h:111
void *(* NewArrFunc_t)(Long_t size, void *arena)
Definition Rtypes.h:110
void(* DelArrFunc_t)(void *)
Definition Rtypes.h:112
void *(* NewFunc_t)(void *)
Definition Rtypes.h:109
Long64_t(* MergeFunc_t)(void *, TCollection *, TFileMergeInfo *)
Definition Rtypes.h:115
void Init(TClassEdit::TInterpreterLookupHelper *helper)
Definition file.py:1