Embedded Template Library 1.0
Loading...
Searching...
No Matches
etl::iqueue_lockable< T, VMemory_Model > Class Template Reference

This is the base for all queues that contain a particular type. More...

#include <queue_lockable.h>

Public Types

typedef T value_type
 The type stored in the queue.
typedef T & reference
 A reference to the type used in the queue.
typedef const T & const_reference
 A const reference to the type used in the queue.
typedef base_t::size_type size_type
 The type used for determining the size of the queue.
Public Types inherited from etl::queue_lockable_base< etl::memory_model::MEMORY_MODEL_LARGE >
typedef etl::size_type_lookup< VMemory_Model >::type size_type
 The type used for determining the size of queue.

Public Member Functions

bool push_unlocked (const_reference value)
 Push a value to the queue without locking.
bool push (const_reference value)
 Push a value to the queue.
template<typename T1>
bool emplace_unlocked (const T1 &value1)
 Constructs a value in the queue 'in place'.
template<typename T1, typename T2>
bool emplace_unlocked (const T1 &value1, const T2 &value2)
 Constructs a value in the queue 'in place'.
template<typename T1, typename T2, typename T3>
bool emplace_unlocked (const T1 &value1, const T2 &value2, const T3 &value3)
 Constructs a value in the queue 'in place'.
template<typename T1, typename T2, typename T3, typename T4>
bool emplace_unlocked (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4)
 Constructs a value in the queue 'in place'.
bool emplace ()
 Constructs a value in the queue 'in place'.
template<typename T1>
bool emplace (const T1 &value1)
 Constructs a value in the queue 'in place'.
template<typename T1, typename T2>
bool emplace (const T1 &value1, const T2 &value2)
 Constructs a value in the queue 'in place'.
template<typename T1, typename T2, typename T3>
bool emplace (const T1 &value1, const T2 &value2, const T3 &value3)
 Constructs a value in the queue 'in place'.
template<typename T1, typename T2, typename T3, typename T4>
bool emplace (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4)
 Constructs a value in the queue 'in place'.
bool pop_unlocked ()
 Pop a value from the queue without locking, and discard.
bool pop ()
 Pop a value from the queue and discard.
bool pop_unlocked (reference value)
 Pop a value from the queue without locking.
bool pop (reference value)
 Pop a value from the queue.
reference front_unlocked ()
 Peek a value at the front of the queue without locking.
const_reference front_unlocked () const
 Peek a value at the front of the queue without locking.
reference front ()
 Peek a value at the front of the queue.
const_reference front () const
 Peek a value at the front of the queue.
void clear_unlocked ()
 Clear the queue, unlocked.
void clear ()
 Clear the queue.
Public Member Functions inherited from etl::queue_lockable_base< etl::memory_model::MEMORY_MODEL_LARGE >
virtual ~queue_lockable_base ()
 Destructor.
size_type available_unlocked () const
size_type available () const
 How much free space available in the queue.
bool empty_unlocked () const
bool empty () const
 Is the queue empty?
bool full_unlocked () const
bool full () const
 Is the queue full?
size_type size_unlocked () const
size_type size () const
 How many items in the queue?
size_type capacity () const
 How many items can the queue hold.
size_type max_size () const
 How many items can the queue hold.

Protected Member Functions

 iqueue_lockable (T *p_buffer_, size_type max_size_)
 The constructor that is called from derived classes.
Protected Member Functions inherited from etl::queue_lockable_base< etl::memory_model::MEMORY_MODEL_LARGE >
 queue_lockable_base (size_type max_size_)
virtual void lock () const=0
 The pure virtual lock and unlock functions.
virtual void unlock () const=0

Additional Inherited Members

Static Protected Member Functions inherited from etl::queue_lockable_base< etl::memory_model::MEMORY_MODEL_LARGE >
static size_type get_next_index (size_type index, size_type maximum)
 Calculate the next index.
Protected Attributes inherited from etl::queue_lockable_base< etl::memory_model::MEMORY_MODEL_LARGE >
size_type write_index
 Where to input new data.
size_type read_index
 Where to get the oldest data.
size_type current_size
 The current size of the queue.
const size_type Max_Size
 The maximum number of items in the queue.

Detailed Description

template<typename T, const size_t VMemory_Model = etl::memory_model::MEMORY_MODEL_LARGE>
class etl::iqueue_lockable< T, VMemory_Model >

This is the base for all queues that contain a particular type.

Normally a reference to this type will be taken from a derived queue_lockable. This queue supports concurrent access by one producer and one consumer.

Template Parameters
TThe type of value that the queue_lockable holds.

The documentation for this class was generated from the following file: