23 #ifndef ROOT_RtypesCore
26 #ifndef ROOT_DllImport
29 #ifndef ROOT_Rtypeinfo
120 #define BIT(n) (1ULL << (n))
121 #define SETBIT(n,i) ((n) |= BIT(i))
122 #define CLRBIT(n,i) ((n) &= ~BIT(i))
123 #define TESTBIT(n,i) ((Bool_t)(((n) & BIT(i)) != 0))
146 class TGenericClassInfo;
147 typedef void *(*NewFunc_t)(
void *);
148 typedef void *(*NewArrFunc_t)(
Long_t size,
void *arena);
160 const char *dfil,
const char *ifil,
179 return CreateInitInstance(t);
193 const type_info &info,
195 virtual void Unregister(
const char *classname)
const = 0;
198 const char *dfil,
const char *ifil,
205 const type_info &info,
216 const char *dfil,
const char *ifil,
229 #ifndef ROOT_TGenericClassInfo
238 #define _ClassDef_(name,id, virtual_keyword, overrd) \
240 static atomic_TClass_ptr fgIsA; \
242 static TClass *Class(); \
243 static const char *Class_Name(); \
244 static Version_t Class_Version() { return id; } \
245 static TClass *Dictionary(); \
246 virtual_keyword TClass *IsA() const overrd { return name::Class(); } \
247 virtual_keyword void ShowMembers(TMemberInspector&insp) const overrd { ::ROOT::Class_ShowMembers(name::Class(), this, insp); } \
248 virtual_keyword void Streamer(TBuffer&) overrd; \
249 void StreamerNVirtual(TBuffer&ClassDef_StreamerNVirtual_b) { name::Streamer(ClassDef_StreamerNVirtual_b); } \
250 static const char *DeclFileName() { return __FILE__; } \
251 static int ImplFileLine(); \
252 static const char *ImplFileName();
254 #define ClassDef(name,id) \
255 _ClassDef_(name,id,virtual,) \
256 static int DeclFileLine() { return __LINE__; }
258 #define ClassDefOverride(name,id) \
259 _ClassDef_(name,id,,override) \
260 static int DeclFileLine() { return __LINE__; }
262 #define ClassDefNV(name,id) \
263 _ClassDef_(name,id,,) \
264 static int DeclFileLine() { return __LINE__; }
266 #define R__UseDummy(name) \
267 class _NAME2_(name,_c) { public: _NAME2_(name,_c)() { if (name) { } } }
270 #define ClassImpUnique(name,key) \
272 TGenericClassInfo *GenerateInitInstance(const name*); \
274 static int _R__UNIQUE_(_NAME2_(R__dummyint,key)) = \
275 GenerateInitInstance((name*)0x0)->SetImplFile(__FILE__, __LINE__); \
276 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyint,key))); \
279 #define ClassImp(name) ClassImpUnique(name,default)
283 #define NamespaceImpUnique(name,key) \
286 ::ROOT::TGenericClassInfo *GenerateInitInstance(); \
288 static int _R__UNIQUE_(_NAME2_(R__dummyint,key)) = \
289 GenerateInitInstance()->SetImplFile(__FILE__, __LINE__); \
290 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyint,key))); \
294 #define NamespaceImp(name) NamespaceImpUnique(name,default)
306 #define ClassDefT(name,id) \
307 _ClassDef_(name,id,virtual,) \
308 static int DeclFileLine() { return __LINE__; }
310 #define ClassDefTNV(name,id) \
311 _ClassDef_(name,id,virtual,) \
312 static int DeclFileLine() { return __LINE__; }
315 #define ClassDefT2(name,Tmpl)
319 #define templateClassImpUnique(name,key) \
321 static TNamed *_R__UNIQUE_(_NAME2_(R__dummyholder,key)) = \
322 ROOT::RegisterClassTemplate(_QUOTE_(name), __FILE__, __LINE__); \
323 R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyholder,key))); \
325 #define templateClassImp(name) templateClassImpUnique(name,default)
327 #define ClassImpT(name,Tmpl) templateClassImp(name)
334 #define ClassDef2T2(name,Tmpl1,Tmpl2)
335 #define ClassImp2T(name,Tmpl1,Tmpl2) templateClassImp(name)
343 #define ClassDef3T2(name,Tmpl1,Tmpl2,Tmpl3)
344 #define ClassImp3T(name,Tmpl1,Tmpl2,Tmpl3) templateClassImp(name)
349 #define RootClassVersion(name,VersionNumber) \
351 TGenericClassInfo *GenerateInitInstance(const name*); \
352 static Short_t _R__UNIQUE_(R__dummyVersionNumber) = \
353 GenerateInitInstance((name*)0x0)->SetVersion(VersionNumber); \
354 R__UseDummy(_R__UNIQUE_(R__dummyVersionNumber)); \
357 #define RootStreamer(name,STREAMER) \
359 TGenericClassInfo *GenerateInitInstance(const name*); \
360 static Short_t _R__UNIQUE_(R__dummyStreamer) = \
361 GenerateInitInstance((name*)0x0)->SetStreamer(STREAMER); \
362 R__UseDummy(_R__UNIQUE_(R__dummyStreamer)); \
371 #define _R_PragmaStr(x) _Pragma(#x)
373 # define R__LOAD_LIBRARY(LIBRARY) _R_PragmaStr(cling load ( #LIBRARY ))
374 # define R__ADD_INCLUDE_PATH(PATH) _R_PragmaStr(cling add_include_path ( #PATH ))
375 # define R__ADD_LIBRARY_PATH(PATH) _R_PragmaStr(cling add_library_path ( #PATH ))
376 #elif defined(R__WIN32)
377 # define R__LOAD_LIBRARY(LIBRARY) _R_PragmaStr(comment(lib, #LIBRARY))
378 # define R__ADD_INCLUDE_PATH(PATH) _R_PragmaStr(comment(path, #PATH))
379 # define R__ADD_LIBRARY_PATH(PATH) _R_PragmaStr(comment(path, #PATH))
388 # define R__LOAD_LIBRARY(LIBRARY)
389 # define R__ADD_INCLUDE_PATH(PATH)
390 # define R__ADD_LIBRARY_PATH(PATH)
TClass *(* DictFuncPtr_t)()
void(* MemberStreamerFunc_t)(TBuffer &, void *, Int_t)
const Long64_t kMinLong64
const ULong64_t kMaxULong64
Buffer base class used for serializing objects.
virtual void Register(const char *cname, Version_t id, const type_info &info, DictFuncPtr_t dict, Int_t pragmabits) const
void AddClass(const char *cname, Version_t id, const 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).
Abstract base class for accessing the data-members of a class.
const TInitBehavior * DefineBehavior(void *, void *)
void(* DirAutoAdd_t)(void *, TDirectory *)
TBuffer & operator>>(TBuffer &buf, Tmpl *&obj)
TBuffer & operator<<(TBuffer &buf, const Tmpl *obj)
The TNamed class is the base class for all named ROOT classes.
Long64_t(* MergeFunc_t)(void *, TCollection *, TFileMergeInfo *)
void AddClassAlternate(const char *normName, const char *alternate)
Global function called by GenerateInitInstance.
void(* ResetAfterMergeFunc_t)(void *, TFileMergeInfo *)
virtual void Unregister(const char *classname) const
const Long64_t kMaxLong64
TClass * CreateClass(const char *cname, Version_t id, const 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 ResetClassVersion(TClass *, const char *, Short_t)
Global function to update the version number.
void RemoveClass(const char *cname)
Global function called by the dtor of a class's init class (see the ClassImp macro).
Collection abstract base class.
virtual TClass * CreateClass(const char *cname, Version_t id, const type_info &info, TVirtualIsAProxy *isa, const char *dfil, const char *ifil, Int_t dl, Int_t il) const
The ROOT global object gROOT contains a list of all defined classes.
std::atomic< TClass * > atomic_TClass_ptr
Short_t SetClassVersion(RootClass *)
virtual void Unregister(const char *classname) const =0
TEllipse dict(9, 20, 3, 1.5)
void(* DesFunc_t)(void *)
Describe directory structure in memory.
void(* ClassStreamerFunc_t)(TBuffer &, void *)
unsigned long long ULong64_t
void(* DelArrFunc_t)(void *)
Mother of all ROOT objects.
typedef void((*Func_t)())
void(* ClassConvStreamerFunc_t)(TBuffer &, void *, const TClass *)
const size_t kBitsPerByte
void(* ShowMembersFunc_t)(const void *obj, TMemberInspector &R__insp, Bool_t isTransient)
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.e.
virtual void Register(const char *cname, Version_t id, const type_info &info, DictFuncPtr_t dict, Int_t pragmabits) const =0
virtual TClass * CreateClass(const char *cname, Version_t id, const type_info &info, TVirtualIsAProxy *isa, const char *dfil, const char *ifil, Int_t dl, Int_t il) const =0
void(* DelFunc_t)(void *)
void Class_ShowMembers(TClass *cl, const void *obj, TMemberInspector &)
Indirect call to the implementation of ShowMember allowing [forward] declaration with out a full defi...