class implements a buffer by an array and storing the number of already buffered elements.
#include <buffer.h>
Inheritance diagram for ABA_BUFFER< Type >::
|
The destructor.
Removes the components listed in the buffer ind by shifting the remaining components to the left.
The length of a buffer can be changed with the function realloc(). If the size of the buffer is increased all buffered elements are copied. If the size is decreased the number of buffered elements is updated if necessary.
The output operator writes all buffered elements line by line to an output stream in the format { number\/}{ : }{ value\/}.
class implements a buffer by an array and storing the number of already buffered elements.
Definition at line 61 of file buffer.h.
The constructor generates an empty buffer.
The copy constructor.
The destructor.
The assignment operator is only allowed between buffers having equal size.
A reference to the buffer on the left hand side of the assignment operator.
template<class Type> Type& ABA_BUFFER< Type >::operator[ ] (int i)
The operator [] can be used to access an element of the buffer.
It is only allowed to access buffered elements. Otherwise, if the function is compiled with -DABACUSSAFE the program stops with an error message.
The i-th element of the buffer.
template<class Type> const Type& ABA_BUFFER< Type >::operator[ ] (int i) const
The operator [] is overloaded that it can be also used to access elements of constant buffers.
The maximal number of elements which can be stored in the buffer.
The number of buffered elements.
true If no more elements can be inserted into the buffer,
false otherwise.
true If no items are buffered,
false otherwise.
Inserts an item into the buffer.
It is a fatal error to perform this operation if the buffer is full.
In this case the program stops with an error message if this function is compiled with -DABACUSSAFE.
Removes and returns the last inserted item from the buffer.
It is a fatal error to perform this operation on an empty buffer.
In this case the program stops with an error message if this function is compiled with -DABACUSSAFE.
The last item that has been inserted into the buffer.
Sets the number of buffered items to 0 such that the buffer is empty.
Removes the components listed in the buffer ind by shifting the remaining components to the left.
The values stored in ind have to be upward sorted. Memory management of the removed components must be carefully implemented by the user of this function to avoid memory leaks.
If this function is compiled with -DABACUSSAFE then it is checked if each value of ind is in the range 0„ number()-1.
The length of a buffer can be changed with the function realloc(). If the size of the buffer is increased all buffered elements are copied. If the size is decreased the number of buffered elements is updated if necessary.
The output operator writes all buffered elements line by line to an output stream in the format { number\/}{ : }{ value\/}.
A reference to the stream the buffer is written to.
A pointer to the corresponding global object.
Definition at line 219 of file buffer.h.
The maximal number of elements which can be stored in the buffer.
Definition at line 223 of file buffer.h.
The number of buffered elements.
Definition at line 227 of file buffer.h.
The /-style array storing the buffered elements.
Definition at line 231 of file buffer.h.
The documentation for this class was generated from the following file: