24 #ifndef ROOT_TDictionary 30 #ifndef ROOT_TObjArray 33 #ifndef ROOT_TObjString 40 #include <unordered_set> 44 #ifndef ROOT_ThreadLocalStorage 70 class TGenericClassInfo;
71 class TMapTypeToTClass;
72 class TMapDeclIdToTClass;
75 class TCollectionProxyInfo;
90 enum { kClassSaved =
BIT(12), 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,
145 void AddQualifiedName(
const char *
name);
146 Bool_t HasDeclName(
const char *name)
const;
177 typedef std::atomic<std::map<std::string, TObjArray*>*>
ConvSIMap_t;
244 #ifdef R__NO_ATOMIC_FUNCTION_POINTER 245 mutable StreamerImpl_t fStreamerImpl;
250 Bool_t CanSplitBaseAllow();
254 Int_t GetBaseClassOffsetRecurse(
const TClass *toBase);
257 const char *dfil,
const char *ifil,
259 ClassInfo_t *classInfo,
261 void ForceReload (
TClass* oldcl);
262 void LoadClassInfo()
const;
264 static TClass *LoadClassDefault(
const char *requestedname,
Bool_t silent);
265 static TClass *LoadClassCustom(
const char *requestedname,
Bool_t silent);
271 void SetStreamerImpl();
274 static void StreamerExternal(
const TClass* pThis,
void *
object,
TBuffer &b,
const TClass *onfile_class);
275 static void StreamerTObject(
const TClass* pThis,
void *
object,
TBuffer &b,
const TClass *onfile_class);
276 static void StreamerTObjectInitialized(
const TClass* pThis,
void *
object,
TBuffer &b,
const TClass *onfile_class);
277 static void StreamerTObjectEmulated(
const TClass* pThis,
void *
object,
TBuffer &b,
const TClass *onfile_class);
278 static void StreamerInstrumented(
const TClass* pThis,
void *
object,
TBuffer &b,
const TClass *onfile_class);
279 static void ConvStreamerInstrumented(
const TClass* pThis,
void *
object,
TBuffer &b,
const TClass *onfile_class);
280 static void StreamerStreamerInfo(
const TClass* pThis,
void *
object,
TBuffer &b,
const TClass *onfile_class);
281 static void StreamerDefault(
const TClass* pThis,
void *
object,
TBuffer &b,
const TClass *onfile_class);
288 static Bool_t HasNoInfoOrEmuOrFwdDeclaredDecl(
const char*);
291 enum { kLoading =
BIT(14), kUnloading =
BIT(14) };
293 enum EStreamerType {kDefault=0, kEmulatedStreamer=1, kTObject=2, kInstrumented=4, kForeign=8, kExternal=16};
335 const char *dfil,
const char *ifil = 0,
338 const char *dfil,
const char *ifil = 0,
342 const char *dfil,
const char *ifil,
347 void AddImplFile(
const char *filename,
int line);
348 static Bool_t AddRule(
const char *rule);
349 static Int_t ReadRules(
const char *filename);
350 static Int_t ReadRules();
353 void BuildRealData(
void *pointer=0,
Bool_t isTransient =
kFALSE);
355 void CalculateStreamerOffset()
const;
359 Long_t ClassProperty()
const;
360 TObject *Clone(
const char *newname=
"")
const;
364 void Dump(
const void *obj,
Bool_t noAddr =
kFALSE)
const;
365 char *EscapeChars(
const char *
text)
const;
372 Bool_t HasDefaultConstructor()
const;
380 TMethod *GetClassMethod(
const char *name,
const char *params,
Bool_t objectIsConst =
kFALSE);
384 TDataMember *GetDataMember(
const char *datamember)
const;
385 Long_t GetDataMemberOffset(
const char *membername)
const;
391 ClassInfo_t *
GetClassInfo()
const {
if (fCanLoadClassInfo && !TestBit(kLoading)) LoadClassInfo();
return fClassInfo; }
394 if (fCurrentInfo.load())
return fCurrentInfo;
395 else return DetermineCurrentStreamerInfo();
402 TList *GetListOfBases();
404 TCollection *GetListOfMethodOverloads(
const char* name)
const;
411 TClass *GetBaseClass(
const char *classname);
413 Int_t GetBaseClassOffset(
const TClass *toBase,
void *address = 0,
bool isDerivedObject =
true);
414 TClass *GetBaseDataMember(
const char *datamember);
420 void GetMenuItems(
TList *listitems);
421 TList *GetMenuList()
const;
424 TMethod *GetMethodAny(
const char *method);
425 TMethod *GetMethodAllAny(
const char *method);
433 TClass **GetPersistentRef()
const {
return fPersistentRef; }
437 TRealData *GetRealData(
const char *name)
const;
441 const char *GetSharedLibs();
452 Bool_t HasDictionary()
const;
453 static Bool_t HasDictionarySelection(
const char* clname);
456 Bool_t InheritsFrom(
const char *cl)
const;
462 Bool_t IsStartingWithTObject()
const;
465 static TClass *LoadClass(
const char *requestedname,
Bool_t silent);
467 void MakeCustomMenuList();
469 void Move(
void *arenaFrom,
void *arenaTo)
const;
471 void *New(
void *arena,
ENewType defConstructor = kClassNew)
const;
472 void *NewArray(
Long_t nElements,
ENewType defConstructor = kClassNew)
const;
473 void *NewArray(
Long_t nElements,
void *arena,
ENewType defConstructor = kClassNew)
const;
474 virtual void PostLoadCheck();
479 void RemoveStreamerInfo(
Int_t slot);
480 void ReplaceWith(
TClass *newcl)
const;
482 void ResetClassInfo(
Long_t tagnum);
483 void ResetClassInfo();
485 void ResetMenuList();
487 void SetCanSplit(
Int_t splitmode);
489 void SetContextMenuTitle(
const char *title);
504 Int_t WriteBuffer(
TBuffer &b,
void *pointer,
const char *info=
"");
538 Bool_t IsFolder(
void *obj)
const;
543 #ifdef R__NO_ATOMIC_FUNCTION_POINTER 544 fStreamerImpl(
this,obj,b,onfile_class);
546 auto t = fStreamerImpl.load();
547 t(
this,obj,b,onfile_class);
558 #ifndef R__NO_CLASS_TEMPLATE_SPECIALIZATION 568 const char *dfil,
const char *ifil,
572 #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)
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
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.
This class defines an interface to the cling C++ interpreter.
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
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 *)