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;
109 typedef void *(*NewFunc_t)(
void *);
122 const char *dfil,
const char *ifil,
140 template <
class T> TGenericClassInfo *GetClassInfo(
const T* t) {
141 TGenericClassInfo *GenerateInitInstance(
const T*);
142 return CreateInitInstance(t);
156 const std::type_info &info,
161 const char *dfil,
const char *ifil,
168 const std::type_info &info,
179 const char *dfil,
const char *ifil,
200namespace ROOT {
namespace Internal {
205 static void SetInstance(::ROOT::TGenericClassInfo& R__instance,
207 static void SetName(
const std::string&
name, std::string& nameMember);
217 static void *
New(
void *
p) {
return p ?
new(
p) T :
new T; };
219 return p ?
new(
p) T[nElements] :
new T[nElements]; }
224 static ::TVirtualIsAProxy* isa_proxy = new ::TInstrumentedIsAProxy<T>(
nullptr);
225 static ::ROOT::TGenericClassInfo
226 R__instance(T::Class_Name(), T::Class_Version(),
227 T::DeclFileName(), T::DeclFileLine(),
229 &T::Dictionary, isa_proxy, 0,
sizeof(T) );
240 static std::string gName;
243 return gName.c_str();
254 template <
typename T>
259 template <
typename T>
271#define _ClassDefBase_(name, id, virtual_keyword, overrd) \
273 static_assert(std::is_integral<decltype(id)>::value, \
274 "ClassDef(Inline) macro: the specified class version number is not an integer."); \
275 virtual_keyword Bool_t CheckTObjectHashConsistency() const overrd \
277 static std::atomic<UChar_t> recurseBlocker(0); \
278 if (R__likely(recurseBlocker >= 2)) { \
279 return ::ROOT::Internal::THashConsistencyHolder<decltype(*this)>::fgHashConsistency; \
280 } else if (recurseBlocker == 1) { \
282 } else if (recurseBlocker++ == 0) { \
283 ::ROOT::Internal::THashConsistencyHolder<decltype(*this)>::fgHashConsistency = \
284 ::ROOT::Internal::HasConsistentHashMember(_QUOTE_(name)) || \
285 ::ROOT::Internal::HasConsistentHashMember(*IsA()); \
287 return ::ROOT::Internal::THashConsistencyHolder<decltype(*this)>::fgHashConsistency; \
293 static constexpr Version_t Class_Version() { return id; } \
294 virtual_keyword TClass *IsA() const overrd \
295 { return name::Class(); } \
296 virtual_keyword void ShowMembers(TMemberInspector &insp) const overrd \
298 ::ROOT::Class_ShowMembers(name::Class(), this, insp); \
300 void StreamerNVirtual(TBuffer &ClassDef_StreamerNVirtual_b) { name::Streamer(ClassDef_StreamerNVirtual_b); } \
301 static const char *DeclFileName() { return __FILE__; }
303#define _ClassDefOutline_(name,id, virtual_keyword, overrd) \
304 _ClassDefBase_(name,id, virtual_keyword, overrd) \
307 static atomic_TClass_ptr fgIsA; \
309 static int ImplFileLine(); \
310 static const char *ImplFileName(); \
311 static const char *Class_Name(); \
312 static TClass *Dictionary(); \
313 static TClass *Class(); \
314 virtual_keyword void Streamer(TBuffer&) overrd;
316#define _ClassDefInline_(name, id, virtual_keyword, overrd) \
317 _ClassDefBase_(name, id, virtual_keyword, overrd) public : \
318 static int ImplFileLine() { return -1; } \
319 static const char *ImplFileName() { return nullptr; } \
320 static const char *Class_Name() \
322 return ::ROOT::Internal::ClassDefGenerateInitInstanceLocalInjector<name>::Name(); \
324 static TClass *Dictionary() \
326 return ::ROOT::Internal::ClassDefGenerateInitInstanceLocalInjector<name>::Dictionary(); \
328 static TClass *Class() \
330 return ::ROOT::Internal::ClassDefGenerateInitInstanceLocalInjector<name>::Class(); \
332 virtual_keyword void Streamer(TBuffer &R__b) overrd \
334 ::ROOT::Internal::DefaultStreamer(R__b, name::Class(), this); \
337#define ClassDef(name,id) \
338 _ClassDefOutline_(name,id,virtual,) \
339 static int DeclFileLine() { return __LINE__; }
341#define ClassDefOverride(name,id) \
342 _ClassDefOutline_(name,id,,override) \
343 static int DeclFileLine() { return __LINE__; }
345#define ClassDefNV(name,id) \
346 _ClassDefOutline_(name,id,,) \
347 static int DeclFileLine() { return __LINE__; }
349#define ClassDefInline(name,id) \
350 _ClassDefInline_(name,id,virtual,) \
351 static int DeclFileLine() { return __LINE__; }
353#define ClassDefInlineOverride(name,id) \
354 _ClassDefInline_(name,id,,override) \
355 static int DeclFileLine() { return __LINE__; }
357#define ClassDefInlineNV(name,id) \
358 _ClassDefInline_(name,id,,) \
359 static int DeclFileLine() { return __LINE__; }
363#define R__UseDummy(name) \
364 class _NAME2_(name,_c) { public: _NAME2_(name,_c)() { if (name) { } } }
366#define ClassImpUnique(name,key) \
368 TGenericClassInfo *GenerateInitInstance(const name*); \
370 static int _R__UNIQUE_(_NAME2_(R__dummyint,key)) __attribute__((unused)) = \
371 GenerateInitInstance((name*)0x0)->SetImplFile(__FILE__, __LINE__); \
372 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyint,key))); \
377#define ClassImp(name) ClassImpUnique(name,default)
380#define NamespaceImpUnique(name,key) \
382 namespace ROOTDict { \
384 ::ROOT::TGenericClassInfo *GenerateInitInstance(); \
386 static int _R__UNIQUE_(_NAME2_(R__dummyint,key)) = \
387 GenerateInitInstance()->SetImplFile(__FILE__, __LINE__); \
388 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyint,key))); \
393#define NamespaceImp(name) NamespaceImpUnique(name,default)
404#define ClassDefT(name,id) \
405 _ClassDefOutline_(name,id,virtual,) \
406 static int DeclFileLine() { return __LINE__; }
408#define ClassDefTNV(name,id) \
409 _ClassDefOutline_(name,id,virtual,) \
410 static int DeclFileLine() { return __LINE__; }
413#define ClassDefT2(name,Tmpl)
415#define templateClassImpUnique(name, key) \
418 _R__UNIQUE_(_NAME2_(R__dummyholder, key)) = ::ROOT::RegisterClassTemplate(_QUOTE_(name), __FILE__, __LINE__); \
420 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyholder, key))); \
422#define templateClassImp(name) templateClassImpUnique(name,default)
424#define ClassImpT(name,Tmpl) templateClassImp(name)
431#define ClassDef2T2(name,Tmpl1,Tmpl2)
432#define ClassImp2T(name,Tmpl1,Tmpl2) templateClassImp(name)
440#define ClassDef3T2(name,Tmpl1,Tmpl2,Tmpl3)
441#define ClassImp3T(name,Tmpl1,Tmpl2,Tmpl3) templateClassImp(name)
446#define RootClassVersion(name,VersionNumber) \
448 TGenericClassInfo *GenerateInitInstance(const name*); \
450 static Short_t _R__UNIQUE_(R__dummyVersionNumber) = \
451 GenerateInitInstance((name*)0x0)->SetVersion(VersionNumber); \
453 R__UseDummy(_R__UNIQUE_(R__dummyVersionNumber)); \
456#define RootStreamer(name,STREAMER) \
459 TGenericClassInfo *GenerateInitInstance(const name*); \
461 static Short_t _R__UNIQUE_(R__dummyStreamer) = \
462 GenerateInitInstance((name*)0x0)->SetStreamer(STREAMER); \
464 R__UseDummy(_R__UNIQUE_(R__dummyStreamer)); \
474# define _R_PragmaStr(x) _Pragma(#x)
475# define R__LOAD_LIBRARY(LIBRARY) _R_PragmaStr(cling load ( #LIBRARY ))
476# define R__ADD_INCLUDE_PATH(PATH) _R_PragmaStr(cling add_include_path ( #PATH ))
477# define R__ADD_LIBRARY_PATH(PATH) _R_PragmaStr(cling add_library_path ( #PATH ))
478#elif defined(R__WIN32)
479# define _R_PragmaStr(x) __pragma(#x)
480# define R__LOAD_LIBRARY(LIBRARY) _R_PragmaStr(comment(lib, #LIBRARY))
481# define R__ADD_INCLUDE_PATH(PATH) _R_PragmaStr(comment(path, #PATH))
482# define R__ADD_LIBRARY_PATH(PATH) _R_PragmaStr(comment(path, #PATH))
491# define R__LOAD_LIBRARY(LIBRARY)
492# define R__ADD_INCLUDE_PATH(PATH)
493# define R__ADD_LIBRARY_PATH(PATH)
498# define R__CLING_PTRCHECK(ONOFF) __attribute__((annotate("__cling__ptrcheck(" #ONOFF ")")))
500# define R__CLING_PTRCHECK(ONOFF)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
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 *)
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char cname
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)())
void Unregister(const char *classname, TClass *cl) const override
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 override
void Register(const char *cname, Version_t id, const std::type_info &info, DictFuncPtr_t dict, Int_t pragmabits) const override
virtual void Unregister(const char *classname, TClass *cl) const =0
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
Buffer base class used for serializing objects.
TClass instances represent classes, structs and namespaces in the ROOT type system.
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.
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.
Defines a common interface to inspect/change the contents of an object that represents a collection.
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 *)
Bool_t HasConsistentHashMember(TClass &clRef)
Return true is the Hash/RecursiveRemove setup is consistent, i.e.
std::string GetDemangledTypeName(const std::type_info &t)
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
void(* DirAutoAdd_t)(void *, TDirectory *)
ROOT::TClassAlt * AddClassAlternate(const char *normName, const char *alternate)
Global function called by GenerateInitInstance.
void(* ResetAfterMergeFunc_t)(void *, TFileMergeInfo *)
void(* DesFunc_t)(void *)
void RemoveClass(const char *cname, TClass *cl)
Global function called by the dtor of a class's init class (see the ClassImp macro).
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 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 *)
void RemoveClassAlternate(ROOT::TClassAlt *)
static Bool_t fgHashConsistency