|
MPD
0.20.15
|
A reference to a memory area that is writable. More...
#include <Silence.hxx>
Public Types | |
| typedef size_t | size_type |
| typedef T & | reference_type |
| typedef const T & | const_reference_type |
| typedef T * | pointer_type |
| typedef const T * | const_pointer_type |
| typedef pointer_type | iterator |
| typedef const_pointer_type | const_iterator |
Public Member Functions | |
| WritableBuffer ()=default | |
| constexpr | WritableBuffer (std::nullptr_t) |
| constexpr | WritableBuffer (pointer_type _data, size_type _size) |
| constexpr WritableBuffer< void > | ToVoid () const |
| constexpr bool | IsNull () const |
| constexpr bool | IsEmpty () const |
| constexpr iterator | begin () const |
| constexpr iterator | end () const |
| constexpr const_iterator | cbegin () const |
| constexpr const_iterator | cend () const |
| reference_type | operator[] (size_type i) const |
| reference_type | front () const |
| Returns a reference to the first element. More... | |
| reference_type | back () const |
| Returns a reference to the last element. More... | |
| void | pop_front () |
| Remove the first element (by moving the head pointer, does not actually modify the buffer). More... | |
| void | pop_back () |
| Remove the last element (by moving the tail pointer, does not actually modify the buffer). More... | |
| reference_type | shift () |
| Remove the first element and return a reference to it. More... | |
| void | skip_front (size_type n) |
Static Public Member Functions | |
| static constexpr WritableBuffer | Null () |
| static WritableBuffer< T > | FromVoid (WritableBuffer< void > other) |
| Cast a WritableBuffer<void> to a WritableBuffer<T>. More... | |
Data Fields | |
| pointer_type | data |
| size_type | size |
A reference to a memory area that is writable.
Definition at line 27 of file Silence.hxx.
| typedef const_pointer_type WritableBuffer< T >::const_iterator |
Definition at line 88 of file WritableBuffer.hxx.
| typedef const T* WritableBuffer< T >::const_pointer_type |
Definition at line 86 of file WritableBuffer.hxx.
| typedef const T& WritableBuffer< T >::const_reference_type |
Definition at line 84 of file WritableBuffer.hxx.
| typedef pointer_type WritableBuffer< T >::iterator |
Definition at line 87 of file WritableBuffer.hxx.
| typedef T* WritableBuffer< T >::pointer_type |
Definition at line 85 of file WritableBuffer.hxx.
| typedef T& WritableBuffer< T >::reference_type |
Definition at line 83 of file WritableBuffer.hxx.
| typedef size_t WritableBuffer< T >::size_type |
Definition at line 82 of file WritableBuffer.hxx.
|
default |
|
inline |
Definition at line 95 of file WritableBuffer.hxx.
|
inline |
Definition at line 97 of file WritableBuffer.hxx.
|
inline |
Returns a reference to the last element.
Buffer must not be empty.
Definition at line 183 of file WritableBuffer.hxx.
|
inline |
Definition at line 135 of file WritableBuffer.hxx.
|
inline |
Definition at line 143 of file WritableBuffer.hxx.
|
inline |
Definition at line 147 of file WritableBuffer.hxx.
|
inline |
Definition at line 139 of file WritableBuffer.hxx.
|
inlinestatic |
Cast a WritableBuffer<void> to a WritableBuffer<T>.
A "void" buffer records its size in bytes, and when casting to "T", the assertion below ensures that the size is a multiple of sizeof(T).
Definition at line 113 of file WritableBuffer.hxx.
|
inline |
Returns a reference to the first element.
Buffer must not be empty.
Definition at line 169 of file WritableBuffer.hxx.
|
inline |
Definition at line 131 of file WritableBuffer.hxx.
|
inline |
Definition at line 127 of file WritableBuffer.hxx.
|
inlinestatic |
Definition at line 100 of file WritableBuffer.hxx.
|
inline |
Definition at line 154 of file WritableBuffer.hxx.
|
inline |
Remove the last element (by moving the tail pointer, does not actually modify the buffer).
Buffer must not be empty.
Definition at line 205 of file WritableBuffer.hxx.
|
inline |
Remove the first element (by moving the head pointer, does not actually modify the buffer).
Buffer must not be empty.
Definition at line 194 of file WritableBuffer.hxx.
|
inline |
Remove the first element and return a reference to it.
Buffer must not be empty.
Definition at line 215 of file WritableBuffer.hxx.
|
inline |
Definition at line 221 of file WritableBuffer.hxx.
|
inline |
Definition at line 122 of file WritableBuffer.hxx.
| pointer_type WritableBuffer< T >::data |
Definition at line 90 of file WritableBuffer.hxx.
| size_type WritableBuffer< T >::size |
Definition at line 91 of file WritableBuffer.hxx.
1.8.14