Logo ROOT   6.17/01
Reference Guide
List of all members | Public Member Functions | Public Attributes | List of all members
TArrayC Class Reference

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

Definition at line 27 of file TArrayC.h.

Public Member Functions

 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.
 
virtual ~TArrayC ()
 Delete TArrayC object.
 
void AddAt (Char_t c, Int_t i)
 Add char c at position i. Check for out of bounds.
 
void Adopt (Int_t n, Char_t *array)
 Adopt array arr into TArrayC, i.e. More...
 
Char_t At (Int_t i) const
 
void Copy (TArrayC &array) const
 
const Char_t * GetArray () const
 
Char_t * GetArray ()
 
Double_t GetAt (Int_t i) const
 
Stat_t GetSum () const
 
TArrayCoperator= (const TArrayC &rhs)
 TArrayC assignment operator.
 
Char_t & operator[] (Int_t i)
 
Char_t operator[] (Int_t i) const
 
void Reset (Char_t val=0)
 
void Set (Int_t n)
 Set size of this array to n chars. More...
 
void Set (Int_t n, const Char_t *array)
 Set size of this array to n chars and set the contents. More...
 
void SetAt (Double_t v, Int_t i)
 
- Public Member Functions inherited from TArray
 TArray (Int_t n)
 
 TArray (const TArray &a)
 
Int_t GetSize () const
 
TArrayoperator= (const TArray &rhs)
 

Public Attributes

Char_t * fArray
 
- Public Attributes inherited from TArray
Int_t fN
 

Additional Inherited Members

- Static Public Member Functions inherited from TArray
static TArrayReadArray (TBuffer &b, const TClass *clReq)
 Read TArray object from buffer. More...
 
static void WriteArray (TBuffer &b, const TArray *a)
 Write TArray object to buffer. More...
 
- Protected Member Functions inherited from TArray
Bool_t BoundsOk (const char *where, Int_t at) const
 
Bool_t OutOfBoundsError (const char *where, Int_t i) const
 Generate an out-of-bounds error. Always returns false.
 
Inheritance diagram for TArrayC:
[legend]

Member Function Documentation

◆ Adopt()

void TArrayC::Adopt ( Int_t  n,
Char_t *  arr 
)

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.

Definition at line 81 of file TArrayC.cxx.

◆ Set() [1/2]

void TArrayC::Set ( Int_t  n)
virtual

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.

Implements TArray.

Definition at line 105 of file TArrayC.cxx.

◆ Set() [2/2]

void TArrayC::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.

Definition at line 129 of file TArrayC.cxx.

Libraries for TArrayC:
[legend]

The documentation for this class was generated from the following files: