A thread-safe, blocking queue for ICommand buffers.
More...
#include <commandQueue.h>
A thread-safe, blocking queue for ICommand buffers.
Definition at line 33 of file commandQueue.h.
CO_API co::CommandQueue::CommandQueue |
( |
const size_t |
maxSize = ULONG_MAX | ) |
|
|
explicit |
Construct a new command queue.
- Parameters
-
maxSize | the maximum number of enqueued commands. |
- Version
- 1.0
virtual CO_API co::CommandQueue::~CommandQueue |
( |
| ) |
|
|
virtual |
Destruct a new command queue.
- Version
- 1.0
CO_API void co::CommandQueue::flush |
( |
| ) |
|
Flush all pending commands.
- Version
- 1.0
CO_API size_t co::CommandQueue::getSize |
( |
| ) |
const |
- Returns
- the size of the queue.
- Version
- 1.0
CO_API bool co::CommandQueue::isEmpty |
( |
| ) |
const |
- Returns
true
if the command queue is empty, false
if not.
- Version
- 1.0
virtual CO_API ICommand co::CommandQueue::pop |
( |
const uint32_t |
timeout = LB_TIMEOUT_INDEFINITE | ) |
|
|
virtual |
Pop a command from the queue.
- Parameters
-
timeout | the time in ms to wait for the operation. |
- Returns
- the next command in the queue.
- Exceptions
-
- Version
- 1.0
virtual CO_API ICommands co::CommandQueue::popAll |
( |
const uint32_t |
timeout = LB_TIMEOUT_INDEFINITE | ) |
|
|
virtual |
Pop all, but at least one command from the queue.
- Parameters
-
timeout | the time in ms to wait for the operation. |
- Returns
- one or more commands in the queue.
- Exceptions
-
- Version
- 1.0
virtual CO_API void co::CommandQueue::push |
( |
const ICommand & |
command | ) |
|
|
virtual |
Push a command to the queue.
- Parameters
-
- Version
- 1.0
virtual CO_API void co::CommandQueue::pushFront |
( |
const ICommand & |
command | ) |
|
|
virtual |
Push a command to the front of the queue.
- Version
- 1.0
virtual CO_API ICommand co::CommandQueue::tryPop |
( |
| ) |
|
|
virtual |
Try to pop a command from the queue.
- Returns
- the next command in the queue, or 0 if no command is queued.
- Version
- 1.0
The documentation for this class was generated from the following file: