Copyies the state of anotherBuffer as well as its contents.
~CircularBuffer();
Deletes the allocated space for the buffer.
int capacity(void) const;
Returns the number of items which can be added to the buffer. Returns a positive number if the buffer has empty locations available. Returns 0 if the buffer is 100% full. Returns a negative number if the buffer has overflowed.
type extract(void);
Reads the next value from the buffer and advances the read index.
int getCount(void) const;
Returns the number of elements between the write index and the read index.
int getSize(void) const;
Returns the allocated size of the buffer which is equal to the maximum number of values which can be stored in the buffer.
void insert(const type& aMessage);
Add an element to the circular buffer which will advance the write index by 1.
type& operator[](int index);
Accesor to an element relative to the currently written element.
Throws out all previous data and sets the read/write/count values to an initial state. The allocation size must be valid before this function is called.
void setSize(int aSize);
Changes the allocation size of the buffer. All previous values in the buffer will be lost.