template ABA_RING implements a bounded circular list with the property that if the list is full and an element is inserted the oldest element of the ring is removed
#include <ring.h>
Inheritance diagram for ABA_RING< Type >::
|
The destructor.
The operator [] is overloaded for constant use.
The output operator writes the elements of the ring to an output stream starting with the oldest element in the ring.
template ABA_RING implements a bounded circular list with the property that if the list is full and an element is inserted the oldest element of the ring is removed
Definition at line 49 of file ring.h.
The constructor.
The destructor.
template<class Type> Type& ABA_RING< Type >::operator[ ] (int i)
The i-th element of the ring. The operation is undefined if no element has been inserted in the i-th position so far.
template<class Type> const Type& ABA_RING< Type >::operator[ ] (int i) const
The operator [] is overloaded for constant use.
Inserts a new element into the ring.
If the ring is already full, this operation overwrites the oldest element in the ring.
The size of the ring.
The current number of elements in the ring.
The oldest element in the ring.
The result is undefined, if the ring is empty.
The index of the oldest element in the ring.
The result is undefined, if the ring is empty.
The newest element in the ring.
The result is undefined if the ring is empty.
The index of the newest element in the ring.
The result is undefined if the ring is empty.
Can be used to access any element between the oldest and newest inserted element.
0 If there are enough elements in the ring such that the element i entries before the newest one could be accessed,
1 otherwise.
true If no element is contained in the ring,
false otherwise.
true If the ABA_RING is completely filled up,
false otherwise.
Changes the length of the ring.
The output operator writes the elements of the ring to an output stream starting with the oldest element in the ring.
A reference to the output stream.
A pointer to the corresponding global object.
Definition at line 177 of file ring.h.
{An array storing the elements of the ring.
Definition at line 181 of file ring.h.
The position in the array ring_ where the next element will be inserted.
Definition at line 185 of file ring.h.
This member becomes true if ring is completely filled up.
Definition at line 189 of file ring.h.
The documentation for this class was generated from the following file: