ROOT » IO » IO » TVirtualArray

class TVirtualArray


TVirtualArray

Wrapper around an object and giving indirect access to its content
even if the object is not of a class in the Cint/Reflex dictionary.


Function Members (Methods)

Data Members

public:
char*fArray[fSize]
UInt_tfCapacity
TClassReffClass
UInt_tfSize

Class Charts

Inheritance Chart:
TVirtualArray

Function documentation

TVirtualArray(TClass* cl, UInt_t size)
{}
~TVirtualArray()
{ if (fClass) fClass->DeleteArray( fArray ); }
TClass * GetClass()
{ return fClass; }
char * operator[](UInt_t ind) const
{ return GetObjectAt(ind); }
char * GetObjectAt(UInt_t ind) const
{ return fArray+fClass->Size()*ind; }
void SetSize(UInt_t size)
 Set the used size of this array to 'size'.   If size is greater than the existing
 capacity, reallocate the array BUT no data is preserved.