/usr/include/root/TIndArray.h is in libroot-tree-dev 5.34.30-0ubuntu8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | // @(#)root/tree:$Id$
// Author: Lukasz Janyst <ljanyst@cern.ch> 23/01/2008
//------------------------------------------------------------------------------
// file: TIndArray.h
//------------------------------------------------------------------------------
#ifndef ROOT_TIndArray
#define ROOT_TIndArray
#ifndef ROOT_Rtypes
#include "Rtypes.h"
#endif
class TIndArray
{
public:
TIndArray():
fElems( 0 ), fCapacity( 0 ), fArr( 0 ) {};
virtual ~TIndArray()
{
delete [] fArr;
}
void ClearAndResize( UInt_t size )
{
delete [] fArr;
fElems = 0;
fArr = new UChar_t[size];
fCapacity = size;
}
UInt_t GetCapacity() { return fCapacity; }
UInt_t GetNumItems() { return fElems; }
void SetNumItems( UInt_t items ) { fElems = items;}
UChar_t &At( Int_t ind ) { return fArr[ind]; }
void Clear() { fElems = 0; }
private:
UInt_t fElems; // Number of elements stored in the array
UInt_t fCapacity; //!Capacity of the array
UChar_t *fArr; //[fElems] The array
};
#endif // ROOT_TIndArray
|