20 #ifndef CO_COMMANDQUEUE_H
21 #define CO_COMMANDQUEUE_H
25 #include <lunchbox/thread.h>
30 namespace detail {
class CommandQueue; }
42 CO_API
explicit CommandQueue(
const size_t maxSize = ULONG_MAX );
65 CO_API
virtual ICommand pop(
const uint32_t timeout =
66 LB_TIMEOUT_INDEFINITE );
76 LB_TIMEOUT_INDEFINITE );
100 virtual void pump() {};
102 LB_TS_VAR( _thread );
105 detail::CommandQueue*
const _impl;
109 #endif //CO_COMMANDQUEUE_H
Defines export visibility macros for library Collage.
std::vector< ICommand > ICommands
A vector of input commands.
A thread-safe, blocking queue for ICommand buffers.
virtual CO_API ICommand pop(const uint32_t timeout=LB_TIMEOUT_INDEFINITE)
Pop a command from the queue.
virtual CO_API ICommands popAll(const uint32_t timeout=LB_TIMEOUT_INDEFINITE)
Pop all, but at least one command from the queue.
CO_API void flush()
Flush all pending commands.
A class managing received commands.
virtual CO_API void push(const ICommand &command)
Push a command to the queue.
virtual CO_API void pushFront(const ICommand &command)
Push a command to the front of the queue.
CO_API CommandQueue(const size_t maxSize=ULONG_MAX)
Construct a new command queue.
CO_API size_t getSize() const
virtual CO_API ICommand tryPop()
Try to pop a command from the queue.
virtual CO_API ~CommandQueue()
Destruct a new command queue.
CO_API bool isEmpty() const