#include <cbuffer.h>
Inheritance diagram for cbuffer< T, A >:

Public Methods | |
| cbuffer (const size_type capacity=0, const T &def=T()) | |
| Construct a circular buffer, specifying the capacity. | |
| ~cbuffer () | |
| Destructor. | |
| size_type | capacity () const |
| Get the buffer capacity (maximim size). | |
| size_type | size () const |
| Get the buffer size. | |
| bool | empty () const |
| Is the buffer empty? | |
| bool | full () const |
| Is the buffer full? | |
| void | push_front (const T &x) |
| Push an item to the front of the buffer. | |
| void | push_back (const T &x) |
| Push an item to the back of the buffer. | |
| void | pop_front () |
| Erase the item at the front of the buffer. | |
| void | pop_back () |
| Erase the item at the back of the buffer. | |
| T & | front () |
| Access the front item. | |
| const T & | front () const |
| Access the front item. | |
| T & | back () |
| Access the back item. | |
| const T & | back () const |
| Access the back item. | |
| T & | operator[] (const size_type i) |
| Access the i'th item in the buffer. | |
| const T & | operator[] (const size_type i) const |
| Access the i'th item in the buffer. | |
| void | leftShift () |
| Shift the contents left. | |
| void | rightShift () |
| Shift the contents right. | |
| void | clear () |
| Clear the buffer. | |
| void | swap (cbuffer< T, A > &buffer) |
| Swap the contents of this buffer with another. | |
| void | resize (const size_type cap) |
| Resize the (capacity) of the buffer. | |
iterator and const_iterator implementation
Should objects be deleted as needed, or on demand?
Semantics for circular buffer of zero size?
Definition at line 46 of file cbuffer.h.
|
||||||||||||||||
|
Construct a circular buffer, specifying the capacity.
|
|
||||||||||
|
Push an item to the front of the buffer.
|
|
||||||||||
|
Push an item to the back of the buffer.
|
|
||||||||||
|
Resize the (capacity) of the buffer.
|
1.2.18