In file table.hpp:

template<class T> class DynamicTable

A dynamic table class.

Documentation

A dynamic table class.

A DynamicTable contains entries of variable size. Entry size can be dynamically increased.


Inheritance:


Public Methods

[more] DynamicTable(int size = 0)
Creates table of size size
[more] DynamicTable(const ARRAY<int> & entrysizes)
Creates table with a priori fixed entry sizes
[more]void Add(int i, const T & acont)
Inserts element acont into row i.
[more]void AddEmpty(int i)
Inserts element acont into row i.
[more]void Set(int i, int nr, const T & acont)
Set the nr-th element in the i-th row to acont.
[more]const T& Get(int i, int nr) const
Returns the nr-th element in the i-th row.
[more]const T* GetLine(int i) const
Returns pointer to the first element in row i.
[more]int Size() const
Returns size of the table
[more]int EntrySize(int i) const
Returns size of the i-th row
[more]void DecEntrySize(int i)
[more]FlatArray<T> operator[] (int i)
Access entry i
[more]ConstFlatArray operator[] (int i) const
Access entry i


Inherited from BaseDynamicTable:

Public Methods

ovoid SetSize(int size)
ovoid IncSize(int i, int elsize)

Protected Fields

oARRAY<linestruct> data
ochar* oneblock

Protected Members

ostruct linestruct

o DynamicTable(int size = 0)
Creates table of size size

o DynamicTable(const ARRAY<int> & entrysizes)
Creates table with a priori fixed entry sizes

ovoid Add(int i, const T & acont)
Inserts element acont into row i. Does not test if already used.

ovoid AddEmpty(int i)
Inserts element acont into row i. Does not test if already used.

ovoid Set(int i, int nr, const T & acont)
Set the nr-th element in the i-th row to acont. Does not check for overflow.

oconst T& Get(int i, int nr) const
Returns the nr-th element in the i-th row. Does not check for overflow.

oconst T* GetLine(int i) const
Returns pointer to the first element in row i.

oint Size() const
Returns size of the table

oint EntrySize(int i) const
Returns size of the i-th row

ovoid DecEntrySize(int i)

oFlatArray<T> operator[] (int i)
Access entry i

oConstFlatArray operator[] (int i) const
Access entry i


Direct child classes:
IntTable

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.