mn::container::basic_binary_queue< T, TITEMSIZE > Class Template Reference

This queue can only hold one item. If sucessive push operations are called, that item is overwritten with whatever the last item was. More...

#include <mn_biqueue.hpp>

+ Collaboration diagram for mn::container::basic_binary_queue< T, TITEMSIZE >:

Public Types

using queue_type = mn::queue::binaryqueue_t
 
using value_type = T
 
using pointer = T *
 
using reference = T &
 
using const_reference = const T &
 
using self_type = basic_binary_queue< T, TITEMSIZE >
 
using iterator = basic_binary_queue_iterator< T >
 
using const_iterator = const iterator
 

Public Member Functions

 basic_binary_queue ()
 
 basic_binary_queue (const self_type &other)
 
 ~basic_binary_queue ()
 
iterator begin ()
 Get the begin iterator. More...
 
iterator end ()
 Get the end iterator. More...
 
const_iterator begin () const
 Get the begin iterator. More...
 
const_iterator end () const
 Get the end iterator. More...
 
const_reference item () const
 
reference item ()
 
void push (reference _Element)
 Push a element to the queue. More...
 
pointer pop ()
 Pop the oldest entry from the queue. More...
 
void clear ()
 Clear the queue. More...
 
const bool empty () const
 Check, if queue is empty. More...
 
void swap (const self_type &other)
 
self_typeoperator= (const self_type &other)
 

Private Member Functions

T * intern_get ()
 

Private Attributes

queue_type m_BinQueue
 

Detailed Description

template<class T, mn::size_t TITEMSIZE = sizeof(T)>
class mn::container::basic_binary_queue< T, TITEMSIZE >

This queue can only hold one item. If sucessive push operations are called, that item is overwritten with whatever the last item was.

Template Parameters
TThe type of the value
TITEMSIZEThe size of one element

Member Typedef Documentation

◆ const_iterator

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
using mn::container::basic_binary_queue< T, TITEMSIZE >::const_iterator = const iterator

◆ const_reference

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
using mn::container::basic_binary_queue< T, TITEMSIZE >::const_reference = const T&

◆ iterator

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
using mn::container::basic_binary_queue< T, TITEMSIZE >::iterator = basic_binary_queue_iterator<T>

◆ pointer

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
using mn::container::basic_binary_queue< T, TITEMSIZE >::pointer = T*

◆ queue_type

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
using mn::container::basic_binary_queue< T, TITEMSIZE >::queue_type = mn::queue::binaryqueue_t

◆ reference

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
using mn::container::basic_binary_queue< T, TITEMSIZE >::reference = T&

◆ self_type

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
using mn::container::basic_binary_queue< T, TITEMSIZE >::self_type = basic_binary_queue<T, TITEMSIZE>

◆ value_type

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
using mn::container::basic_binary_queue< T, TITEMSIZE >::value_type = T

Constructor & Destructor Documentation

◆ basic_binary_queue() [1/2]

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
mn::container::basic_binary_queue< T, TITEMSIZE >::basic_binary_queue ( )
inline

◆ basic_binary_queue() [2/2]

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
mn::container::basic_binary_queue< T, TITEMSIZE >::basic_binary_queue ( const self_type other)
inline

◆ ~basic_binary_queue()

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
mn::container::basic_binary_queue< T, TITEMSIZE >::~basic_binary_queue ( )
inline

Member Function Documentation

◆ begin() [1/2]

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
iterator mn::container::basic_binary_queue< T, TITEMSIZE >::begin ( )
inline

Get the begin iterator.

Returns
The begin iterator

◆ begin() [2/2]

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
const_iterator mn::container::basic_binary_queue< T, TITEMSIZE >::begin ( ) const
inline

Get the begin iterator.

Returns
The begin iterator

◆ clear()

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
void mn::container::basic_binary_queue< T, TITEMSIZE >::clear ( )
inline

Clear the queue.

◆ empty()

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
const bool mn::container::basic_binary_queue< T, TITEMSIZE >::empty ( ) const
inline

Check, if queue is empty.

Returns
true The queue is empty and false when not

◆ end() [1/2]

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
iterator mn::container::basic_binary_queue< T, TITEMSIZE >::end ( )
inline

Get the end iterator.

Returns
The end iterator

◆ end() [2/2]

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
const_iterator mn::container::basic_binary_queue< T, TITEMSIZE >::end ( ) const
inline

Get the end iterator.

Returns
The end iterator

◆ intern_get()

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
T* mn::container::basic_binary_queue< T, TITEMSIZE >::intern_get ( )
inlineprivate

◆ item() [1/2]

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
reference mn::container::basic_binary_queue< T, TITEMSIZE >::item ( )
inline

◆ item() [2/2]

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
const_reference mn::container::basic_binary_queue< T, TITEMSIZE >::item ( ) const
inline

◆ operator=()

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
self_type& mn::container::basic_binary_queue< T, TITEMSIZE >::operator= ( const self_type other)
inline

◆ pop()

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
pointer mn::container::basic_binary_queue< T, TITEMSIZE >::pop ( )
inline

Pop the oldest entry from the queue.

Returns
The oldest entry from the queue

◆ push()

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
void mn::container::basic_binary_queue< T, TITEMSIZE >::push ( reference  _Element)
inline

Push a element to the queue.

Parameters
pElementThe element

◆ swap()

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
void mn::container::basic_binary_queue< T, TITEMSIZE >::swap ( const self_type other)
inline

Member Data Documentation

◆ m_BinQueue

template<class T , mn::size_t TITEMSIZE = sizeof(T)>
queue_type mn::container::basic_binary_queue< T, TITEMSIZE >::m_BinQueue
private

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