32 #include <unordered_set> 60 class TGenericClassInfo;
61 class TMapTypeToTClass;
62 class TMapDeclIdToTClass;
65 class TCollectionProxyInfo;
80 enum { kClassSaved =
BIT(12), kIgnoreTObjectStreamer =
BIT(15),
85 kIsEmulation =
BIT(19),
86 kStartWithTObject =
BIT(20),
88 kHasNameMapNode =
BIT(22),
89 kHasCustomStreamerMember =
BIT(23)
91 enum ENewType { kRealNew = 0, kClassNew, kDummyNew };
114 kLoaded = kHasTClassInit,
135 void AddQualifiedName(
const char *
name);
136 Bool_t HasDeclName(
const char *name)
const;
167 typedef std::atomic<std::map<std::string, TObjArray*>*>
ConvSIMap_t;
234 #ifdef R__NO_ATOMIC_FUNCTION_POINTER 235 mutable StreamerImpl_t fStreamerImpl;
240 Bool_t CanSplitBaseAllow();
244 Int_t GetBaseClassOffsetRecurse(
const TClass *toBase);
245 void Init(
const char *
name,
Version_t cversion,
const std::type_info *info,
247 const char *dfil,
const char *ifil,
249 ClassInfo_t *classInfo,
251 void ForceReload (
TClass* oldcl);
252 void LoadClassInfo()
const;
254 static TClass *LoadClassDefault(
const char *requestedname,
Bool_t silent);
255 static TClass *LoadClassCustom(
const char *requestedname,
Bool_t silent);
261 void SetStreamerImpl();
264 static void StreamerExternal(
const TClass* pThis,
void *
object,
TBuffer &b,
const TClass *onfile_class);
265 static void StreamerTObject(
const TClass* pThis,
void *
object,
TBuffer &b,
const TClass *onfile_class);
266 static void StreamerTObjectInitialized(
const TClass* pThis,
void *
object,
TBuffer &b,
const TClass *onfile_class);
267 static void StreamerTObjectEmulated(
const TClass* pThis,
void *
object,
TBuffer &b,
const TClass *onfile_class);
268 static void StreamerInstrumented(
const TClass* pThis,
void *
object,
TBuffer &b,
const TClass *onfile_class);
269 static void ConvStreamerInstrumented(
const TClass* pThis,
void *
object,
TBuffer &b,
const TClass *onfile_class);
270 static void StreamerStreamerInfo(
const TClass* pThis,
void *
object,
TBuffer &b,
const TClass *onfile_class);
271 static void StreamerDefault(
const TClass* pThis,
void *
object,
TBuffer &b,
const TClass *onfile_class);
278 static Bool_t HasNoInfoOrEmuOrFwdDeclaredDecl(
const char*);
281 enum { kLoading =
BIT(14), kUnloading =
BIT(14) };
325 const char *dfil,
const char *ifil = 0,
328 const char *dfil,
const char *ifil = 0,
332 const char *dfil,
const char *ifil,
337 void AddImplFile(
const char *filename,
int line);
338 static Bool_t AddRule(
const char *rule);
339 static Int_t ReadRules(
const char *filename);
340 static Int_t ReadRules();
343 void BuildRealData(
void *pointer=0,
Bool_t isTransient =
kFALSE);
345 void CalculateStreamerOffset()
const;
349 Long_t ClassProperty()
const;
350 TObject *Clone(
const char *newname=
"")
const;
354 void Dump(
const void *obj,
Bool_t noAddr =
kFALSE)
const;
355 char *EscapeChars(
const char *
text)
const;
362 Bool_t HasDefaultConstructor()
const;
370 TMethod *GetClassMethod(
const char *name,
const char *params,
Bool_t objectIsConst =
kFALSE);
374 TDataMember *GetDataMember(
const char *datamember)
const;
375 Long_t GetDataMemberOffset(
const char *membername)
const;
381 ClassInfo_t *
GetClassInfo()
const {
if (fCanLoadClassInfo && !TestBit(kLoading)) LoadClassInfo();
return fClassInfo; }
384 if (fCurrentInfo.load())
return fCurrentInfo;
385 else return DetermineCurrentStreamerInfo();
392 TList *GetListOfBases();
394 TCollection *GetListOfMethodOverloads(
const char* name)
const;
401 TClass *GetBaseClass(
const char *classname);
403 Int_t GetBaseClassOffset(
const TClass *toBase,
void *address = 0,
bool isDerivedObject =
true);
404 TClass *GetBaseDataMember(
const char *datamember);
405 ROOT::ESTLType GetCollectionType()
const;
410 void GetMenuItems(
TList *listitems);
411 TList *GetMenuList()
const;
414 TMethod *GetMethodAny(
const char *method);
415 TMethod *GetMethodAllAny(
const char *method);
423 TClass **GetPersistentRef()
const {
return fPersistentRef; }
427 TRealData *GetRealData(
const char *name)
const;
431 const char *GetSharedLibs();
442 Bool_t HasDictionary()
const;
443 static Bool_t HasDictionarySelection(
const char* clname);
446 Bool_t InheritsFrom(
const char *cl)
const;
452 Bool_t IsStartingWithTObject()
const;
455 static TClass *LoadClass(
const char *requestedname,
Bool_t silent);
457 void MakeCustomMenuList();
459 void Move(
void *arenaFrom,
void *arenaTo)
const;
461 void *New(
void *arena,
ENewType defConstructor = kClassNew)
const;
462 void *NewArray(
Long_t nElements,
ENewType defConstructor = kClassNew)
const;
463 void *NewArray(
Long_t nElements,
void *arena,
ENewType defConstructor = kClassNew)
const;
464 virtual void PostLoadCheck();
469 void RemoveStreamerInfo(
Int_t slot);
470 void ReplaceWith(
TClass *newcl)
const;
472 void ResetClassInfo(
Long_t tagnum);
473 void ResetClassInfo();
475 void ResetMenuList();
477 void SetCanSplit(
Int_t splitmode);
479 void SetContextMenuTitle(
const char *title);
494 Int_t WriteBuffer(
TBuffer &b,
void *pointer,
const char *info=
"");
528 Bool_t IsFolder(
void *obj)
const;
533 #ifdef R__NO_ATOMIC_FUNCTION_POINTER 534 fStreamerImpl(
this,obj,b,onfile_class);
536 auto t = fStreamerImpl.load();
537 t(
this,obj,b,onfile_class);
548 #ifndef R__NO_CLASS_TEMPLATE_SPECIALIZATION 558 const char *dfil,
const char *ifil,
562 #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
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(* 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_flag & fAFlag
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
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).
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
Indicates whether GetClassVersion has been called.
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.
ROOT::MergeFunc_t fMerge
saved info to call a IsA member function
void(* DesFunc_t)(void *)