ROOT logo
ROOT » CORE » CONT » TArrayC

class TArrayC: public TArray


TArrayC

Array of chars or bytes (8 bits per element).


Function Members (Methods)

public:
TArrayC()
TArrayC(Int_t n)
TArrayC(const TArrayC& array)
TArrayC(Int_t n, const Char_t* array)
virtual~TArrayC()
voidAddAt(Char_t c, Int_t i)
voidAdopt(Int_t n, Char_t* array)
Char_tAt(Int_t i) const
static TClass*Class()
static TClass*TArray::Class()
voidCopy(TArrayC& array) const
const Char_t*GetArray() const
Char_t*GetArray()
virtual Double_tGetAt(Int_t i) const
virtual Double_tTArray::GetAt(Int_t i) const
Int_tTArray::GetSize() const
Stat_tGetSum() const
virtual TClass*IsA() const
TArrayC&operator=(const TArrayC& rhs)
TArray&TArray::operator=(const TArray& rhs)
Char_t&operator[](Int_t i)
Char_toperator[](Int_t i) const
static TArray*TArray::ReadArray(TBuffer& b, const TClass* clReq)
voidReset(Char_t val = 0)
virtual voidSet(Int_t n)
virtual voidTArray::Set(Int_t n)
voidSet(Int_t n, const Char_t* array)
virtual voidSetAt(Double_t v, Int_t i)
virtual voidTArray::SetAt(Double_t v, Int_t i)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidTArray::ShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
virtual voidTArray::Streamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidTArray::StreamerNVirtual(TBuffer& b)
static voidTArray::WriteArray(TBuffer& b, const TArray* a)
protected:
Bool_tTArray::BoundsOk(const char* where, Int_t at) const
Bool_tTArray::OutOfBoundsError(const char* where, Int_t i) const

Data Members

public:
Char_t*fArray[fN] Array of fN chars
Int_tTArray::fNNumber of array elements

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TArrayC()
 Default TArrayC ctor.
TArrayC(Int_t n)
 Create TArrayC object and set array size to n chars.
TArrayC(Int_t n, const Char_t* array)
 Create TArrayC object and initialize it with values of array.
TArrayC(const TArrayC &array)
 Copy constructor.
TArrayC & operator=(const TArrayC& rhs)
 TArrayC assignment operator.
~TArrayC()
 Delete TArrayC object.
void Adopt(Int_t n, Char_t* array)
 Adopt array arr into TArrayC, i.e. don't copy arr but use it directly
 in TArrayC. User may not delete arr, TArrayC dtor will do it.
void AddAt(Char_t c, Int_t i)
 Add char c at position i. Check for out of bounds.
void Set(Int_t n)
 Set size of this array to n chars.
 A new array is created, the old contents copied to the new array,
 then the old array is deleted.
 This function should not be called if the array was declared via Adopt.
void Set(Int_t n, const Char_t* array)
 Set size of this array to n chars and set the contents.
 This function should not be called if the array was declared via Adopt.
void Streamer(TBuffer& b)
 Stream a TArrayC object.
Char_t At(Int_t i) const
Char_t & operator[](Int_t i)
Char_t operator[](Int_t i)
void Copy(TArrayC& array) const
{array.Set(fN,fArray);}
const Char_t * GetArray()
{ return fArray; }
Char_t * GetArray()
{ return fArray; }
Double_t GetAt(Int_t i) const
{ return At(i); }
Stat_t GetSum() const
{Stat_t sum=0; for (Int_t i=0;i<fN;i++) sum+=fArray[i]; return sum;}
void Reset(Char_t val = 0)
{memset(fArray,val,fN*sizeof(Char_t));}
void SetAt(Double_t v, Int_t i)
{ AddAt((Char_t)v, i); }