template <class T> class Array : public BaseArray

Abstract data type Array

Inheritance:


Public Methods

inline Array(int asize = 0, int ainc = 0)
Creates array of asize elements
inline ~Array()
inline int Size() const
Logical size of the array
inline void SetSize(int nsize)
Change logical size of the array, keep existing entries
inline void SetAllocSize(int nallocsize)
Change allocated size
inline T& operator[] (int i)
access element
inline const T& operator[] (int i) const
access const element
inline int Append(const T & el)
append element to array, resize if necessary
inline T& Last()
return the last element in the array
inline int Union(const T & el)
append element when it is not yet in the array, return index
inline void DeleteElement(int i)
delete element i, move last one to position i
inline void DeleteLast()
delete last element of array
inline void DeleteAll()
delete whole array

Inherited from BaseArray:

Protected Fields

void* data
int size
int allocsize
int inc

Protected Methods

void ReSize(int minsize, int elementsize)

Documentation

Abstract data type Array.

Array<T> is an automatically increasing array containing elements of the generic type T. The allocated size may be larger then the logical size of the array. The elements can be accessed by the [] operator, the range is 0 to size-1.

inline Array(int asize = 0, int ainc = 0)
Creates array of asize elements

inline ~Array()

inline int Size() const
Logical size of the array

inline void SetSize(int nsize)
Change logical size of the array, keep existing entries

inline void SetAllocSize(int nallocsize)
Change allocated size

inline T& operator[] (int i)
access element

inline const T& operator[] (int i) const
access const element

inline int Append(const T & el)
append element to array, resize if necessary

inline T& Last()
return the last element in the array

inline int Union(const T & el)
append element when it is not yet in the array, return index

inline void DeleteElement(int i)
delete element i, move last one to position i

inline void DeleteLast()
delete last element of array

inline void DeleteAll()
delete whole array


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de