|
| | RingBuffer () |
| | Empty constructor. More...
|
| |
| | RingBuffer (size_t N) |
| | Constructs a ring buffer of size N. More...
|
| |
| | RingBuffer (const RingBuffer< Scalar > &other) |
| | Copy constructor, creates a reference to the other ring buffer. More...
|
| |
| virtual | ~RingBuffer () |
| | Destructor. More...
|
| |
| const RingBuffer< Scalar > & | operator= (const RingBuffer< Scalar > &other) |
| | Assigment operator, turns this buffer into a reference to the other ring buffer. More...
|
| |
| Scalar & | operator[] (int idx) |
| | Element access. More...
|
| |
| size_t | stored () const |
| | Returns the number of stored elements. More...
|
| |
| size_t | free () const |
| | Returns the number of free elements. More...
|
| |
| size_t | size () const |
| | Returns the size of the ring buffer. More...
|
| |
| bool | put (const Buffer< Scalar > &data) |
| | Puts the given elements into the ring buffer. More...
|
| |
| bool | take (const Buffer< Scalar > &dest, size_t N) |
| | Takes N elements from the buffer and stores them into dest. More...
|
| |
| void | drop (size_t N) |
| | Drops N elements from the ring buffer. More...
|
| |
| void | resize (size_t N) |
| | Resizes the ring buffer to N elements. More...
|
| |
| | RawRingBuffer () |
| | Empty constructor. More...
|
| |
| | RawRingBuffer (size_t size) |
| | Constructs a raw ring buffer with size size. More...
|
| |
| | RawRingBuffer (const RawRingBuffer &other) |
| | Copy constructor. More...
|
| |
| virtual | ~RawRingBuffer () |
| | Destructor. More...
|
| |
| const RawRingBuffer & | operator= (const RawRingBuffer &other) |
| | Assignment operator, turns this ring buffer into a reference to the other one. More...
|
| |
| char & | operator[] (int idx) |
| | Element access. More...
|
| |
| size_t | bytesLen () const |
| | Returns the number of bytes available for reading. More...
|
| |
| size_t | bytesFree () const |
| | Returns the number of free bytes in the ring buffer. More...
|
| |
| bool | put (const RawBuffer &src) |
| | Puts the given data into the ring-buffer. More...
|
| |
| bool | take (const RawBuffer &dest, size_t N) |
| | Take N bytes from the ring buffer and store it into the given buffer dest. More...
|
| |
| void | drop (size_t N) |
| | Drops at most N bytes from the buffer. More...
|
| |
| void | clear () |
| | Clear the ring-buffer. More...
|
| |
| void | resize (size_t N) |
| | Resizes the ring buffer. More...
|
| |
| | RawBuffer () |
| | Constructs an empty buffer. More...
|
| |
| | RawBuffer (char *data, size_t offset, size_t len) |
| | Constructor from unowned data. More...
|
| |
| | RawBuffer (size_t N, BufferOwner *owner=0) |
| | Constructs a buffer and allocates N bytes. More...
|
| |
| | RawBuffer (const RawBuffer &other) |
| | Copy constructor. More...
|
| |
| | RawBuffer (const RawBuffer &other, size_t offset, size_t len) |
| | Creates a new view on the buffer. More...
|
| |
| virtual | ~RawBuffer () |
| | Destructor. More...
|
| |
| const RawBuffer & | operator= (const RawBuffer &other) |
| | Assignment. More...
|
| |
| char * | ptr () const |
| | Returns the pointer to the data (w/o view). More...
|
| |
| char * | data () const |
| | Returns the pointer to the data of the buffer view. More...
|
| |
| size_t | bytesOffset () const |
| | Returns the offset of the data by the view. More...
|
| |
| size_t | bytesLen () const |
| | Returns the size of the buffer by the view. More...
|
| |
| size_t | storageSize () const |
| | Returns the raw buffer size in bytes. More...
|
| |
| bool | isEmpty () const |
| | Returns true if the buffer is invalid/empty. More...
|
| |
| void | ref () const |
| | Increment reference counter. More...
|
| |
| void | unref () |
| | Dereferences the buffer. More...
|
| |
| int | refCount () const |
| | Returns the reference counter. More...
|
| |
| bool | isUnused () const |
| | We assume here that buffers are owned by one object: A buffer is therefore "unused" if the owner holds the only reference to the buffer. More...
|
| |
template<class Scalar>
class sdr::RingBuffer< Scalar >
A simple typed ring-buffer.