Logo ROOT   master
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 Internal {
29  /// Returns a string with the demangled and normalized name for the given type.
30  std::string GetDemangledTypeName(const std::type_info&);
31  }
32 
33  namespace Detail {
34  class TCollectionProxyInfo;
35  }
36 
38  // This class in not inlined because it is used is non time critical
39  // section (the dictionaries) and inline would lead to too much
40  // repetition of the code (once per class!).
41 
44  const char *fClassName;
45  const char *fDeclFileName;
48  const std::type_info &fInfo;
49  const char *fImplFileName;
69  std::vector<ROOT::Internal::TSchemaHelper> fReadRules;
70  std::vector<ROOT::Internal::TSchemaHelper> fReadRawRules;
71 
72  public:
73  TGenericClassInfo(const char *fullClassname,
74  const char *declFileName, Int_t declFileLine,
75  const std::type_info &info, const Internal::TInitBehavior *action,
76  DictFuncPtr_t dictionary,
77  TVirtualIsAProxy *isa, Int_t pragmabits, Int_t sizof);
78 
79  TGenericClassInfo(const char *fullClassname, Int_t version,
80  const char *declFileName, Int_t declFileLine,
81  const std::type_info &info, const Internal::TInitBehavior *action,
82  DictFuncPtr_t dictionary,
83  TVirtualIsAProxy *isa, Int_t pragmabits, Int_t sizof);
84 
85  TGenericClassInfo(const char *fullClassname, Int_t version,
86  const char *declFileName, Int_t declFileLine,
87  const Internal::TInitBehavior *action,
88  DictFuncPtr_t dictionary, Int_t pragmabits);
89 
90  void Init(Int_t pragmabits);
92 
93  const Internal::TInitBehavior &GetAction() const;
94  TClass *GetClass();
95  const char *GetClassName() const;
98  const char *GetDeclFileName() const;
99  Int_t GetDeclFileLine() const;
100  DelFunc_t GetDelete() const;
102  DesFunc_t GetDestructor() const;
104  const char *GetImplFileName();
106  const std::type_info &GetInfo() const;
107  TVirtualIsAProxy *GetIsA() const;
108  NewFunc_t GetNew() const;
109  NewArrFunc_t GetNewArray() const;
110  const std::vector<ROOT::Internal::TSchemaHelper> &GetReadRawRules() const;
111  const std::vector<ROOT::Internal::TSchemaHelper> &GetReadRules() const;
112  Int_t GetVersion() const;
113 
114  TClass *IsA(const void *obj);
115 
120  Int_t SetDeclFile(const char *file, Int_t line);
121  void SetDelete(DelFunc_t deleteFunc);
122  void SetDeleteArray(DelArrFunc_t deleteArrayFunc);
123  void SetDestructor(DesFunc_t destructorFunc);
124  void SetDirectoryAutoAdd(DirAutoAdd_t dirAutoAdd);
125  void SetFromTemplate();
126  Int_t SetImplFile(const char *file, Int_t line);
127  void SetMerge(MergeFunc_t);
129  void SetNew(NewFunc_t newFunc);
130  void SetNewArray(NewArrFunc_t newArrayFunc);
131  void SetReadRawRules( const std::vector<ROOT::Internal::TSchemaHelper>& rules );
132  void SetReadRules( const std::vector<ROOT::Internal::TSchemaHelper>& rules );
136  Short_t SetVersion(Short_t version);
137 
138  // protected:
139  private:
140  void CreateRuleSet( std::vector<ROOT::Internal::TSchemaHelper>& vect, Bool_t ProcessReadRules );
141  TGenericClassInfo(const TGenericClassInfo&); // Not implemented
142  TGenericClassInfo& operator=(const TGenericClassInfo&); // Not implemented
143 
144  private:
146 
147  };
148 
149 }
150 
151 #endif
void SetStreamerFunc(ClassStreamerFunc_t)
const std::type_info & GetInfo() const
const char * GetClassName() const
void(* ClassStreamerFunc_t)(TBuffer &, void *)
Definition: Rtypes.h:70
Detail::TCollectionProxyInfo * fCollectionProxyInfo
Returns the available number of logical cores.
Definition: StringConv.hxx:21
void SetDelete(DelFunc_t deleteFunc)
TLine * line
void(* DelArrFunc_t)(void *)
Definition: Rtypes.h:113
Long64_t(* MergeFunc_t)(void *, TCollection *, TFileMergeInfo *)
Definition: Rtypes.h:116
void SetConvStreamerFunc(ClassConvStreamerFunc_t)
const std::type_info & fInfo
void CreateRuleSet(std::vector< ROOT::Internal::TSchemaHelper > &vect, Bool_t ProcessReadRules)
Attach the schema evolution information to TClassObject.
TVirtualIsAProxy * GetIsA() const
Short_t AdoptCollectionProxy(TVirtualCollectionProxy *)
Short_t SetVersion(Short_t version)
ClassConvStreamerFunc_t fConvStreamerFunc
ResetAfterMergeFunc_t fResetAfterMerge
DirAutoAdd_t GetDirectoryAutoAdd() const
const char * GetDeclFileName() const
void SetReadRules(const std::vector< ROOT::Internal::TSchemaHelper > &rules)
void SetDirectoryAutoAdd(DirAutoAdd_t dirAutoAdd)
TClass * IsA(const void *obj)
void *(* NewFunc_t)(void *)
Definition: Rtypes.h:110
Short_t SetStreamer(ClassStreamerFunc_t)
TClass *(* DictFuncPtr_t)()
Definition: Rtypes.h:78
Int_t SetDeclFile(const char *file, Int_t line)
void(* ClassConvStreamerFunc_t)(TBuffer &, void *, const TClass *)
Definition: Rtypes.h:71
Short_t AdoptStreamer(TClassStreamer *)
void(* ResetAfterMergeFunc_t)(void *, TFileMergeInfo *)
Definition: Rtypes.h:117
std::vector< ROOT::Internal::TSchemaHelper > fReadRawRules
const Internal::TInitBehavior * fAction
void *(* NewArrFunc_t)(Long_t size, void *arena)
Definition: Rtypes.h:111
const std::vector< ROOT::Internal::TSchemaHelper > & GetReadRawRules() const
Int_t SetImplFile(const char *file, Int_t line)
TClassStreamer * fStreamer
void AdoptCollectionStreamerInfo(Detail::TCollectionProxyInfo *)
NewArrFunc_t GetNewArray() const
const Internal::TInitBehavior & GetAction() const
Detail::TCollectionProxyInfo * fCollectionStreamerInfo
ClassStreamerFunc_t fStreamerFunc
short Short_t
Definition: RtypesCore.h:35
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:75
TVirtualIsAProxy * fIsA
void SetDestructor(DesFunc_t destructorFunc)
std::vector< ROOT::Internal::TSchemaHelper > fReadRules
TVirtualCollectionProxy * fCollectionProxy
void SetDeleteArray(DelArrFunc_t deleteArrayFunc)
Detail::TCollectionProxyInfo * GetCollectionStreamerInfo() const
void Init(Int_t pragmabits)
void SetNew(NewFunc_t newFunc)
void(* DelFunc_t)(void *)
Definition: Rtypes.h:112
void SetNewArray(NewArrFunc_t newArrayFunc)
Detail::TCollectionProxyInfo * GetCollectionProxyInfo() const
void SetResetAfterMerge(ResetAfterMergeFunc_t)
void(* DirAutoAdd_t)(void *, TDirectory *)
Definition: Rtypes.h:115
Definition: file.py:1
DesFunc_t GetDestructor() const
TGenericClassInfo & operator=(const TGenericClassInfo &)
std::string GetDemangledTypeName(const std::type_info &)
Returns a string with the demangled and normalized name for the given type.
void AdoptCollectionProxyInfo(Detail::TCollectionProxyInfo *)
const std::vector< ROOT::Internal::TSchemaHelper > & GetReadRules() const
void SetReadRawRules(const std::vector< ROOT::Internal::TSchemaHelper > &rules)
DelArrFunc_t GetDeleteArray() const
void(* DesFunc_t)(void *)
Definition: Rtypes.h:114