Logo ROOT   6.16/01
Reference Guide
TClass.h
Go to the documentation of this file.
1// @(#)root/meta:$Id$
2// Author: Rene Brun 07/01/95
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
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_TClass
13#define ROOT_TClass
14
15//////////////////////////////////////////////////////////////////////////
16// //
17// TClass //
18// //
19// Dictionary of a class. //
20// //
21//////////////////////////////////////////////////////////////////////////
22
23#include "TDictionary.h"
24#include "TString.h"
25#include "TObjArray.h"
26#include "TObjString.h"
27
28#include <map>
29#include <string>
30#include <set>
31#include <unordered_set>
32#include <vector>
33
34#include <atomic>
35#include "ThreadLocalStorage.h"
36
37class TBaseClass;
38class TBrowser;
39class TDataMember;
40class TCling;
41class TMethod;
42class TRealData;
43class TBuffer;
46class TMethodCall;
49class THashTable;
53class TListOfEnums;
57class TProtoClass;
58
59namespace ROOT {
60 class TGenericClassInfo;
61 class TMapTypeToTClass;
62 class TMapDeclIdToTClass;
63 namespace Detail {
64 class TSchemaRuleSet;
65 class TCollectionProxyInfo;
66 }
67 namespace Internal {
68 class TCheckHashRecursiveRemoveConsistency;
69 }
70}
71
72typedef ROOT::TMapTypeToTClass IdMap_t;
73typedef ROOT::TMapDeclIdToTClass DeclIdMap_t;
74
75class TClass : public TDictionary {
76
77friend class TCling;
78friend void ROOT::ResetClassVersion(TClass*, const char*, Short_t);
80friend class TProtoClass;
82
83public:
84 // TClass status bits
86 kReservedLoading = BIT(7), // Internal status bits, set and reset only during initialization
87
91 kUnloaded = BIT(16), // The library containing the dictionary for this class was
92 // loaded and has been unloaded from memory.
95 kIsEmulation = BIT(19), // Deprecated
96 kStartWithTObject = BIT(20), // see comments for IsStartingWithTObject()
97 kWarned = BIT(21),
99 kHasCustomStreamerMember = BIT(23) // The class has a Streamer method and it is implemented by the user or an older (not StreamerInfo based) automatic streamer.
100 };
104 kNoEnum = 1, // Used since v3.3
105 kReflexNoComment = 2, // Up to v5.34.18 (has no range/comment and no typedef at all)
106 kNoRange = 3, // Up to v5.17
107 kWithTypeDef = 4, // Up to v5.34.18 and v5.99/06
108 kReflex = 5, // Up to v5.34.18 (has no typedef at all)
109 kNoRangeCheck = 6, // Up to v5.34.18 and v5.99/06
110 kNoBaseCheckSum = 7, // Up to v5.34.18 and v5.99/06
112 };
113
114 // Describe the current state of the TClass itself.
115 enum EState {
116 kNoInfo, // The state has not yet been initialized, i.e. the TClass
117 // was just created and/or there is no trace of it in the interpreter.
118 kForwardDeclared, // The interpreted knows the entity is a class but that's it.
119 kEmulated, // The information about the class only comes from a TStreamerInfo
120 kInterpreted, // The class is described completely/only in the interpreter database.
121 kHasTClassInit, // The class has a TClass proper bootstrap coming from a run
122 // through rootcling/genreflex/TMetaUtils and the library
123 // containing this dictionary has been loaded in memory.
125 kNamespaceForMeta // Very transient state necessary to bootstrap namespace entries
126 // in ROOT Meta w/o interpreter information
127 };
128
129private:
130
131
132
134 // A class which is used to collect decl names starting from normalised
135 // names (typedef resolution is excluded here, just string manipulation
136 // is performed). At the heart of the implementation, an unordered set.
137 public:
138 TDeclNameRegistry(Int_t verbLevel=0);
139 void AddQualifiedName(const char *name);
140 Bool_t HasDeclName(const char *name) const;
142 private:
144 std::unordered_set<std::string> fClassNamesSet;
145 mutable std::atomic_flag fSpinLock; // MSVC doesn't support = ATOMIC_FLAG_INIT;
146 };
147
149 // Trivial RAII used to insert names in the registry
151 const char* fName;
153 public:
154 InsertTClassInRegistryRAII(TClass::EState &state, const char *name, TDeclNameRegistry &emuRegistry);
156 };
157
158 // TClass objects can be created as a result of opening a TFile (in which
159 // they are in emulated mode) or as a result of loading the dictionary for
160 // the corresponding class. When a dictionary is loaded any pre-existing
161 // emulated TClass is replaced by the one created/coming from the dictionary.
162 // To have a reference that always point to the 'current' TClass object for
163 // a given class, one should use a TClassRef.
164 // TClassRef works by holding on to the fPersistentRef which is updated
165 // atomically whenever a TClass is replaced. During the replacement the
166 // value of fPersistentRef is set to zero, leading the TClassRef to call
167 // TClass::GetClass which is also locked by the replacement. At the end
168 // of the replacement, fPersistentRef points to the new TClass object.
169 std::atomic<TClass**> fPersistentRef;//!Persistent address of pointer to this TClass object and its successors.
170
171 typedef std::atomic<std::map<std::string, TObjArray*>*> ConvSIMap_t;
172
173 mutable TObjArray *fStreamerInfo; //Array of TVirtualStreamerInfo
174 mutable ConvSIMap_t fConversionStreamerInfo; //Array of the streamer infos derived from another class.
175 TList *fRealData; //linked list for persistent members including base classes
176 std::atomic<TList*> fBase; //linked list for base classes
177 TListOfDataMembers *fData; //linked list for data members
178
179 std::atomic<TListOfEnums*> fEnums; //linked list for the enums
180 TListOfFunctionTemplates *fFuncTemplate; //linked list for function templates [Not public until implemented as active list]
181 std::atomic<TListOfFunctions*> fMethod; //linked list for methods
182
183 TViewPubDataMembers*fAllPubData; //all public data members (including from base classes)
184 TViewPubFunctions *fAllPubMethod; //all public methods (including from base classes)
185 mutable TList *fClassMenuList; //list of class menu items
186
187 const char *fDeclFileName; //name of class declaration file
188 const char *fImplFileName; //name of class implementation file
189 Short_t fDeclFileLine; //line of class declaration
190 Short_t fImplFileLine; //line of class implementation
191 UInt_t fInstanceCount; //number of instances of this class
192 UInt_t fOnHeap; //number of instances on heap
193 mutable std::atomic<UInt_t> fCheckSum; //checksum of data members and base classes
195 Version_t fClassVersion; //Class version Identifier
196 ClassInfo_t *fClassInfo; //pointer to CINT class info class
197 TString fContextMenuTitle;//context menu title
198 const std::type_info *fTypeInfo; //pointer to the C++ type information.
199 ShowMembersFunc_t fShowMembers; //pointer to the class's ShowMembers function
200 TClassStreamer *fStreamer; //pointer to streamer function
201 TString fSharedLibs; //shared libraries containing class code
202
203 TVirtualIsAProxy *fIsA; //!pointer to the class's IsA proxy.
204 IsAGlobalFunc_t fGlobalIsA; //pointer to a global IsA function.
205 mutable std::atomic<TMethodCall*> fIsAMethod; //!saved info to call a IsA member function
206
207 ROOT::MergeFunc_t fMerge; //pointer to a function implementing Merging objects of this class.
208 ROOT::ResetAfterMergeFunc_t fResetAfterMerge; //pointer to a function implementing Merging objects of this class.
209 ROOT::NewFunc_t fNew; //pointer to a function newing one object.
210 ROOT::NewArrFunc_t fNewArray; //pointer to a function newing an array of objects.
211 ROOT::DelFunc_t fDelete; //pointer to a function deleting one object.
212 ROOT::DelArrFunc_t fDeleteArray; //pointer to a function deleting an array of objects.
213 ROOT::DesFunc_t fDestructor; //pointer to a function call an object's destructor.
214 ROOT::DirAutoAdd_t fDirAutoAdd; //pointer which implements the Directory Auto Add feature for this class.']'
215 ClassStreamerFunc_t fStreamerFunc; //Wrapper around this class custom Streamer member function.
216 ClassConvStreamerFunc_t fConvStreamerFunc; //Wrapper around this class custom conversion Streamer member function.
217 Int_t fSizeof; //Sizeof the class.
218
219 Int_t fCanSplit; //!Indicates whether this class can be split or not.
220 mutable std::atomic<Long_t> fProperty; //!Property
221 mutable Long_t fClassProperty; //!C++ Property of the class (is abstract, has virtual table, etc.)
222
223 // fHasRootPcmInfo needs to be atomic as long as GetListOfBases needs to modify it.
224 std::atomic<Bool_t> fHasRootPcmInfo; //!Whether info was loaded from a root pcm.
225 mutable std::atomic<Bool_t> fCanLoadClassInfo; //!Indicates whether the ClassInfo is supposed to be available.
226 mutable std::atomic<Bool_t> fIsOffsetStreamerSet; //!saved remember if fOffsetStreamer has been set.
227 mutable std::atomic<Bool_t> fVersionUsed; //!Indicates whether GetClassVersion has been called
228
230 kNotInitialized = 0,
231 kSet = BIT(0),
232 // kInconsistent when kSet & !kConsistent.
234 };
236 return l & static_cast<UChar_t>(r);
237 }
238 mutable std::atomic<UChar_t> fRuntimeProperties; //! Properties that can only be evaluated at run-time
239
240 mutable Long_t fOffsetStreamer; //!saved info to call Streamer
241 Int_t fStreamerType; //!cached of the streaming method to use
242 EState fState; //!Current 'state' of the class (Emulated,Interpreted,Loaded)
243 mutable std::atomic<TVirtualStreamerInfo*> fCurrentInfo; //!cached current streamer info.
244 mutable std::atomic<TVirtualStreamerInfo*> fLastReadInfo; //!cached streamer info used in the last read.
245 TVirtualRefProxy *fRefProxy; //!Pointer to reference proxy if this class represents a reference
246 ROOT::Detail::TSchemaRuleSet *fSchemaRules; //! Schema evolution rules
247
248 typedef void (*StreamerImpl_t)(const TClass* pThis, void *obj, TBuffer &b, const TClass *onfile_class);
249#ifdef R__NO_ATOMIC_FUNCTION_POINTER
250 mutable StreamerImpl_t fStreamerImpl; //! Pointer to the function implementing streaming for this class
251#else
252 mutable std::atomic<StreamerImpl_t> fStreamerImpl; //! Pointer to the function implementing streaming for this class
253#endif
254
260 void Init(const char *name, Version_t cversion, const std::type_info *info,
261 TVirtualIsAProxy *isa,
262 const char *dfil, const char *ifil,
263 Int_t dl, Int_t il,
264 ClassInfo_t *classInfo,
265 Bool_t silent);
266 void ForceReload (TClass* oldcl);
267 void LoadClassInfo() const;
268
269 static TClass *LoadClassDefault(const char *requestedname, Bool_t silent);
270 static TClass *LoadClassCustom(const char *requestedname, Bool_t silent);
271
272 void SetClassVersion(Version_t version);
273 void SetClassSize(Int_t sizof) { fSizeof = sizof; }
275
276 void SetStreamerImpl();
277
279
280 // Various implementation for TClass::Stramer
281 static void StreamerExternal(const TClass* pThis, void *object, TBuffer &b, const TClass *onfile_class);
282 static void StreamerTObject(const TClass* pThis, void *object, TBuffer &b, const TClass *onfile_class);
283 static void StreamerTObjectInitialized(const TClass* pThis, void *object, TBuffer &b, const TClass *onfile_class);
284 static void StreamerTObjectEmulated(const TClass* pThis, void *object, TBuffer &b, const TClass *onfile_class);
285 static void StreamerInstrumented(const TClass* pThis, void *object, TBuffer &b, const TClass *onfile_class);
286 static void ConvStreamerInstrumented(const TClass* pThis, void *object, TBuffer &b, const TClass *onfile_class);
287 static void StreamerStreamerInfo(const TClass* pThis, void *object, TBuffer &b, const TClass *onfile_class);
288 static void StreamerDefault(const TClass* pThis, void *object, TBuffer &b, const TClass *onfile_class);
289
290 static IdMap_t *GetIdMap(); //Map from typeid to TClass pointer
291 static DeclIdMap_t *GetDeclIdMap(); //Map from DeclId_t to TClass pointer
292 static std::atomic<Int_t> fgClassCount; //provides unique id for a each class
293 //stored in TObject::fUniqueID
294 static TDeclNameRegistry fNoInfoOrEmuOrFwdDeclNameRegistry; // Store decl names of the forwardd and no info instances
295 static Bool_t HasNoInfoOrEmuOrFwdDeclaredDecl(const char*);
296
297 // Internal status bits, set and reset only during initialization and thus under the protection of the global lock.
299 // Internal streamer type.
301
302 // When a new class is created, we need to be able to find
303 // if there are any existing classes that have the same name
304 // after any typedefs are expanded. (This only really affects
305 // template arguments.) To avoid having to search through all classes
306 // in that case, we keep a hash table mapping from the fully
307 // typedef-expanded names to the original class names.
308 // An entry is made in the table only if they are actually different.
309 //
310 // In these objects, the TObjString base holds the typedef-expanded
311 // name (the hash key), and fOrigName holds the original class name
312 // (the value to which the key maps).
313 //
315 {
316 public:
317 TNameMapNode (const char* typedf, const char* orig);
319 };
320
321 // These are the above-referenced hash tables. (The pointers are null
322 // if no entries have been made.)
324
325private:
326 TClass(const TClass& tc) = delete;
327 TClass& operator=(const TClass&) = delete;
328
329protected:
331 void GetMissingDictionariesForBaseClasses(TCollection &result, TCollection &visited, bool recurse);
332 void GetMissingDictionariesForMembers(TCollection &result, TCollection &visited, bool recurse);
333 void GetMissingDictionariesWithRecursionCheck(TCollection &result, TCollection &visited, bool recurse);
334 void GetMissingDictionariesForPairElements(TCollection &result, TCollection &visited, bool recurse);
335
336public:
337 TClass();
338 TClass(const char *name, Bool_t silent = kFALSE);
339 TClass(const char *name, Version_t cversion, Bool_t silent = kFALSE);
340 TClass(const char *name, Version_t cversion, EState theState, Bool_t silent = kFALSE);
341 TClass(ClassInfo_t *info, Version_t cversion,
342 const char *dfil, const char *ifil = 0,
343 Int_t dl = 0, Int_t il = 0, Bool_t silent = kFALSE);
344 TClass(const char *name, Version_t cversion,
345 const char *dfil, const char *ifil = 0,
346 Int_t dl = 0, Int_t il = 0, Bool_t silent = kFALSE);
347 TClass(const char *name, Version_t cversion,
348 const std::type_info &info, TVirtualIsAProxy *isa,
349 const char *dfil, const char *ifil,
350 Int_t dl, Int_t il, Bool_t silent = kFALSE);
351 virtual ~TClass();
352
353 void AddInstance(Bool_t heap = kFALSE) { fInstanceCount++; if (heap) fOnHeap++; }
354 void AddImplFile(const char *filename, int line);
355 static Bool_t AddRule(const char *rule);
356 static Int_t ReadRules(const char *filename);
357 static Int_t ReadRules();
359 virtual void Browse(TBrowser *b);
360 void BuildRealData(void *pointer=0, Bool_t isTransient = kFALSE);
361 void BuildEmulatedRealData(const char *name, Long_t offset, TClass *cl);
362 void CalculateStreamerOffset() const;
363 Bool_t CallShowMembers(const void* obj, TMemberInspector &insp, Bool_t isTransient = kFALSE) const;
364 Bool_t CanSplit() const;
366 Long_t ClassProperty() const;
367 TObject *Clone(const char *newname="") const;
369 void Draw(Option_t *option="");
370 void Dump() const { TDictionary::Dump(); }
371 void Dump(const void *obj, Bool_t noAddr = kFALSE) const;
372 char *EscapeChars(const char *text) const;
374 TVirtualStreamerInfo *GetConversionStreamerInfo( const char* onfile_classname, Int_t version ) const;
375 TVirtualStreamerInfo *FindConversionStreamerInfo( const char* onfile_classname, UInt_t checksum ) const;
376 TVirtualStreamerInfo *GetConversionStreamerInfo( const TClass* onfile_cl, Int_t version ) const;
377 TVirtualStreamerInfo *FindConversionStreamerInfo( const TClass* onfile_cl, UInt_t checksum ) const;
383 UInt_t GetCheckSum(Bool_t &isvalid) const;
384 UInt_t GetCheckSum(ECheckSum code, Bool_t &isvalid) const;
387 TMethod *GetClassMethod(const char *name, const char *params, Bool_t objectIsConst = kFALSE);
388 TMethod *GetClassMethodWithPrototype(const char *name, const char *proto,
389 Bool_t objectIsConst = kFALSE,
392 if (!fVersionUsed.load(std::memory_order_relaxed))
394 return fClassVersion;
395 }
396 Int_t GetClassSize() const { return Size(); }
397 TDataMember *GetDataMember(const char *datamember) const;
398 Long_t GetDataMemberOffset(const char *membername) const;
399 const char *GetDeclFileName() const { return fDeclFileName; }
404 ClassInfo_t *GetClassInfo() const {
407 return fClassInfo;
408 }
409 const char *GetContextMenuTitle() const { return fContextMenuTitle; }
411 auto current = fCurrentInfo.load(std::memory_order_relaxed);
412 if (current) return current;
413 else return DetermineCurrentStreamerInfo();
414 }
422 TCollection *GetListOfMethodOverloads(const char* name) const;
423 TList *GetListOfRealData() const { return fRealData; }
426 const char *GetImplFileName() const { return fImplFileName; }
428 TClass *GetActualClass(const void *object) const;
429 TClass *GetBaseClass(const char *classname);
430 TClass *GetBaseClass(const TClass *base);
431 Int_t GetBaseClassOffset(const TClass *toBase, void *address = 0, bool isDerivedObject = true);
432 TClass *GetBaseDataMember(const char *datamember);
438 void GetMenuItems(TList *listitems);
439 TList *GetMenuList() const;
440 TMethod *GetMethod(const char *method, const char *params, Bool_t objectIsConst = kFALSE);
441 TMethod *GetMethodWithPrototype(const char *method, const char *proto, Bool_t objectIsConst = kFALSE,
443 TMethod *GetMethodAny(const char *method);
444 TMethod *GetMethodAllAny(const char *method);
445 Int_t GetNdata();
451 TClass *const*GetPersistentRef() const { return fPersistentRef; }
452 TRealData *GetRealData(const char *name) const;
456 const char *GetSharedLibs();
458 EState GetState() const { return fState; }
462 const TObjArray *GetStreamerInfos() const { return fStreamerInfo; }
466 const std::type_info *GetTypeInfo() const { return fTypeInfo; };
467
468 /// @brief Return 'true' if we can guarantee that if this class (or any class in
469 /// this class inheritance hierarchy) overload TObject::Hash it also starts
470 /// the RecursiveRemove process from its own destructor.
472 {
476 }
477 Bool_t HasDictionary() const;
478 static Bool_t HasDictionarySelection(const char* clname);
480 void GetMissingDictionaries(THashTable& result, bool recurse = false);
482 Bool_t InheritsFrom(const char *cl) const;
483 Bool_t InheritsFrom(const TClass *cl) const;
484 void InterpretedShowMembers(void* obj, TMemberInspector &insp, Bool_t isTransient);
485 Bool_t IsFolder() const { return kTRUE; }
486 Bool_t IsLoaded() const;
487 Bool_t IsForeign() const;
489 Bool_t IsVersioned() const { return !( GetClassVersion()<=1 && IsForeign() ); }
490 Bool_t IsTObject() const;
491 static TClass *LoadClass(const char *requestedname, Bool_t silent);
492 void ls(Option_t *opt="") const;
493 void MakeCustomMenuList();
494 Bool_t MatchLegacyCheckSum(UInt_t checksum) const;
495 void Move(void *arenaFrom, void *arenaTo) const;
496 void *New(ENewType defConstructor = kClassNew, Bool_t quiet = kFALSE) const;
497 void *New(void *arena, ENewType defConstructor = kClassNew) const;
498 void *NewArray(Long_t nElements, ENewType defConstructor = kClassNew) const;
499 void *NewArray(Long_t nElements, void *arena, ENewType defConstructor = kClassNew) const;
500 virtual void PostLoadCheck();
501 Long_t Property() const;
502 Int_t ReadBuffer(TBuffer &b, void *pointer, Int_t version, UInt_t start, UInt_t count);
503 Int_t ReadBuffer(TBuffer &b, void *pointer);
505 void RemoveStreamerInfo(Int_t slot);
506 void ReplaceWith(TClass *newcl) const;
507 void ResetCaches();
508 void ResetClassInfo(Long_t tagnum);
509 void ResetClassInfo();
511 void ResetMenuList();
512 Int_t Size() const;
513 void SetCanSplit(Int_t splitmode);
515 void SetContextMenuTitle(const char *title);
518 void SetDeclFile(const char *name, int line) { fDeclFileName = name; fDeclFileLine = line; }
519 void SetDelete(ROOT::DelFunc_t deleteFunc);
520 void SetDeleteArray(ROOT::DelArrFunc_t deleteArrayFunc);
521 void SetDirectoryAutoAdd(ROOT::DirAutoAdd_t dirAutoAddFunc);
522 void SetDestructor(ROOT::DesFunc_t destructorFunc);
523 void SetImplFileName(const char *implFileName) { fImplFileName = implFileName; }
524 void SetMerge(ROOT::MergeFunc_t mergeFunc);
526 void SetNew(ROOT::NewFunc_t newFunc);
527 void SetNewArray(ROOT::NewArrFunc_t newArrayFunc);
528 TVirtualStreamerInfo *SetStreamerInfo(Int_t version, const char *info="");
529 void SetUnloaded();
530 Int_t WriteBuffer(TBuffer &b, void *pointer, const char *info="");
531
533 void AdoptStreamer(TClassStreamer *strm);
534 void AdoptMemberStreamer(const char *name, TMemberStreamer *strm);
535 void SetMemberStreamer(const char *name, MemberStreamerFunc_t strm);
538
539 // Function to retrieve the TClass object and dictionary function
540 static void AddClass(TClass *cl);
542 static void RemoveClass(TClass *cl);
544 static TClass *GetClass(const char *name, Bool_t load = kTRUE, Bool_t silent = kFALSE);
545 static TClass *GetClass(const std::type_info &typeinfo, Bool_t load = kTRUE, Bool_t silent = kFALSE);
546 static TClass *GetClass(ClassInfo_t *info, Bool_t load = kTRUE, Bool_t silent = kFALSE);
547 static Bool_t GetClass(DeclId_t id, std::vector<TClass*> &classes);
548 static DictFuncPtr_t GetDict (const char *cname);
549 static DictFuncPtr_t GetDict (const std::type_info &info);
550
551 static Int_t AutoBrowse(TObject *obj, TBrowser *browser);
552 static ENewType IsCallingNew();
553 static TClass *Load(TBuffer &b);
554 void Store(TBuffer &b) const;
555
556 // Pseudo-method apply to the 'obj'. In particular those are used to
557 // implement TObject like methods for non-TObject classes
558
559 Int_t Browse(void *obj, TBrowser *b) const;
560 void DeleteArray(void *ary, Bool_t dtorOnly = kFALSE);
561 void Destructor(void *obj, Bool_t dtorOnly = kFALSE);
562 void *DynamicCast(const TClass *base, void *obj, Bool_t up = kTRUE);
563 const void *DynamicCast(const TClass *base, const void *obj, Bool_t up = kTRUE);
564 Bool_t IsFolder(void *obj) const;
565
566 inline void Streamer(void *obj, TBuffer &b, const TClass *onfile_class = 0) const
567 {
568 // Inline for performance, skipping one function call.
569#ifdef R__NO_ATOMIC_FUNCTION_POINTER
570 fStreamerImpl(this,obj,b,onfile_class);
571#else
572 auto t = fStreamerImpl.load();
573 t(this,obj,b,onfile_class);
574#endif
575 }
576
577 ClassDef(TClass,0) //Dictionary containing class information
578};
579
580namespace ROOT {
581
582template <typename T> TClass *GetClass(T * /* dummy */) { return TClass::GetClass(typeid(T)); }
583template <typename T> TClass *GetClass(const T * /* dummy */) { return TClass::GetClass(typeid(T)); }
584
585#ifndef R__NO_CLASS_TEMPLATE_SPECIALIZATION
586 // This can only be used when the template overload resolution can distinguish between T* and T**
587 template <typename T> TClass* GetClass( T** /* dummy */) { return GetClass((T*)0); }
588 template <typename T> TClass* GetClass(const T** /* dummy */) { return GetClass((T*)0); }
589 template <typename T> TClass* GetClass( T* const* /* dummy */) { return GetClass((T*)0); }
590 template <typename T> TClass* GetClass(const T* const* /* dummy */) { return GetClass((T*)0); }
591#endif
592
593 extern TClass *CreateClass(const char *cname, Version_t id,
594 const char *dfil, const char *ifil,
595 Int_t dl, Int_t il);
596}
597
598#endif // ROOT_TClass
ROOT::R::TRInterface & r
Definition: Object.C:4
#define b(i)
Definition: RSha256.hxx:100
int Int_t
Definition: RtypesCore.h:41
short Version_t
Definition: RtypesCore.h:61
unsigned char UChar_t
Definition: RtypesCore.h:34
unsigned int UInt_t
Definition: RtypesCore.h:42
const Bool_t kFALSE
Definition: RtypesCore.h:88
long Long_t
Definition: RtypesCore.h:50
bool Bool_t
Definition: RtypesCore.h:59
short Short_t
Definition: RtypesCore.h:35
const Bool_t kTRUE
Definition: RtypesCore.h:87
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:324
TClass *(* DictFuncPtr_t)()
Definition: Rtypes.h:77
#define BIT(n)
Definition: Rtypes.h:82
void(* MemberStreamerFunc_t)(TBuffer &, void *, Int_t)
Definition: Rtypes.h:71
TClass *(* IsAGlobalFunc_t)(const TClass *, const void *obj)
Definition: Rtypes.h:97
void(* ShowMembersFunc_t)(const void *obj, TMemberInspector &R__insp, Bool_t isTransient)
Definition: Rtypes.h:95
void(* ClassStreamerFunc_t)(TBuffer &, void *)
Definition: Rtypes.h:69
void(* ClassConvStreamerFunc_t)(TBuffer &, void *, const TClass *)
Definition: Rtypes.h:70
ROOT::TMapDeclIdToTClass DeclIdMap_t
Definition: TClass.h:73
ROOT::TMapTypeToTClass IdMap_t
Definition: TClass.h:72
typedef void((*Func_t)())
const char * proto
Definition: civetweb.c:16604
Each class (see TClass) has a linked list of its base class(es).
Definition: TBaseClass.h:33
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
Buffer base class used for serializing objects.
Definition: TBuffer.h:40
TDeclNameRegistry & fNoInfoOrEmuOrFwdDeclNameRegistry
Definition: TClass.h:152
InsertTClassInRegistryRAII(TClass::EState &state, const char *name, TDeclNameRegistry &emuRegistry)
Definition: TClass.cxx:206
Bool_t HasDeclName(const char *name) const
Definition: TClass.cxx:181
std::unordered_set< std::string > fClassNamesSet
Definition: TClass.h:144
void AddQualifiedName(const char *name)
Extract this part of the name.
Definition: TClass.cxx:154
TDeclNameRegistry(Int_t verbLevel=0)
TDeclNameRegistry class constructor.
Definition: TClass.cxx:143
std::atomic_flag fSpinLock
Definition: TClass.h:145
TString fOrigName
Definition: TClass.h:318
TNameMapNode(const char *typedf, const char *orig)
Definition: TClass.cxx:696
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:75
TClass *const * GetPersistentRef() const
Definition: TClass.h:451
UInt_t GetCheckSum(ECheckSum code=kCurrentCheckSum) const
Call GetCheckSum with validity check.
Definition: TClass.cxx:6217
ShowMembersFunc_t fShowMembers
Definition: TClass.h:199
TDataMember * GetDataMember(const char *datamember) const
Return pointer to datamember object with name "datamember".
Definition: TClass.cxx:3278
TVirtualIsAProxy * fIsA
Definition: TClass.h:203
void ForceReload(TClass *oldcl)
we found at least one equivalent.
Definition: TClass.cxx:1278
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
Definition: TClass.cxx:4452
ROOT::DelArrFunc_t fDeleteArray
Definition: TClass.h:212
Bool_t CanSplit() const
Return true if the data member of this TClass can be saved separately.
Definition: TClass.cxx:2229
TClassStreamer * fStreamer
Definition: TClass.h:200
void SetDirectoryAutoAdd(ROOT::DirAutoAdd_t dirAutoAddFunc)
Install a new wrapper around the directory auto add function.
Definition: TClass.cxx:6737
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Definition: TClass.h:485
void * NewArray(Long_t nElements, ENewType defConstructor=kClassNew) const
Return a pointer to a newly allocated array of objects of this class.
Definition: TClass.cxx:5006
static TDeclNameRegistry fNoInfoOrEmuOrFwdDeclNameRegistry
Definition: TClass.h:294
TListOfFunctionTemplates * fFuncTemplate
Definition: TClass.h:180
ClassStreamerFunc_t fStreamerFunc
Definition: TClass.h:215
void AdoptReferenceProxy(TVirtualRefProxy *proxy)
Adopt the Reference proxy pointer to indicate that this class represents a reference.
Definition: TClass.cxx:6397
TVirtualStreamerInfo * DetermineCurrentStreamerInfo()
Determine and set pointer to current TVirtualStreamerInfo.
Definition: TClass.cxx:5446
EState GetState() const
Definition: TClass.h:458
ROOT::ESTLType GetCollectionType() const
Return the 'type' of the STL the TClass is representing.
Definition: TClass.cxx:2803
void AdoptMemberStreamer(const char *name, TMemberStreamer *strm)
Adopt the TMemberStreamer pointer to by p and use it to Stream non basic member name.
Definition: TClass.cxx:6415
void ResetInstanceCount()
Definition: TClass.h:510
ClassStreamerFunc_t GetStreamerFunc() const
Get a wrapper/accessor function around this class custom streamer (member function).
Definition: TClass.cxx:2856
void RemoveStreamerInfo(Int_t slot)
Remove and delete the StreamerInfo in the given slot.
Definition: TClass.cxx:7010
void SetCanSplit(Int_t splitmode)
Set the splitability of this class:
Definition: TClass.cxx:5420
void AddInstance(Bool_t heap=kFALSE)
Definition: TClass.h:353
TObject * Clone(const char *newname="") const
Create a Clone of this TClass object using a different name but using the same 'dictionary'.
Definition: TClass.cxx:2324
TVirtualStreamerInfo * GetStreamerInfoAbstractEmulated(Int_t version=0) const
For the case where the requestor class is emulated and this class is abstract, returns a pointer to t...
Definition: TClass.cxx:4555
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
Definition: TClass.cxx:4824
void SetMerge(ROOT::MergeFunc_t mergeFunc)
Install a new wrapper around 'Merge'.
Definition: TClass.cxx:6678
ConvSIMap_t fConversionStreamerInfo
Definition: TClass.h:174
ROOT::DirAutoAdd_t fDirAutoAdd
Definition: TClass.h:214
Bool_t HasDataMemberInfo() const
Definition: TClass.h:378
TVirtualRefProxy * fRefProxy
cached streamer info used in the last read.
Definition: TClass.h:245
TList * GetMenuList() const
Return the list of menu items associated with the class.
Definition: TClass.cxx:4194
ROOT::MergeFunc_t fMerge
saved info to call a IsA member function
Definition: TClass.h:207
TMethod * GetMethod(const char *method, const char *params, Bool_t objectIsConst=kFALSE)
Find the best method (if there is one) matching the parameters.
Definition: TClass.cxx:4264
virtual void Browse(TBrowser *b)
This method is called by a browser to get the class information.
Definition: TClass.cxx:1919
static TClass * Load(TBuffer &b)
Load class description from I/O buffer and return class object.
Definition: TClass.cxx:5477
EState fState
cached of the streaming method to use
Definition: TClass.h:242
ROOT::DesFunc_t GetDestructor() const
TMethod * GetMethodWithPrototype(const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Find the method with a given prototype.
Definition: TClass.cxx:4309
void CopyCollectionProxy(const TVirtualCollectionProxy &)
Copy the argument.
Definition: TClass.cxx:2387
Int_t fStreamerType
saved info to call Streamer
Definition: TClass.h:241
TList * fRealData
Definition: TClass.h:175
UInt_t fOnHeap
Definition: TClass.h:192
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
Definition: TClass.cxx:1940
std::atomic< TList * > fBase
Definition: TClass.h:176
Bool_t HasDictionary() const
Check whether a class has a dictionary or not.
Definition: TClass.cxx:3758
Long_t GetDataMemberOffset(const char *membername) const
return offset for member name.
Definition: TClass.cxx:3306
const TList * GetListOfAllPublicMethods(Bool_t load=kTRUE)
Returns a list of all public methods of this class and its base classes.
Definition: TClass.cxx:3697
TMethod * GetClassMethod(Long_t faddr)
Look for a method in this class that has the interface function address faddr.
Definition: TClass.cxx:4336
TList * GetListOfAllPublicDataMembers(Bool_t load=kTRUE)
Returns a list of all public data members of this class and its base classes.
Definition: TClass.cxx:3714
void BuildEmulatedRealData(const char *name, Long_t offset, TClass *cl)
Build the list of real data for an emulated class.
Definition: TClass.cxx:2021
TClass(const TClass &tc)=delete
static void AddClassToDeclIdMap(TDictionary::DeclId_t id, TClass *cl)
static: Add a TClass* to the map of classes.
Definition: TClass.cxx:461
virtual ~TClass()
TClass dtor. Deletes all list that might have been created.
Definition: TClass.cxx:1573
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
Definition: TClass.cxx:5181
Version_t fClassVersion
Definition: TClass.h:195
std::atomic< TVirtualStreamerInfo * > fCurrentInfo
Current 'state' of the class (Emulated,Interpreted,Loaded)
Definition: TClass.h:243
TList * GetListOfFunctionTemplates(Bool_t load=kTRUE)
Return list containing the TEnums of a class.
Definition: TClass.cxx:3650
void * DynamicCast(const TClass *base, void *obj, Bool_t up=kTRUE)
Cast obj of this class type up to baseclass cl if up is true.
Definition: TClass.cxx:4761
const char * fImplFileName
Definition: TClass.h:188
void RegisterStreamerInfo(TVirtualStreamerInfo *info)
Register the StreamerInfo in the given slot, change the State of the TClass as appropriate.
Definition: TClass.cxx:6986
TClass & operator=(const TClass &)=delete
std::atomic< UInt_t > fCheckSum
Definition: TClass.h:193
std::atomic< TListOfFunctions * > fMethod
Definition: TClass.h:181
static void RemoveClassDeclId(TDictionary::DeclId_t id)
Definition: TClass.cxx:486
void SetNewArray(ROOT::NewArrFunc_t newArrayFunc)
Install a new wrapper around 'new []'.
Definition: TClass.cxx:6702
Bool_t CallShowMembers(const void *obj, TMemberInspector &insp, Bool_t isTransient=kFALSE) const
Call ShowMembers() on the obj of this class type, passing insp and parent.
Definition: TClass.cxx:2114
const char * fDeclFileName
Definition: TClass.h:187
void SetCollectionProxy(const ROOT::Detail::TCollectionProxyInfo &)
Create the collection proxy object (and the streamer object) from using the information in the TColle...
Definition: TClass.cxx:5958
Int_t fCanSplit
Definition: TClass.h:219
static Bool_t HasDictionarySelection(const char *clname)
Check whether a class has a dictionary or ROOT can load one.
Definition: TClass.cxx:3769
void AdoptSchemaRules(ROOT::Detail::TSchemaRuleSet *rules)
Adopt a new set of Data Model Evolution rules.
Definition: TClass.cxx:1829
static void StreamerInstrumented(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class)
Case of instrumented class with a library.
Definition: TClass.cxx:6545
TVirtualStreamerInfo * SetStreamerInfo(Int_t version, const char *info="")
Info is a string describing the names and types of attributes written by the class Streamer function.
Definition: TClass.cxx:6085
static std::atomic< Int_t > fgClassCount
Definition: TClass.h:292
TVirtualStreamerInfo * GetCurrentStreamerInfo()
Definition: TClass.h:410
ROOT::DirAutoAdd_t GetDirectoryAutoAdd() const
void AddImplFile(const char *filename, int line)
Definition: TClass.cxx:1861
TCollection * GetListOfMethodOverloads(const char *name) const
Return the collection of functions named "name".
Definition: TClass.cxx:3679
std::atomic< TListOfEnums * > fEnums
Definition: TClass.h:179
static Bool_t HasNoInfoOrEmuOrFwdDeclaredDecl(const char *)
Definition: TClass.cxx:3237
TList * GetListOfEnums(Bool_t load=kTRUE)
Return a list containing the TEnums of a class.
Definition: TClass.cxx:3559
Bool_t IsStartingWithTObject() const
Returns true if this class inherits from TObject and if the start of the TObject parts is at the very...
Definition: TClass.cxx:5691
TList * GetListOfMethods(Bool_t load=kTRUE)
Return list containing the TMethods of a class.
Definition: TClass.cxx:3664
TClass()
Definition: TClass.cxx:1013
Short_t fDeclFileLine
Definition: TClass.h:189
Int_t GetNmethods()
Return the number of methods of this class Note that in case the list of methods is not yet created,...
Definition: TClass.cxx:4426
std::atomic< Bool_t > fIsOffsetStreamerSet
Indicates whether the ClassInfo is supposed to be available.
Definition: TClass.h:226
void IgnoreTObjectStreamer(Bool_t ignore=kTRUE)
When the class kIgnoreTObjectStreamer bit is set, the automatically generated Streamer will not call ...
Definition: TClass.cxx:4687
TClassStreamer * GetStreamer() const
Return the Streamer Class allowing streaming (if any).
Definition: TClass.cxx:2831
static IdMap_t * GetIdMap()
Definition: TClass.cxx:419
UInt_t GetInstanceCount() const
Definition: TClass.h:436
void SetDelete(ROOT::DelFunc_t deleteFunc)
Install a new wrapper around 'delete'.
Definition: TClass.cxx:6710
void SetLastReadInfo(TVirtualStreamerInfo *info)
Definition: TClass.h:416
static Int_t AutoBrowse(TObject *obj, TBrowser *browser)
Browse external object inherited from TObject.
Definition: TClass.cxx:1875
ROOT::NewFunc_t GetNew() const
void SetDeclFile(const char *name, int line)
Definition: TClass.h:518
TClass * GetBaseClass(const char *classname)
Return pointer to the base class "classname".
Definition: TClass.cxx:2572
Int_t GetNdata()
Return the number of data members of this class Note that in case the list of data members is not yet...
Definition: TClass.cxx:4407
void SetDestructor(ROOT::DesFunc_t destructorFunc)
Install a new wrapper around the destructor.
Definition: TClass.cxx:6726
Bool_t HasDefaultConstructor() const
virtual void PostLoadCheck()
Do the initialization that can only be done after the CINT dictionary has been fully populated and ca...
Definition: TClass.cxx:5719
void LoadClassInfo() const
Try to load the ClassInfo if available.
Definition: TClass.cxx:5586
void SetResetAfterMerge(ROOT::ResetAfterMergeFunc_t resetFunc)
Install a new wrapper around 'ResetAfterMerge'.
Definition: TClass.cxx:6686
Bool_t MatchLegacyCheckSum(UInt_t checksum) const
Return true if the checksum passed as argument is one of the checksum value produced by the older che...
Definition: TClass.cxx:6206
TViewPubFunctions * fAllPubMethod
Definition: TClass.h:184
ERuntimeProperties
Indicates whether GetClassVersion has been called.
Definition: TClass.h:229
Bool_t HasInterpreterInfo() const
Definition: TClass.h:381
static void AddClass(TClass *cl)
static: Add a class to the list and map of classes.
Definition: TClass.cxx:444
void GetMissingDictionariesForBaseClasses(TCollection &result, TCollection &visited, bool recurse)
Verify the base classes always.
Definition: TClass.cxx:3779
ROOT::Detail::TSchemaRuleSet * fSchemaRules
Pointer to reference proxy if this class represents a reference.
Definition: TClass.h:246
std::atomic< Long_t > fProperty
Indicates whether this class can be split or not.
Definition: TClass.h:220
TVirtualStreamerInfo * GetLastReadInfo() const
Definition: TClass.h:415
static void StreamerDefault(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class)
Default streaming in cases where either we have no way to know what to do or if Property() has not ye...
Definition: TClass.cxx:6582
void SetUnloaded()
Call this method to indicate that the shared library containing this class's code has been removed (u...
Definition: TClass.cxx:6023
ROOT::DelArrFunc_t GetDeleteArray() const
Bool_t HasInterpreterInfoInMemory() const
Definition: TClass.h:380
TList * fClassMenuList
Definition: TClass.h:185
ClassConvStreamerFunc_t fConvStreamerFunc
Definition: TClass.h:216
void SetRuntimeProperties()
Internal routine to set calculate the class properties that can only be known at run-time,...
Definition: TClass.cxx:5908
static TClass * LoadClass(const char *requestedname, Bool_t silent)
Helper function used by TClass::GetClass().
Definition: TClass.cxx:5511
TString fSharedLibs
Definition: TClass.h:201
const std::type_info * GetTypeInfo() const
Definition: TClass.h:466
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
Definition: TClass.cxx:3615
ENewType
Definition: TClass.h:101
@ kClassNew
Definition: TClass.h:101
@ kRealNew
Definition: TClass.h:101
@ kDummyNew
Definition: TClass.h:101
void Move(void *arenaFrom, void *arenaTo) const
Register the fact that an object was moved from the memory location 'arenaFrom' to the memory locatio...
Definition: TClass.cxx:4180
static DeclIdMap_t * GetDeclIdMap()
Definition: TClass.cxx:430
Short_t GetDeclFileLine() const
Definition: TClass.h:400
void SetStreamerFunc(ClassStreamerFunc_t strm)
Set a wrapper/accessor function around this class custom streamer.
Definition: TClass.cxx:6631
const char * GetImplFileName() const
Definition: TClass.h:426
TList * GetListOfRealData() const
Definition: TClass.h:423
Int_t Size() const
Return size of object of this class.
Definition: TClass.cxx:5466
void SetCurrentStreamerInfo(TVirtualStreamerInfo *info)
Set pointer to current TVirtualStreamerInfo.
Definition: TClass.cxx:5458
static DictFuncPtr_t GetDict(const char *cname)
Return a pointer to the dictionary loading function generated by rootcint.
Definition: TClass.cxx:3261
Int_t fSizeof
Definition: TClass.h:217
ROOT::NewArrFunc_t GetNewArray() const
static void StreamerTObjectEmulated(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class)
Case of TObjects when we do not have the library defining the class.
Definition: TClass.cxx:6532
ROOT::NewFunc_t fNew
Definition: TClass.h:209
ROOT::ResetAfterMergeFunc_t GetResetAfterMerge() const
TMethod * GetClassMethodWithPrototype(const char *name, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Find the method with a given prototype.
Definition: TClass.cxx:4380
Bool_t CanIgnoreTObjectStreamer()
Definition: TClass.h:365
void SetGlobalIsA(IsAGlobalFunc_t)
This function installs a global IsA function for this class.
Definition: TClass.cxx:6014
void GetMissingDictionariesForMembers(TCollection &result, TCollection &visited, bool recurse)
Verify the Data Members.
Definition: TClass.cxx:3796
TObjArray * fStreamerInfo
Definition: TClass.h:173
const ROOT::Detail::TSchemaRuleSet * GetSchemaRules() const
Return the set of the schema rules if any.
Definition: TClass.cxx:1841
TVirtualCollectionProxy * fCollectionProxy
Definition: TClass.h:194
static ENewType IsCallingNew()
Static method returning the defConstructor flag passed to TClass::New().
Definition: TClass.cxx:5664
void ls(Option_t *opt="") const
The ls function lists the contents of a class on stdout.
Definition: TClass.cxx:4111
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
Definition: TClass.cxx:3505
void Store(TBuffer &b) const
Store class description on I/O buffer.
Definition: TClass.cxx:5622
void InterpretedShowMembers(void *obj, TMemberInspector &insp, Bool_t isTransient)
Do a ShowMembers() traversal of all members and base classes' members using the reflection informatio...
Definition: TClass.cxx:2151
static THashTable * fgClassTypedefHash
Definition: TClass.h:323
void Init(const char *name, Version_t cversion, const std::type_info *info, TVirtualIsAProxy *isa, const char *dfil, const char *ifil, Int_t dl, Int_t il, ClassInfo_t *classInfo, Bool_t silent)
Initialize a TClass object.
Definition: TClass.cxx:1303
static void StreamerStreamerInfo(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class)
Case of where we should directly use the StreamerInfo.
Definition: TClass.cxx:6567
const TObjArray * GetStreamerInfos() const
Definition: TClass.h:462
void SetClassVersion(Version_t version)
Private function.
Definition: TClass.cxx:5437
char * EscapeChars(const char *text) const
Introduce an escape character (@) in front of a special chars.
Definition: TClass.cxx:2486
const std::type_info * fTypeInfo
Definition: TClass.h:198
std::atomic< TVirtualStreamerInfo * > fLastReadInfo
cached current streamer info.
Definition: TClass.h:244
std::atomic< std::map< std::string, TObjArray * > * > ConvSIMap_t
Persistent address of pointer to this TClass object and its successors.
Definition: TClass.h:171
static void StreamerTObject(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class)
Case of TObjects.
Definition: TClass.cxx:6509
Bool_t IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
Definition: TClass.cxx:5674
EStreamerType
Definition: TClass.h:300
@ kDefault
Definition: TClass.h:300
@ kEmulatedStreamer
Definition: TClass.h:300
@ kExternal
Definition: TClass.h:300
@ kForeign
Definition: TClass.h:300
@ kInstrumented
Definition: TClass.h:300
@ kTObject
Definition: TClass.h:300
static Bool_t AddRule(const char *rule)
Add a schema evolution customization rule.
Definition: TClass.cxx:1799
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
Definition: TClass.cxx:5700
const char * GetContextMenuTitle() const
Definition: TClass.h:409
static void RemoveClass(TClass *cl)
static: Remove a class from the list and map of classes
Definition: TClass.cxx:470
Bool_t HasLocalHashMember() const
void DeleteArray(void *ary, Bool_t dtorOnly=kFALSE)
Explicitly call operator delete[] for an array.
Definition: TClass.cxx:5298
ClassConvStreamerFunc_t GetConvStreamerFunc() const
Get a wrapper/accessor function around this class custom conversion streamer (member function).
Definition: TClass.cxx:2864
Bool_t IsForeign() const
Return kTRUE is the class is Foreign (the class does not have a Streamer method).
Definition: TClass.cxx:5709
ClassInfo_t * GetClassInfo() const
Definition: TClass.h:404
ROOT::DelFunc_t fDelete
Definition: TClass.h:211
TViewPubDataMembers * fAllPubData
Definition: TClass.h:183
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
Definition: TClass.cxx:2708
void Dump() const
Dump contents of object on stdout.
Definition: TClass.h:370
ClassInfo_t * fClassInfo
Definition: TClass.h:196
Bool_t HasConsistentHashMember()
Return 'true' if we can guarantee that if this class (or any class in this class inheritance hierarch...
Definition: TClass.h:471
void AdoptStreamer(TClassStreamer *strm)
Adopt a TClassStreamer object.
Definition: TClass.cxx:6603
TClass * GetBaseDataMember(const char *datamember)
Return pointer to (base) class that contains datamember.
Definition: TClass.cxx:2744
Long_t Property() const
Set TObject::fBits and fStreamerType to cache information about the class.
Definition: TClass.cxx:5800
ECheckSum
Definition: TClass.h:102
@ kLatestCheckSum
Definition: TClass.h:111
@ kNoRange
Definition: TClass.h:106
@ kCurrentCheckSum
Definition: TClass.h:103
@ kNoBaseCheckSum
Definition: TClass.h:110
@ kReflex
Definition: TClass.h:108
@ kReflexNoComment
Definition: TClass.h:105
@ kWithTypeDef
Definition: TClass.h:107
@ kNoRangeCheck
Definition: TClass.h:109
@ kNoEnum
Definition: TClass.h:104
Long_t fOffsetStreamer
Properties that can only be evaluated at run-time.
Definition: TClass.h:240
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
Definition: TClass.cxx:2814
void ResetCaches()
To clean out all caches.
Definition: TClass.cxx:4070
std::atomic< Bool_t > fVersionUsed
saved remember if fOffsetStreamer has been set.
Definition: TClass.h:227
Int_t GetClassSize() const
Definition: TClass.h:396
Long_t ClassProperty() const
Return the C++ property of this class, eg.
Definition: TClass.cxx:2314
void SetStreamerImpl()
Internal routine to set fStreamerImpl based on the value of fStreamerType.
Definition: TClass.cxx:5929
const char * GetSharedLibs()
Get the list of shared libraries containing the code for class cls.
Definition: TClass.cxx:3492
void CalculateStreamerOffset() const
Calculate the offset between an object of this class to its base class TObject.
Definition: TClass.cxx:2092
void GetMissingDictionariesForPairElements(TCollection &result, TCollection &visited, bool recurse)
Definition: TClass.cxx:3825
void ReplaceWith(TClass *newcl) const
Definition: TClass.cxx:3989
void GetMenuItems(TList *listitems)
Returns list of methods accessible by context menu.
Definition: TClass.cxx:3726
void SetNew(ROOT::NewFunc_t newFunc)
Install a new wrapper around 'new'.
Definition: TClass.cxx:6694
void Draw(Option_t *option="")
Draw detailed class inheritance structure.
Definition: TClass.cxx:2404
void Streamer(void *obj, TBuffer &b, const TClass *onfile_class=0) const
Definition: TClass.h:566
std::atomic< TMethodCall * > fIsAMethod
Definition: TClass.h:205
static Int_t ReadRules()
Read the class.rules files from the default location:.
Definition: TClass.cxx:1729
Bool_t CanSplitBaseAllow()
Pointer to the function implementing streaming for this class.
Definition: TClass.cxx:2156
std::atomic< StreamerImpl_t > fStreamerImpl
Definition: TClass.h:252
void SetContextMenuTitle(const char *title)
Change (i.e. set) the title of the TNamed.
Definition: TClass.cxx:5983
ShowMembersFunc_t GetShowMembersWrapper() const
Definition: TClass.h:457
void SetMemberStreamer(const char *name, MemberStreamerFunc_t strm)
Install a new member streamer (p will be copied).
Definition: TClass.cxx:6453
std::atomic< TClass ** > fPersistentRef
Definition: TClass.h:169
friend class TCling
Definition: TClass.h:77
IsAGlobalFunc_t fGlobalIsA
pointer to the class's IsA proxy.
Definition: TClass.h:204
TVirtualStreamerInfo * GetConversionStreamerInfo(const char *onfile_classname, Int_t version) const
Return a Conversion StreamerInfo from the class 'classname' for version number 'version' to this clas...
Definition: TClass.cxx:6793
void(* StreamerImpl_t)(const TClass *pThis, void *obj, TBuffer &b, const TClass *onfile_class)
Schema evolution rules.
Definition: TClass.h:248
Short_t GetImplFileLine() const
Definition: TClass.h:427
TMethod * GetMethodAllAny(const char *method)
Return pointer to method without looking at parameters.
Definition: TClass.cxx:4237
std::atomic< UChar_t > fRuntimeProperties
Definition: TClass.h:238
EState
Definition: TClass.h:115
@ kInterpreted
Definition: TClass.h:120
@ kHasTClassInit
Definition: TClass.h:121
@ kEmulated
Definition: TClass.h:119
@ kNoInfo
Definition: TClass.h:116
@ kLoaded
Definition: TClass.h:124
@ kForwardDeclared
Definition: TClass.h:118
@ kNamespaceForMeta
Definition: TClass.h:125
TVirtualStreamerInfo * FindConversionStreamerInfo(const char *onfile_classname, UInt_t checksum) const
Return a Conversion StreamerInfo from the class 'classname' for the layout represented by 'checksum' ...
Definition: TClass.cxx:6890
Int_t GetBaseClassOffsetRecurse(const TClass *toBase)
Return data member offset to the base class "cl".
Definition: TClass.cxx:2622
ROOT::DelFunc_t GetDelete() const
static TClass * LoadClassDefault(const char *requestedname, Bool_t silent)
Helper function used by TClass::GetClass().
Definition: TClass.cxx:5533
Bool_t IsVersioned() const
Definition: TClass.h:489
void SetClassSize(Int_t sizof)
Definition: TClass.h:273
TMethod * FindClassOrBaseMethodWithId(DeclId_t faddr)
Find a method with decl id in this class or its bases.
Definition: TClass.cxx:4293
static void StreamerExternal(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class)
There is special streamer for the class.
Definition: TClass.cxx:6497
friend bool operator&(UChar_t l, ERuntimeProperties r)
Definition: TClass.h:235
Long_t fClassProperty
Property.
Definition: TClass.h:221
TString fContextMenuTitle
Definition: TClass.h:197
static void StreamerTObjectInitialized(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class)
Case of TObjects when fIsOffsetStreamerSet is known to have been set.
Definition: TClass.cxx:6523
static void ConvStreamerInstrumented(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class)
Case of instrumented class with a library.
Definition: TClass.cxx:6554
TListOfDataMembers * fData
Definition: TClass.h:177
std::atomic< Bool_t > fCanLoadClassInfo
Whether info was loaded from a root pcm.
Definition: TClass.h:225
void SetConvStreamerFunc(ClassConvStreamerFunc_t strm)
Set a wrapper/accessor function around this class custom conversion streamer.
Definition: TClass.cxx:6654
TVirtualStreamerInfo * FindStreamerInfo(TObjArray *arr, UInt_t checksum) const
Find the TVirtualStreamerInfo in the StreamerInfos corresponding to checksum.
Definition: TClass.cxx:6773
void GetMissingDictionaries(THashTable &result, bool recurse=false)
Get the classes that have a missing dictionary starting from this one.
Definition: TClass.cxx:3939
void MakeCustomMenuList()
Makes a customizable version of the popup menu list, i.e.
Definition: TClass.cxx:4136
@ kLoading
Definition: TClass.h:298
@ kUnloading
Definition: TClass.h:298
TVirtualStreamerInfo * FindStreamerInfoAbstractEmulated(UInt_t checksum) const
For the case where the requestor class is emulated and this class is abstract, returns a pointer to t...
Definition: TClass.cxx:4618
TMethod * GetMethodAny(const char *method)
Return pointer to method without looking at parameters.
Definition: TClass.cxx:4227
TVirtualIsAProxy * GetIsAProxy() const
Return the proxy implementing the IsA functionality.
Definition: TClass.cxx:2872
Version_t GetClassVersion() const
Definition: TClass.h:391
ROOT::MergeFunc_t GetMerge() const
ROOT::ResetAfterMergeFunc_t fResetAfterMerge
Definition: TClass.h:208
UInt_t fInstanceCount
Definition: TClass.h:191
std::atomic< Bool_t > fHasRootPcmInfo
C++ Property of the class (is abstract, has virtual table, etc.)
Definition: TClass.h:224
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
Definition: TClass.cxx:4720
TClass * GetActualClass(const void *object) const
Return a pointer the the real class of the object.
Definition: TClass.cxx:2525
ROOT::DesFunc_t fDestructor
Definition: TClass.h:213
const char * GetDeclFileName() const
Definition: TClass.h:399
TRealData * GetRealData(const char *name) const
Return pointer to TRealData element with name "name".
Definition: TClass.cxx:3332
void SetDeleteArray(ROOT::DelArrFunc_t deleteArrayFunc)
Install a new wrapper around 'delete []'.
Definition: TClass.cxx:6718
TFunctionTemplate * GetFunctionTemplate(const char *name)
Definition: TClass.cxx:3476
void ResetClassInfo()
Make sure that the current ClassInfo is up to date.
Definition: TClass.cxx:4035
ROOT::NewArrFunc_t fNewArray
Definition: TClass.h:210
Int_t ReadBuffer(TBuffer &b, void *pointer, Int_t version, UInt_t start, UInt_t count)
Function called by the Streamer functions to deserialize information from buffer b into object at p.
Definition: TClass.cxx:6467
void SetImplFileName(const char *implFileName)
Definition: TClass.h:523
void GetMissingDictionariesWithRecursionCheck(TCollection &result, TCollection &visited, bool recurse)
From the second level of recursion onwards it is different state check.
Definition: TClass.cxx:3842
@ kHasLocalHashMember
Definition: TClass.h:89
@ kHasNameMapNode
Definition: TClass.h:98
@ kIgnoreTObjectStreamer
Definition: TClass.h:90
@ kUnloaded
Definition: TClass.h:91
@ kHasCustomStreamerMember
Definition: TClass.h:99
@ kWarned
Definition: TClass.h:97
@ kStartWithTObject
Definition: TClass.h:96
@ kClassSaved
Definition: TClass.h:88
@ kIsTObject
Definition: TClass.h:93
@ kIsEmulation
Definition: TClass.h:95
@ kIsForeign
Definition: TClass.h:94
@ kReservedLoading
Definition: TClass.h:86
TListOfFunctions * GetMethodList()
Return (create an empty one if needed) the list of functions.
Definition: TClass.cxx:4208
TVirtualRefProxy * GetReferenceProxy() const
Definition: TClass.h:453
void ResetMenuList()
Resets the menu list to it's standard value.
Definition: TClass.cxx:4096
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Definition: TClass.cxx:2885
Int_t WriteBuffer(TBuffer &b, void *pointer, const char *info="")
Function called by the Streamer functions to serialize object at p to buffer b.
Definition: TClass.cxx:6488
static TClass * LoadClassCustom(const char *requestedname, Bool_t silent)
Helper function used by TClass::GetClass().
Definition: TClass.cxx:5563
UInt_t GetHeapInstanceCount() const
Definition: TClass.h:437
Short_t fImplFileLine
Definition: TClass.h:190
Collection abstract base class.
Definition: TCollection.h:63
All ROOT classes may have RTTI (run time type identification) support added.
Definition: TDataMember.h:31
This class defines an abstract interface that must be implemented by all classes that contain diction...
Definition: TDictionary.h:159
const void * DeclId_t
Definition: TDictionary.h:206
Dictionary for function template This class describes one single function template.
THashTable implements a hash table to store TObject's.
Definition: THashTable.h:35
A collection of TDataMember objects designed for fast access given a DeclId_t and for keep track of T...
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
Definition: TListOfEnums.h:33
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
A doubly linked list.
Definition: TList.h:44
Abstract base class for accessing the data-members of a class.
Method or function calling interface.
Definition: TMethodCall.h:37
Each ROOT class (see TClass) has a linked list of methods.
Definition: TMethod.h:38
An array of TObjects.
Definition: TObjArray.h:37
Collectable string class.
Definition: TObjString.h:28
Mother of all ROOT objects.
Definition: TObject.h:37
virtual void Dump() const
Dump contents of object on stdout.
Definition: TObject.cxx:266
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:172
EStatusBits
Definition: TObject.h:57
Persistent version of a TClass.
Definition: TProtoClass.h:35
The TRealData class manages the effective list of all data members for a given class.
Definition: TRealData.h:30
Basic string class.
Definition: TString.h:131
View implementing the TList interface and giving access all the TDictionary describing public data me...
View implementing the TList interface and giving access all the TFunction describing public methods i...
Abstract Interface class describing Streamer information for one class.
TText * text
TLine * line
double T(double x)
Definition: ChebyshevPol.h:34
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
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:582
TClass * CreateClass(const char *cname, Version_t id, const std::type_info &info, TVirtualIsAProxy *isa, const char *dfil, const char *ifil, Int_t dl, Int_t il)
Global function called by a class' static Dictionary() method (see the ClassDef macro).
Definition: TClass.cxx:5631
void(* DelFunc_t)(void *)
Definition: Rtypes.h:111
ESTLType
Definition: ESTLType.h:28
void *(* NewArrFunc_t)(Long_t size, void *arena)
Definition: Rtypes.h:110
EFunctionMatchMode
Definition: TDictionary.h:152
@ kConversionMatch
Definition: TDictionary.h:154
void ResetClassVersion(TClass *, const char *, Short_t)
Global function to update the version number.
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
auto * l
Definition: textangle.C:4