Warning, file /include/root/TVirtualObject.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TVirtualObject
0013 #define ROOT_TVirtualObject
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #include "TClassRef.h"
0024
0025
0026 class TVirtualObject {
0027 private:
0028
0029 TVirtualObject(const TVirtualObject&) = delete;
0030 TVirtualObject &operator=(const TVirtualObject&) = delete;
0031
0032 public:
0033 TClassRef fClass;
0034 void *fObject;
0035
0036 TVirtualObject(TClass *cl) : fClass(cl), fObject(cl ? cl->New() : nullptr) { }
0037 ~TVirtualObject() { if (fClass) fClass->Destructor(fObject); }
0038
0039
0040 TClass *GetClass() const { return fClass; }
0041 void *GetObject() const { return fObject; }
0042
0043 };
0044
0045 #endif