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.
char * GetObjectAt(UInt_t ind) const
TVirtualArray(TClass *cl, 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.
Wrapper around an object and giving indirect access to its content even if the object is not of a cla...
char * operator[](UInt_t ind) const
Int_t Size() const
Return size of object of this class.
The ROOT global object gROOT contains a list of all defined classes.
TClassRef is used to implement a permanent reference to a TClass object.
void SetSize(UInt_t size)