|
Public Types |
typedef char | byte_type |
| The type of the bytes stored in the buffer.
|
typedef byte_type * | iterator |
| Iterator type for this container.
|
typedef const byte_type * | const_iterator |
| Constant iterator type for this container.
|
typedef size_t | size_type |
| The type used for offsets into the buffer.
|
Public Member Functions |
| fixed_buffer () |
| Constructor.
|
void | clear () |
| Clear the buffer.
|
iterator | begin () |
| Return a pointer to the beginning of the unread data.
|
const_iterator | begin () const |
| Return a pointer to the beginning of the unread data.
|
byte_type & | front () |
| Get the byte at the front of the buffer.
|
const byte_type & | front () const |
| Get the byte at the front of the buffer.
|
iterator | end () |
| Return a pointer to one past the end of the unread data.
|
const_iterator | end () const |
| Return a pointer to one past the end of the unread data.
|
byte_type & | back () |
| Get the byte at the back of the buffer.
|
const byte_type & | back () const |
| Get the byte at the back of the buffer.
|
byte_type & | operator[] (size_type offset) |
| Get the byte at the given offset in the buffer.
|
const byte_type & | operator[] (size_type offset) const |
| Get the byte at the given offset in the buffer.
|
bool | empty () const |
| Is there no unread data in the buffer.
|
size_type | size () const |
| Return the amount of unread data the is in the buffer.
|
void | resize (size_type length) |
| Resize the buffer to the specified length.
|
size_type | capacity () const |
| Return the maximum size for data in the buffer.
|
void | pop () |
| Pop a single byte from the beginning of the buffer.
|
void | pop (size_type count) |
| Pop multiple bytes from the beginning of the buffer.
|
void | push (const byte_type &b) |
| Push a single byte on to the end of the buffer.
|
void | push (const byte_type &b, size_t count) |
| Push the same byte on to the buffer a certain number of times.
|
Private Attributes |
byte_type | buffer_ [Buffer_Size] |
| The data in the buffer.
|
size_type | begin_offset_ |
| The offset to the beginning of the unread data.
|
size_type | end_offset_ |
| The offset to the end of the unread data.
|