39#define __attribute__(unused)
83#define BIT(n) (1ULL << (n))
84#define SETBIT(n,i) ((n) |= BIT(i))
85#define CLRBIT(n,i) ((n) &= ~BIT(i))
86#define TESTBIT(n,i) ((Bool_t)(((n) & BIT(i)) != 0))
105 class TGenericClassInfo;
106 typedef void *(*NewFunc_t)(
void *);
107 typedef void *(*NewArrFunc_t)(
Long_t size,
void *arena);
119 const char *dfil,
const char *ifil,
121 extern void AddClass(
const char *cname,
Version_t id,
const std::type_info &info,
138 return CreateInitInstance(t);
152 const std::type_info &info,
157 const char *dfil,
const char *ifil,
164 const std::type_info &info,
175 const char *dfil,
const char *ifil,
195namespace ROOT {
namespace Internal {
202 static void SetName(
const std::string&
name, std::string& nameMember);
212 static void *
New(
void *p) {
return p ?
new(p)
T :
new T; };
214 return p ?
new(p)
T[nElements] :
new T[nElements]; }
215 static void Delete(
void *p) {
delete ((
T*)p); }
219 static ::TVirtualIsAProxy* isa_proxy = new ::TInstrumentedIsAProxy<T>(0);
220 static ::ROOT::TGenericClassInfo
221 R__instance(T::Class_Name(), T::Class_Version(),
222 T::DeclFileName(), T::DeclFileLine(),
224 &T::Dictionary, isa_proxy, 0,
sizeof(
T) );
235 static std::string
gName;
238 return gName.c_str();
249 template <
typename T>
254 template <
typename T>
266#define _ClassDefBase_(name, id, virtual_keyword, overrd) \
268 static_assert(std::is_integral<decltype(id)>::value, "ClassDef(Inline) macro: the specified class version number is not an integer."); \
269 virtual_keyword Bool_t CheckTObjectHashConsistency() const overrd \
271 static std::atomic<UChar_t> recurseBlocker(0); \
272 if (R__likely(recurseBlocker >= 2)) { \
273 return ::ROOT::Internal::THashConsistencyHolder<decltype(*this)>::fgHashConsistency; \
274 } else if (recurseBlocker == 1) { \
276 } else if (recurseBlocker++ == 0) { \
277 ::ROOT::Internal::THashConsistencyHolder<decltype(*this)>::fgHashConsistency = \
278 ::ROOT::Internal::HasConsistentHashMember(_QUOTE_(name)) || \
279 ::ROOT::Internal::HasConsistentHashMember(*IsA()); \
281 return ::ROOT::Internal::THashConsistencyHolder<decltype(*this)>::fgHashConsistency; \
287 static Version_t Class_Version() { return id; } \
288 virtual_keyword TClass *IsA() const overrd { return name::Class(); } \
289 virtual_keyword void ShowMembers(TMemberInspector &insp) const overrd \
291 ::ROOT::Class_ShowMembers(name::Class(), this, insp); \
293 void StreamerNVirtual(TBuffer &ClassDef_StreamerNVirtual_b) { name::Streamer(ClassDef_StreamerNVirtual_b); } \
294 static const char *DeclFileName() { return __FILE__; }
296#define _ClassDefOutline_(name,id, virtual_keyword, overrd) \
297 _ClassDefBase_(name,id, virtual_keyword, overrd) \
299 static atomic_TClass_ptr fgIsA; \
301 static int ImplFileLine(); \
302 static const char *ImplFileName(); \
303 static const char *Class_Name(); \
304 static TClass *Dictionary(); \
305 static TClass *Class(); \
306 virtual_keyword void Streamer(TBuffer&) overrd;
308#define _ClassDefInline_(name, id, virtual_keyword, overrd) \
309 _ClassDefBase_(name, id, virtual_keyword, overrd) public : static int ImplFileLine() { return -1; } \
310 static const char *ImplFileName() { return 0; } \
311 static const char *Class_Name() \
313 return ::ROOT::Internal::ClassDefGenerateInitInstanceLocalInjector<name>::Name(); \
315 static TClass *Dictionary() \
317 return ::ROOT::Internal::ClassDefGenerateInitInstanceLocalInjector<name>::Dictionary(); \
319 static TClass *Class() { return ::ROOT::Internal::ClassDefGenerateInitInstanceLocalInjector<name>::Class(); } \
320 virtual_keyword void Streamer(TBuffer &R__b) overrd { ::ROOT::Internal::DefaultStreamer(R__b, name::Class(), this); }
322#define ClassDef(name,id) \
323 _ClassDefOutline_(name,id,virtual,) \
324 static int DeclFileLine() { return __LINE__; }
326#define ClassDefOverride(name,id) \
327 _ClassDefOutline_(name,id,,override) \
328 static int DeclFileLine() { return __LINE__; }
330#define ClassDefNV(name,id) \
331 _ClassDefOutline_(name,id,,) \
332 static int DeclFileLine() { return __LINE__; }
334#define ClassDefInline(name,id) \
335 _ClassDefInline_(name,id,virtual,) \
336 static int DeclFileLine() { return __LINE__; }
338#define ClassDefInlineOverride(name,id) \
339 _ClassDefInline_(name,id,,override) \
340 static int DeclFileLine() { return __LINE__; }
342#define ClassDefInlineNV(name,id) \
343 _ClassDefInline_(name,id,,) \
344 static int DeclFileLine() { return __LINE__; }
348#define R__UseDummy(name) \
349 class _NAME2_(name,_c) { public: _NAME2_(name,_c)() { if (name) { } } }
352#define ClassImpUnique(name,key) \
354 TGenericClassInfo *GenerateInitInstance(const name*); \
356 static int _R__UNIQUE_(_NAME2_(R__dummyint,key)) __attribute__((unused)) = \
357 GenerateInitInstance((name*)0x0)->SetImplFile(__FILE__, __LINE__); \
358 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyint,key))); \
361#define ClassImp(name) ClassImpUnique(name,default)
365#define NamespaceImpUnique(name,key) \
367 namespace ROOTDict { \
368 ::ROOT::TGenericClassInfo *GenerateInitInstance(); \
370 static int _R__UNIQUE_(_NAME2_(R__dummyint,key)) = \
371 GenerateInitInstance()->SetImplFile(__FILE__, __LINE__); \
372 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyint,key))); \
376#define NamespaceImp(name) NamespaceImpUnique(name,default)
388#define ClassDefT(name,id) \
389 _ClassDefOutline_(name,id,virtual,) \
390 static int DeclFileLine() { return __LINE__; }
392#define ClassDefTNV(name,id) \
393 _ClassDefOutline_(name,id,virtual,) \
394 static int DeclFileLine() { return __LINE__; }
397#define ClassDefT2(name,Tmpl)
399#define templateClassImpUnique(name, key) \
402 _R__UNIQUE_(_NAME2_(R__dummyholder, key)) = ::ROOT::RegisterClassTemplate(_QUOTE_(name), __FILE__, __LINE__); \
403 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyholder, key))); \
405#define templateClassImp(name) templateClassImpUnique(name,default)
407#define ClassImpT(name,Tmpl) templateClassImp(name)
414#define ClassDef2T2(name,Tmpl1,Tmpl2)
415#define ClassImp2T(name,Tmpl1,Tmpl2) templateClassImp(name)
423#define ClassDef3T2(name,Tmpl1,Tmpl2,Tmpl3)
424#define ClassImp3T(name,Tmpl1,Tmpl2,Tmpl3) templateClassImp(name)
429#define RootClassVersion(name,VersionNumber) \
431 TGenericClassInfo *GenerateInitInstance(const name*); \
432 static Short_t _R__UNIQUE_(R__dummyVersionNumber) = \
433 GenerateInitInstance((name*)0x0)->SetVersion(VersionNumber); \
434 R__UseDummy(_R__UNIQUE_(R__dummyVersionNumber)); \
437#define RootStreamer(name,STREAMER) \
439 TGenericClassInfo *GenerateInitInstance(const name*); \
440 static Short_t _R__UNIQUE_(R__dummyStreamer) = \
441 GenerateInitInstance((name*)0x0)->SetStreamer(STREAMER); \
442 R__UseDummy(_R__UNIQUE_(R__dummyStreamer)); \
452# define _R_PragmaStr(x) _Pragma(#x)
453# define R__LOAD_LIBRARY(LIBRARY) _R_PragmaStr(cling load ( #LIBRARY ))
454# define R__ADD_INCLUDE_PATH(PATH) _R_PragmaStr(cling add_include_path ( #PATH ))
455# define R__ADD_LIBRARY_PATH(PATH) _R_PragmaStr(cling add_library_path ( #PATH ))
456#elif defined(R__WIN32)
457# define _R_PragmaStr(x) __pragma(#x)
458# define R__LOAD_LIBRARY(LIBRARY) _R_PragmaStr(comment(lib, #LIBRARY))
459# define R__ADD_INCLUDE_PATH(PATH) _R_PragmaStr(comment(path, #PATH))
460# define R__ADD_LIBRARY_PATH(PATH) _R_PragmaStr(comment(path, #PATH))
469# define R__LOAD_LIBRARY(LIBRARY)
470# define R__ADD_INCLUDE_PATH(PATH)
471# define R__ADD_LIBRARY_PATH(PATH)
476# define R__CLING_PTRCHECK(ONOFF) __attribute__((annotate("__cling__ptrcheck(" #ONOFF ")")))
478# define R__CLING_PTRCHECK(ONOFF)
482inline char *
R__STRTOK_R(
char *str,
const char *delim,
char **saveptr)
485 return strtok_s(str, delim, saveptr);
487 return strtok_r(str, delim, saveptr);
TClass *(* DictFuncPtr_t)()
TBuffer & operator<<(TBuffer &buf, const Tmpl *obj)
char * R__STRTOK_R(char *str, const char *delim, char **saveptr)
void(* MemberStreamerFunc_t)(TBuffer &, void *, Int_t)
void(* ShowMembersFunc_t)(const void *obj, TMemberInspector &R__insp, Bool_t isTransient)
TBuffer & operator>>(TBuffer &buf, Tmpl *&obj)
std::atomic< TClass * > atomic_TClass_ptr
void(* ClassStreamerFunc_t)(TBuffer &, void *)
void(* ClassConvStreamerFunc_t)(TBuffer &, void *, const TClass *)
typedef void((*Func_t)())
static void * New(void *p)
static void * NewArray(Long_t nElements, void *p)
static atomic_TClass_ptr fgIsA
static void DeleteArray(void *p)
static void Destruct(void *p)
::ROOT::TGenericClassInfo * fgGenericInfo
::ROOT::TGenericClassInfo * GenerateInitInstanceLocal()
static void Delete(void *p)
static TClass * Dictionary()
static const char * Name()
static void SetInstance(::ROOT::TGenericClassInfo &R__instance, NewFunc_t, NewArrFunc_t, DelFunc_t, DelArrFunc_t, DesFunc_t)
static void SetName(const std::string &name, std::string &nameMember)
static void SetfgIsA(atomic_TClass_ptr &isA, TClass *(*dictfun)())
virtual 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) const
virtual void Register(const char *cname, Version_t id, const std::type_info &info, DictFuncPtr_t dict, Int_t pragmabits) const
virtual void Unregister(const char *classname) const
virtual 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) const =0
virtual void Register(const char *cname, Version_t id, const std::type_info &info, DictFuncPtr_t dict, Int_t pragmabits) const =0
virtual void Unregister(const char *classname) const =0
Buffer base class used for serializing objects.
TClass instances represent classes, structs and namespaces in the ROOT type system.
Collection abstract base class.
Describe directory structure in memory.
Abstract base class for accessing the data-members of a class.
The TNamed class is the base class for all named ROOT classes.
Mother of all ROOT objects.
void DefaultStreamer(TBuffer &R__b, const TClass *cl, void *objpointer)
Default streamer implementation used by ClassDefInline to avoid requirement to include TBuffer....
const TInitBehavior * DefineBehavior(void *, void *)
std::string GetDemangledTypeName(const std::type_info &)
Returns a string with the demangled and normalized name for the given type.
Bool_t HasConsistentHashMember(TClass &clRef)
Return true is the Hash/RecursiveRemove setup is consistent, i.e.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
void(* DirAutoAdd_t)(void *, TDirectory *)
void(* ResetAfterMergeFunc_t)(void *, TFileMergeInfo *)
void(* DesFunc_t)(void *)
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).
void(* DelFunc_t)(void *)
void AddClassAlternate(const char *normName, const char *alternate)
Global function called by GenerateInitInstance.
void RemoveClass(const char *cname)
Global function called by the dtor of a class's init class (see the ClassImp macro).
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).
TNamed * RegisterClassTemplate(const char *name, const char *file, Int_t line)
Global function to register the implementation file and line of a class template (i....
void *(* NewArrFunc_t)(Long_t size, void *arena)
void Class_ShowMembers(TClass *cl, const void *obj, TMemberInspector &)
Indirect call to the implementation of ShowMember allowing [forward] declaration with out a full defi...
void ResetClassVersion(TClass *, const char *, Short_t)
Global function to update the version number.
Short_t SetClassVersion(RootClass *)
void(* DelArrFunc_t)(void *)
void *(* NewFunc_t)(void *)
Long64_t(* MergeFunc_t)(void *, TCollection *, TFileMergeInfo *)
static Bool_t fgHashConsistency