26#ifndef R__LESS_INCLUDES
41#define __attribute__(unused)
85#define BIT(n) (1ULL << (n))
86#define SETBIT(n,i) ((n) |= BIT(i))
87#define CLRBIT(n,i) ((n) &= ~BIT(i))
88#define TESTBIT(n,i) ((Bool_t)(((n) & BIT(i)) != 0))
107 class TGenericClassInfo;
108 typedef void *(*NewFunc_t)(
void *);
109 typedef void *(*NewArrFunc_t)(
Long_t size,
void *arena);
121 const char *dfil,
const char *ifil,
123 extern void AddClass(
const char *cname,
Version_t id,
const std::type_info &info,
140 return CreateInitInstance(t);
154 const std::type_info &info,
159 const char *dfil,
const char *ifil,
166 const std::type_info &info,
177 const char *dfil,
const char *ifil,
198namespace ROOT {
namespace Internal {
205 static void SetName(
const std::string&
name, std::string& nameMember);
215 static void *
New(
void *p) {
return p ?
new(p) T :
new T; };
217 return p ?
new(p) T[nElements] :
new T[nElements]; }
218 static void Delete(
void *p) {
delete ((T*)p); }
222 static ::TVirtualIsAProxy* isa_proxy = new ::TInstrumentedIsAProxy<T>(0);
223 static ::ROOT::TGenericClassInfo
224 R__instance(T::Class_Name(), T::Class_Version(),
225 T::DeclFileName(), T::DeclFileLine(),
227 &T::Dictionary, isa_proxy, 0,
sizeof(T) );
238 static std::string gName;
241 return gName.c_str();
252 template <
typename T>
257 template <
typename T>
269#define _ClassDefBase_(name, id, virtual_keyword, overrd) \
271 static_assert(std::is_integral<decltype(id)>::value, "ClassDef(Inline) macro: the specified class version number is not an integer."); \
272 virtual_keyword Bool_t CheckTObjectHashConsistency() const overrd \
274 static std::atomic<UChar_t> recurseBlocker(0); \
275 if (R__likely(recurseBlocker >= 2)) { \
276 return ::ROOT::Internal::THashConsistencyHolder<decltype(*this)>::fgHashConsistency; \
277 } else if (recurseBlocker == 1) { \
279 } else if (recurseBlocker++ == 0) { \
280 ::ROOT::Internal::THashConsistencyHolder<decltype(*this)>::fgHashConsistency = \
281 ::ROOT::Internal::HasConsistentHashMember(_QUOTE_(name)) || \
282 ::ROOT::Internal::HasConsistentHashMember(*IsA()); \
284 return ::ROOT::Internal::THashConsistencyHolder<decltype(*this)>::fgHashConsistency; \
290 static Version_t Class_Version() { return id; } \
291 virtual_keyword TClass *IsA() const overrd { return name::Class(); } \
292 virtual_keyword void ShowMembers(TMemberInspector &insp) const overrd \
294 ::ROOT::Class_ShowMembers(name::Class(), this, insp); \
296 void StreamerNVirtual(TBuffer &ClassDef_StreamerNVirtual_b) { name::Streamer(ClassDef_StreamerNVirtual_b); } \
297 static const char *DeclFileName() { return __FILE__; }
299#define _ClassDefOutline_(name,id, virtual_keyword, overrd) \
300 _ClassDefBase_(name,id, virtual_keyword, overrd) \
302 static atomic_TClass_ptr fgIsA; \
304 static int ImplFileLine(); \
305 static const char *ImplFileName(); \
306 static const char *Class_Name(); \
307 static TClass *Dictionary(); \
308 static TClass *Class(); \
309 virtual_keyword void Streamer(TBuffer&) overrd;
311#define _ClassDefInline_(name, id, virtual_keyword, overrd) \
312 _ClassDefBase_(name, id, virtual_keyword, overrd) public : static int ImplFileLine() { return -1; } \
313 static const char *ImplFileName() { return 0; } \
314 static const char *Class_Name() \
316 return ::ROOT::Internal::ClassDefGenerateInitInstanceLocalInjector<name>::Name(); \
318 static TClass *Dictionary() \
320 return ::ROOT::Internal::ClassDefGenerateInitInstanceLocalInjector<name>::Dictionary(); \
322 static TClass *Class() { return ::ROOT::Internal::ClassDefGenerateInitInstanceLocalInjector<name>::Class(); } \
323 virtual_keyword void Streamer(TBuffer &R__b) overrd { ::ROOT::Internal::DefaultStreamer(R__b, name::Class(), this); }
325#define ClassDef(name,id) \
326 _ClassDefOutline_(name,id,virtual,) \
327 static int DeclFileLine() { return __LINE__; }
329#define ClassDefOverride(name,id) \
330 _ClassDefOutline_(name,id,,override) \
331 static int DeclFileLine() { return __LINE__; }
333#define ClassDefNV(name,id) \
334 _ClassDefOutline_(name,id,,) \
335 static int DeclFileLine() { return __LINE__; }
337#define ClassDefInline(name,id) \
338 _ClassDefInline_(name,id,virtual,) \
339 static int DeclFileLine() { return __LINE__; }
341#define ClassDefInlineOverride(name,id) \
342 _ClassDefInline_(name,id,,override) \
343 static int DeclFileLine() { return __LINE__; }
345#define ClassDefInlineNV(name,id) \
346 _ClassDefInline_(name,id,,) \
347 static int DeclFileLine() { return __LINE__; }
351#define R__UseDummy(name) \
352 class _NAME2_(name,_c) { public: _NAME2_(name,_c)() { if (name) { } } }
355#define ClassImpUnique(name,key) \
357 TGenericClassInfo *GenerateInitInstance(const name*); \
359 static int _R__UNIQUE_(_NAME2_(R__dummyint,key)) __attribute__((unused)) = \
360 GenerateInitInstance((name*)0x0)->SetImplFile(__FILE__, __LINE__); \
361 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyint,key))); \
364#define ClassImp(name) ClassImpUnique(name,default)
368#define NamespaceImpUnique(name,key) \
370 namespace ROOTDict { \
371 ::ROOT::TGenericClassInfo *GenerateInitInstance(); \
373 static int _R__UNIQUE_(_NAME2_(R__dummyint,key)) = \
374 GenerateInitInstance()->SetImplFile(__FILE__, __LINE__); \
375 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyint,key))); \
379#define NamespaceImp(name) NamespaceImpUnique(name,default)
391#define ClassDefT(name,id) \
392 _ClassDefOutline_(name,id,virtual,) \
393 static int DeclFileLine() { return __LINE__; }
395#define ClassDefTNV(name,id) \
396 _ClassDefOutline_(name,id,virtual,) \
397 static int DeclFileLine() { return __LINE__; }
400#define ClassDefT2(name,Tmpl)
402#define templateClassImpUnique(name, key) \
405 _R__UNIQUE_(_NAME2_(R__dummyholder, key)) = ::ROOT::RegisterClassTemplate(_QUOTE_(name), __FILE__, __LINE__); \
406 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyholder, key))); \
408#define templateClassImp(name) templateClassImpUnique(name,default)
410#define ClassImpT(name,Tmpl) templateClassImp(name)
417#define ClassDef2T2(name,Tmpl1,Tmpl2)
418#define ClassImp2T(name,Tmpl1,Tmpl2) templateClassImp(name)
426#define ClassDef3T2(name,Tmpl1,Tmpl2,Tmpl3)
427#define ClassImp3T(name,Tmpl1,Tmpl2,Tmpl3) templateClassImp(name)
432#define RootClassVersion(name,VersionNumber) \
434 TGenericClassInfo *GenerateInitInstance(const name*); \
435 static Short_t _R__UNIQUE_(R__dummyVersionNumber) = \
436 GenerateInitInstance((name*)0x0)->SetVersion(VersionNumber); \
437 R__UseDummy(_R__UNIQUE_(R__dummyVersionNumber)); \
440#define RootStreamer(name,STREAMER) \
442 TGenericClassInfo *GenerateInitInstance(const name*); \
443 static Short_t _R__UNIQUE_(R__dummyStreamer) = \
444 GenerateInitInstance((name*)0x0)->SetStreamer(STREAMER); \
445 R__UseDummy(_R__UNIQUE_(R__dummyStreamer)); \
455# define _R_PragmaStr(x) _Pragma(#x)
456# define R__LOAD_LIBRARY(LIBRARY) _R_PragmaStr(cling load ( #LIBRARY ))
457# define R__ADD_INCLUDE_PATH(PATH) _R_PragmaStr(cling add_include_path ( #PATH ))
458# define R__ADD_LIBRARY_PATH(PATH) _R_PragmaStr(cling add_library_path ( #PATH ))
459#elif defined(R__WIN32)
460# define _R_PragmaStr(x) __pragma(#x)
461# define R__LOAD_LIBRARY(LIBRARY) _R_PragmaStr(comment(lib, #LIBRARY))
462# define R__ADD_INCLUDE_PATH(PATH) _R_PragmaStr(comment(path, #PATH))
463# define R__ADD_LIBRARY_PATH(PATH) _R_PragmaStr(comment(path, #PATH))
472# define R__LOAD_LIBRARY(LIBRARY)
473# define R__ADD_INCLUDE_PATH(PATH)
474# define R__ADD_LIBRARY_PATH(PATH)
479# define R__CLING_PTRCHECK(ONOFF) __attribute__((annotate("__cling__ptrcheck(" #ONOFF ")")))
481# define R__CLING_PTRCHECK(ONOFF)
TClass *(* DictFuncPtr_t)()
TBuffer & operator<<(TBuffer &buf, const Tmpl *obj)
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