mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE > Class Template Reference

A basic wrapper for the MiniLib deque's as Template deque. More...

#include <mn_deque.hpp>

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

Public Types

using deque_type = mn::queue::deque_t
 
using value_type = T
 
using pointer = T *
 
using reference = T &
 
using const_reference = const T &
 
using self_type = basic_deque< T, TMAXITEMS, TITEMSIZE >
 
using iterator = basic_deque_iterator< T, deque_type >
 
using const_iterator = const iterator
 
using size_type = mn::size_t
 

Public Member Functions

 basic_deque ()
 Construct a new basic queue object. More...
 
 basic_deque (const self_type &other)
 
 ~basic_deque ()
 Destroy the basic queue object. More...
 
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 front () const
 
reference front ()
 
const_reference back () const
 
reference back ()
 
void push_back (reference _Element)
 Push a element to the end of the queue. More...
 
void push_front (reference _Element)
 Push a element to the front of the queue. More...
 
pointer pop_front ()
 Pop the oldest entry from the queue. More...
 
void clear ()
 Clear the queue. More...
 
const bool empty () const
 Check, if queue is empty. More...
 
const mn::size_t length () const
 How many items can queue. More...
 
const mn::size_t size () const
 
const mn::size_t left () const
 
void swap (const self_type &other)
 
self_typeoperator= (const self_type &other)
 

Private Member Functions

T * intern_getfront ()
 

Private Attributes

deque_type m_deque
 
pointer m_pEnd
 
pointer m_pFront
 

Detailed Description

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

A basic wrapper for the MiniLib deque's as Template deque.

Template Parameters
TThe type of an element
TMAXITEMSMaximal items can queue
TITEMSIZEA size of a item

Member Typedef Documentation

◆ const_iterator

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

◆ const_reference

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

◆ deque_type

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
using mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::deque_type = mn::queue::deque_t

◆ iterator

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
using mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::iterator = basic_deque_iterator<T, deque_type>

◆ pointer

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

◆ reference

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

◆ self_type

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

◆ size_type

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
using mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::size_type = mn::size_t

◆ value_type

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

Constructor & Destructor Documentation

◆ basic_deque() [1/2]

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

Construct a new basic queue object.

◆ basic_deque() [2/2]

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

◆ ~basic_deque()

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

Destroy the basic queue object.

Member Function Documentation

◆ back() [1/2]

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
reference mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::back ( )
inline

◆ back() [2/2]

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
const_reference mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::back ( ) const
inline

◆ begin() [1/2]

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

Get the begin iterator.

Returns
The begin iterator

◆ begin() [2/2]

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

Get the begin iterator.

Returns
The begin iterator

◆ clear()

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

Clear the queue.

◆ empty()

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
const bool mn::container::basic_deque< T, TMAXITEMS, 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 TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
iterator mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::end ( )
inline

Get the end iterator.

Returns
The end iterator

◆ end() [2/2]

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

Get the end iterator.

Returns
The end iterator

◆ front() [1/2]

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
reference mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::front ( )
inline

◆ front() [2/2]

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
const_reference mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::front ( ) const
inline

◆ intern_getfront()

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
T* mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::intern_getfront ( )
inlineprivate

◆ left()

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
const mn::size_t mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::left ( ) const
inline

How many empty spaves are currently left in the queue.

Returns
the number of remaining spaces.

◆ length()

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
const mn::size_t mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::length ( ) const
inline

How many items can queue.

Returns
The maximal number of entries can queue

◆ operator=()

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

◆ pop_front()

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
pointer mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::pop_front ( )
inline

Pop the oldest entry from the queue.

Returns
The oldest entry from the queue

◆ push_back()

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
void mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::push_back ( reference  _Element)
inline

Push a element to the end of the queue.

Parameters
pElementThe element

◆ push_front()

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
void mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::push_front ( reference  _Element)
inline

Push a element to the front of the queue.

Parameters
pElementThe element

◆ size()

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
const mn::size_t mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::size ( ) const
inline

How many items are currently in the queue.

Returns
the number of items in the queue.

◆ swap()

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

Member Data Documentation

◆ m_deque

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
deque_type mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::m_deque
private

◆ m_pEnd

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
pointer mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::m_pEnd
private

◆ m_pFront

template<class T , mn::size_t TMAXITEMS, mn::size_t TITEMSIZE = sizeof(T)>
pointer mn::container::basic_deque< T, TMAXITEMS, TITEMSIZE >::m_pFront
private

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