#include <recycler.h>
Public Member Functions | |
| Recycler (unsigned int sz) | |
| ~Recycler () | |
| bool | full () const |
| bool | empty () const |
| int | available () const |
| int | used () const |
| Buffer * | next () |
| Buffer * | get () |
| void | add () |
| void | done () |
| void | clear () |
| unsigned int | size () const |
| QMutex * | mutex () |
| QWaitCondition * | cond () |
| bool | blocked () |
| Recycler::Recycler | ( | unsigned int | sz | ) |
Constructor.
| sz | Preferd total size of the all buffers in bytes. |
| Recycler::~Recycler | ( | ) |
Destructor.
| void Recycler::add | ( | ) |
Adds current buffer to queue.
| int Recycler::available | ( | ) | const |
Returns a number of available buffers.
| bool Recycler::blocked | ( | ) |
Returns true if the next buffer is used by output. Otherwise returns false.
| void Recycler::clear | ( | ) |
Clears queue.
| QWaitCondition* Recycler::cond | ( | ) | [inline] |
Returns wait condition pointer.
| void Recycler::done | ( | ) |
Removes current buffer from queue.
| bool Recycler::empty | ( | ) | const |
Returns true if queue if empty, otherwise returns false
| bool Recycler::full | ( | ) | const |
Returns true if queue if full, otherwise returns false
| Buffer* Recycler::get | ( | ) |
Returns current buffer for writing.
| QMutex* Recycler::mutex | ( | ) | [inline] |
Returns mutex pointer.
| Buffer* Recycler::next | ( | ) |
Returns next buffer in queue.
| unsigned int Recycler::size | ( | ) | const |
Returns size of all buffers in bytes.
| int Recycler::used | ( | ) | const |
Returns a number of used buffers.
1.5.9