12 #ifndef ROOT_TVirtualArray
13 #define ROOT_TVirtualArray
33 TVirtualArray(
TClass *cl,
UInt_t size ) : fClass(cl), fCapacity(size), fSize(size), fArray( (char*)( cl ? cl->NewArray(size) : 0) ) {};
44 if (fSize > fCapacity && fClass) {
46 fArray = (
char*)fClass->
NewArray(fSize);
54 #endif // ROOT_TVirtualArray
void DeleteArray(void *ary, Bool_t dtorOnly=kFALSE)
Explicitly call operator delete[] for an array.
TVirtualArray(TClass *cl, UInt_t size)
Wrapper around an object and giving indirect access to its content even if the object is not of a cla...
The ROOT global object gROOT contains a list of all defined classes.
char * operator[](UInt_t ind) const
TClassRef is used to implement a permanent reference to a TClass object.
char * GetObjectAt(UInt_t ind) const
void SetSize(UInt_t size)
void * NewArray(Long_t nElements, ENewType defConstructor=kClassNew) const
Return a pointer to a newly allocated array of objects of this class.
Int_t Size() const
Return size of object of this class.