Warning, file /include/root/TIndArray.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 #ifndef ROOT_TIndArray
0009 #define ROOT_TIndArray
0010
0011 #include "RtypesCore.h"
0012
0013
0014 class TIndArray
0015 {
0016 public:
0017 TIndArray():
0018 fElems( 0 ), fCapacity( 0 ), fArr( nullptr ) {};
0019
0020 virtual ~TIndArray()
0021 {
0022 delete [] fArr;
0023 }
0024
0025 void ClearAndResize( UInt_t size )
0026 {
0027 delete [] fArr;
0028 fElems = 0;
0029 fArr = new UChar_t[size];
0030 fCapacity = size;
0031 }
0032
0033 UInt_t GetCapacity() { return fCapacity; }
0034 UInt_t GetNumItems() { return fElems; }
0035 void SetNumItems( UInt_t items ) { fElems = items;}
0036 UChar_t &At( Int_t ind ) { return fArr[ind]; }
0037 void Clear() { fElems = 0; }
0038
0039 private:
0040 UInt_t fElems;
0041 UInt_t fCapacity;
0042 UChar_t *fArr;
0043
0044 };
0045
0046 #endif