mn::queue::basic_binaryqueue Class Reference
Binary queue with overwrite. This queue can only hold one item. If sucessive Enqueue operations are called, that item is overwritten with whatever the last item was. More...
#include <mn_binaryqueue.hpp>


Public Member Functions | |
basic_binaryqueue (unsigned int itemSize) | |
Construct a new basic binaryqueue object. More... | |
virtual int | enqueue (void *item, unsigned int timeout=-1) |
![]() | |
basic_queue (unsigned int maxItems, unsigned int itemSize) | |
virtual | ~basic_queue () |
virtual int | create () |
virtual int | destroy () |
virtual int | peek (void *item, unsigned int timeout=MN_THREAD_CONFIG_TIMEOUT_QUEUE_DEFAULT) |
virtual int | dequeue (void *item, unsigned int timeout=MN_THREAD_CONFIG_TIMEOUT_QUEUE_DEFAULT) |
virtual bool | is_empty () |
virtual bool | is_full () |
virtual int | clear () |
virtual unsigned int | get_num_items () |
virtual unsigned int | get_left () |
void * | get_handle () |
Additional Inherited Members | |
![]() | |
void * | m_pHandle |
unsigned int | m_imaxItems |
unsigned int | m_iitemSize |
Detailed Description
Binary queue with overwrite. This queue can only hold one item. If sucessive Enqueue operations are called, that item is overwritten with whatever the last item was.
Constructor & Destructor Documentation
◆ basic_binaryqueue()
|
inlineexplicit |
Construct a new basic binaryqueue object.
- Parameters
-
itemSize Size of an item in a queue.
Member Function Documentation
◆ enqueue()
|
virtual |
Add an item to the queue.
- Parameters
-
item The item you are adding. timeout not use
- Returns
- ERR_QUEUE_OK The item in the queue overwrited
- ERR_QUEUE_NOTCREATED The queue was not created, please call the function create first
Reimplemented from mn::queue::basic_queue.
The documentation for this class was generated from the following files: