31 #include <unordered_set> 60 class TGenericClassInfo;
61 class TMapTypeToTClass;
62 class TMapDeclIdToTClass;
65 class TCollectionProxyInfo;
68 class TCheckHashRecursiveRemoveConsistency;
86 kReservedLoading =
BIT(7),
88 kClassSaved =
BIT(12),
89 kHasLocalHashMember =
BIT(14),
90 kIgnoreTObjectStreamer =
BIT(15),
95 kIsEmulation =
BIT(19),
96 kStartWithTObject =
BIT(20),
98 kHasNameMapNode =
BIT(22),
99 kHasCustomStreamerMember =
BIT(23)
101 enum ENewType { kRealNew = 0, kClassNew, kDummyNew };
103 kCurrentCheckSum = 0,
105 kReflexNoComment = 2,
124 kLoaded = kHasTClassInit,
139 void AddQualifiedName(
const char *
name);
140 Bool_t HasDeclName(
const char *name)
const;
171 typedef std::atomic<std::map<std::string, TObjArray*>*>
ConvSIMap_t;
233 kConsistentHash =
BIT(1)
249 #ifdef R__NO_ATOMIC_FUNCTION_POINTER 250 mutable StreamerImpl_t fStreamerImpl;
255 Bool_t CanSplitBaseAllow();
259 Int_t GetBaseClassOffsetRecurse(
const TClass *toBase);
262 const char *dfil,
const char *ifil,
264 ClassInfo_t *classInfo,
266 void ForceReload (
TClass* oldcl);
267 void LoadClassInfo()
const;
269 static TClass *LoadClassDefault(
const char *requestedname,
Bool_t silent);
270 static TClass *LoadClassCustom(
const char *requestedname,
Bool_t silent);
276 void SetStreamerImpl();
278 void SetRuntimeProperties();
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);
295 static Bool_t HasNoInfoOrEmuOrFwdDeclaredDecl(
const char*);
298 enum { kLoading = kReservedLoading, kUnloading = kReservedLoading };
342 const char *dfil,
const char *ifil = 0,
345 const char *dfil,
const char *ifil = 0,
349 const char *dfil,
const char *ifil,
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();
360 void BuildRealData(
void *pointer=0,
Bool_t isTransient =
kFALSE);
362 void CalculateStreamerOffset()
const;
366 Long_t ClassProperty()
const;
367 TObject *Clone(
const char *newname=
"")
const;
371 void Dump(
const void *obj,
Bool_t noAddr =
kFALSE)
const;
372 char *EscapeChars(
const char *
text)
const;
379 Bool_t HasDefaultConstructor()
const;
387 TMethod *GetClassMethod(
const char *name,
const char *params,
Bool_t objectIsConst =
kFALSE);
388 TMethod *GetClassMethodWithPrototype(
const char *name,
const char *
proto,
393 TDataMember *GetDataMember(
const char *datamember)
const;
394 Long_t GetDataMemberOffset(
const char *membername)
const;
401 if (fCanLoadClassInfo && !TestBit(kLoading))
407 if (fCurrentInfo.load())
return fCurrentInfo;
408 else return DetermineCurrentStreamerInfo();
415 TList *GetListOfBases();
417 TCollection *GetListOfMethodOverloads(
const char* name)
const;
424 TClass *GetBaseClass(
const char *classname);
426 Int_t GetBaseClassOffset(
const TClass *toBase,
void *address = 0,
bool isDerivedObject =
true);
427 TClass *GetBaseDataMember(
const char *datamember);
433 void GetMenuItems(
TList *listitems);
434 TList *GetMenuList()
const;
436 TMethod *GetMethodWithPrototype(
const char *method,
const char *proto,
Bool_t objectIsConst =
kFALSE,
438 TMethod *GetMethodAny(
const char *method);
439 TMethod *GetMethodAllAny(
const char *method);
447 TRealData *GetRealData(
const char *name)
const;
451 const char *GetSharedLibs();
468 if (!fRuntimeProperties)
469 SetRuntimeProperties();
470 return fRuntimeProperties.load() & ERuntimeProperties::kConsistentHash;
472 Bool_t HasDictionary()
const;
473 static Bool_t HasDictionarySelection(
const char* clname);
474 Bool_t HasLocalHashMember()
const;
475 void GetMissingDictionaries(
THashTable& result,
bool recurse =
false);
477 Bool_t InheritsFrom(
const char *cl)
const;
483 Bool_t IsStartingWithTObject()
const;
486 static TClass *LoadClass(
const char *requestedname,
Bool_t silent);
488 void MakeCustomMenuList();
490 void Move(
void *arenaFrom,
void *arenaTo)
const;
492 void *New(
void *arena,
ENewType defConstructor = kClassNew)
const;
493 void *NewArray(
Long_t nElements,
ENewType defConstructor = kClassNew)
const;
494 void *NewArray(
Long_t nElements,
void *arena,
ENewType defConstructor = kClassNew)
const;
495 virtual void PostLoadCheck();
500 void RemoveStreamerInfo(
Int_t slot);
501 void ReplaceWith(
TClass *newcl)
const;
503 void ResetClassInfo(
Long_t tagnum);
504 void ResetClassInfo();
506 void ResetMenuList();
508 void SetCanSplit(
Int_t splitmode);
510 void SetContextMenuTitle(
const char *title);
525 Int_t WriteBuffer(
TBuffer &b,
void *pointer,
const char *info=
"");
559 Bool_t IsFolder(
void *obj)
const;
564 #ifdef R__NO_ATOMIC_FUNCTION_POINTER 565 fStreamerImpl(
this,obj,b,onfile_class);
567 auto t = fStreamerImpl.load();
568 t(
this,obj,b,onfile_class);
580 #ifndef R__NO_CLASS_TEMPLATE_SPECIALIZATION 589 const char *dfil,
const char *ifil,
593 #endif // ROOT_TClass void AddClass(const char *cname, Version_t id, const std::type_info &info, DictFuncPtr_t dict, Int_t pragmabits)
Global function called by the ctor of a class's init class (see the ClassImp macro).
Short_t GetImplFileLine() const
Bool_t operator &(const TBits::TReference &lhs, const TBits::TReference &rhs)
ShowMembersFunc_t fShowMembers
Bool_t HasInterpreterInfoInMemory() const
A collection of TDataMember objects designed for fast access given a DeclId_t and for keep track of T...
ROOT::NewArrFunc_t fNewArray
void(* ClassStreamerFunc_t)(TBuffer &, void *)
std::atomic< TMethodCall * > fIsAMethod
const char * GetDeclFileName() const
void(* ShowMembersFunc_t)(const void *obj, TMemberInspector &R__insp, Bool_t isTransient)
Namespace for new ROOT classes and functions.
void(* DelArrFunc_t)(void *)
const char * GetImplFileName() const
Collectable string class.
void SetDeclFile(const char *name, int line)
ConvSIMap_t fConversionStreamerInfo
Long64_t(* MergeFunc_t)(void *, TCollection *, TFileMergeInfo *)
Dictionary for function template This class describes one single function template.
All ROOT classes may have RTTI (run time type identification) support added.
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
Short_t GetDeclFileLine() const
T ReadBuffer(TBufferFile *buf)
One of the template functions used to read objects from messages.
std::atomic< TListOfEnums * > fEnums
TViewPubFunctions * fAllPubMethod
Persistent version of a TClass.
std::atomic< Bool_t > fHasRootPcmInfo
C++ Property of the class (is abstract, has virtual table, etc.)
static THashTable * fgClassTypedefHash
const std::type_info * GetTypeInfo() const
std::atomic< std::map< std::string, TObjArray * > * > ConvSIMap_t
Persistent address of pointer to this TClass object and its successors.
ROOT::DirAutoAdd_t fDirAutoAdd
Buffer base class used for serializing objects.
Bool_t HasInterpreterInfo() const
TString fContextMenuTitle
TVirtualStreamerInfo * GetCurrentStreamerInfo()
TVirtualRefProxy * fRefProxy
cached streamer info used in the last read.
const char * GetContextMenuTitle() const
Int_t fStreamerType
saved info to call Streamer
Abstract base class for accessing the data-members of a class.
void SetImplFileName(const char *implFileName)
UInt_t GetHeapInstanceCount() const
std::atomic< Bool_t > fIsOffsetStreamerSet
Indicates whether the ClassInfo is supposed to be available.
std::atomic< TVirtualStreamerInfo * > fLastReadInfo
cached current streamer info.
void SetClassSize(Int_t sizof)
void ResetInstanceCount()
void SetLastReadInfo(TVirtualStreamerInfo *info)
TDeclNameRegistry & fNoInfoOrEmuOrFwdDeclNameRegistry
THashTable implements a hash table to store TObject's.
#define ClassDef(name, id)
void Dump() const
Dump contents of object on stdout.
std::atomic< TList * > fBase
ClassStreamerFunc_t fStreamerFunc
void Init(TClassEdit::TInterpreterLookupHelper *helper)
void(* MemberStreamerFunc_t)(TBuffer &, void *, Int_t)
ROOT::ResetAfterMergeFunc_t fResetAfterMerge
ClassInfo_t * GetClassInfo() const
void *(* NewFunc_t)(void *)
Method or function calling interface.
std::atomic< Bool_t > fVersionUsed
saved remember if fOffsetStreamer has been set.
TListOfFunctionTemplates * fFuncTemplate
TClass *(* DictFuncPtr_t)()
const TObjArray * GetStreamerInfos() const
TViewPubDataMembers * fAllPubData
ROOT::Detail::TSchemaRuleSet * fSchemaRules
Pointer to reference proxy if this class represents a reference.
void(* ClassConvStreamerFunc_t)(TBuffer &, void *, const TClass *)
std::atomic< StreamerImpl_t > fStreamerImpl
TCppMethod_t GetMethod(TCppScope_t scope, TCppIndex_t imeth)
View implementing the TList interface and giving access all the TDictionary describing public data me...
const char * fImplFileName
TCppType_t GetActualClass(TCppType_t klass, TCppObject_t obj)
void(* ResetAfterMergeFunc_t)(void *, TFileMergeInfo *)
ShowMembersFunc_t GetShowMembersWrapper() const
void AddInstance(Bool_t heap=kFALSE)
Using a TBrowser one can browse all ROOT objects.
std::atomic< TVirtualStreamerInfo * > fCurrentInfo
Current 'state' of the class (Emulated,Interpreted,Loaded)
void ResetClassVersion(TClass *, const char *, Short_t)
Global function to update the version number.
void *(* NewArrFunc_t)(Long_t size, void *arena)
UInt_t GetInstanceCount() const
void RemoveClass(const char *cname)
Global function called by the dtor of a class's init class (see the ClassImp macro).
TVirtualStreamerInfo * GetLastReadInfo() const
This class defines an abstract interface that must be implemented by all classes that contain diction...
Collection abstract base class.
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).
The TRealData class manages the effective list of all data members for a given class.
Bool_t CanIgnoreTObjectStreamer()
TClass *const * GetPersistentRef() const
The ROOT global object gROOT contains a list of all defined classes.
TVirtualCollectionProxy * fCollectionProxy
ROOT::TMapTypeToTClass IdMap_t
std::atomic< UChar_t > fRuntimeProperties
TVirtualRefProxy * GetReferenceProxy() const
void Streamer(void *obj, TBuffer &b, const TClass *onfile_class=0) const
Each class (see TClass) has a linked list of its base class(es).
Bool_t HasConsistentHashMember()
Return 'true' if we can guarantee that if this class (or any class in this class inheritance hierarch...
View implementing the TList interface and giving access all the TFunction describing public methods i...
Short_t SetClassVersion(RootClass *)
ROOT::DesFunc_t fDestructor
std::atomic_flag fSpinLock
std::unordered_set< std::string > fClassNamesSet
std::atomic< TListOfFunctions * > fMethod
ROOT::DelArrFunc_t fDeleteArray
Version_t GetClassVersion() const
UInt_t GetListOfMethods(TList &methods, TDirectory *dir=0)
TObjArray * fStreamerInfo
std::atomic< TClass ** > fPersistentRef
Long_t fOffsetStreamer
Properties that can only be evaluated at run-time.
EState fState
cached of the streaming method to use
TList * GetListOfRealData() const
Bool_t HasDataMemberInfo() const
virtual void Dump() const
Dump contents of object on stdout.
const std::type_info * fTypeInfo
static TDeclNameRegistry fNoInfoOrEmuOrFwdDeclNameRegistry
TClass *(* IsAGlobalFunc_t)(const TClass *, const void *obj)
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.
std::atomic< Long_t > fProperty
Indicates whether this class can be split or not.
IsAGlobalFunc_t fGlobalIsA
pointer to the class's IsA proxy.
ROOT::TMapDeclIdToTClass DeclIdMap_t
Binding & operator=(OUT(*fun)(void))
Long_t fClassProperty
Property.
Int_t GetClassSize() const
Mother of all ROOT objects.
void(* DelFunc_t)(void *)
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
static std::atomic< Int_t > fgClassCount
typedef void((*Func_t)())
std::atomic< UInt_t > fCheckSum
TListOfDataMembers * fData
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
void(* DirAutoAdd_t)(void *, TDirectory *)
Bool_t IsVersioned() const
Each ROOT class (see TClass) has a linked list of methods.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
ClassConvStreamerFunc_t fConvStreamerFunc
const char * fDeclFileName
TClassStreamer * fStreamer
std::atomic< Bool_t > fCanLoadClassInfo
Whether info was loaded from a root pcm.
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
Abstract Interface class describing Streamer information for one class.
ERuntimeProperties
Indicates whether GetClassVersion has been called.
ROOT::MergeFunc_t fMerge
saved info to call a IsA member function
void(* DesFunc_t)(void *)