Nebula
Loading...
Searching...
No Matches
Util::ArrayQueue< TYPE > Class Template Reference

#include <arrayqueue.h>

Public Member Functions

 ArrayQueue ()
 constructor
 
 ArrayQueue (const ArrayQueue< TYPE > &rhs)
 copy constructor
 
 ArrayQueue (ArrayQueue< TYPE > &&rhs)
 move constructor
 
 ArrayQueue (const Array< TYPE > &rhs)
 conversion constructor for array
 
void operator= (const ArrayQueue< TYPE > &rhs)
 assignment operator
 
void operator= (ArrayQueue< TYPE > &&rhs)
 move assignment operator
 
TYPE & operator[] (IndexT index) const
 access element by index, 0 is the frontmost element (next to be dequeued)
 
bool operator== (const ArrayQueue< TYPE > &rhs) const
 equality operator
 
bool operator!= (const ArrayQueue< TYPE > &rhs) const
 inequality operator
 
void Reserve (SizeT num)
 increase capacity to fit N more elements into the queue
 
SizeT Size () const
 returns number of elements in the queue
 
bool IsEmpty () const
 return true if queue is empty
 
void Clear ()
 remove all elements from the queue
 
bool Contains (const TYPE &e) const
 return true if queue contains element
 
void EraseIndex (const IndexT i)
 erase element at index
 
void Enqueue (const TYPE &e)
 add element to the back of the queue
 
TYPE Dequeue ()
 remove the element from the front of the queue
 
TYPE & Peek () const
 access to element at front of queue without removing it
 

Protected Attributes

Array< TYPE > queueArray
 

Constructor & Destructor Documentation

◆ ArrayQueue() [1/4]

template<class TYPE >
Util::ArrayQueue< TYPE >::ArrayQueue ( )

constructor

◆ ArrayQueue() [2/4]

template<class TYPE >
Util::ArrayQueue< TYPE >::ArrayQueue ( const ArrayQueue< TYPE > & rhs)

copy constructor

◆ ArrayQueue() [3/4]

template<class TYPE >
Util::ArrayQueue< TYPE >::ArrayQueue ( ArrayQueue< TYPE > && rhs)

move constructor

◆ ArrayQueue() [4/4]

template<class TYPE >
Util::ArrayQueue< TYPE >::ArrayQueue ( const Array< TYPE > & rhs)

conversion constructor for array

Member Function Documentation

◆ Clear()

template<class TYPE >
void Util::ArrayQueue< TYPE >::Clear ( )

remove all elements from the queue

◆ Contains()

template<class TYPE >
bool Util::ArrayQueue< TYPE >::Contains ( const TYPE & e) const

return true if queue contains element

◆ Dequeue()

template<class TYPE >
TYPE Util::ArrayQueue< TYPE >::Dequeue ( )

remove the element from the front of the queue

◆ Enqueue()

template<class TYPE >
void Util::ArrayQueue< TYPE >::Enqueue ( const TYPE & e)

add element to the back of the queue

◆ EraseIndex()

template<class TYPE >
void Util::ArrayQueue< TYPE >::EraseIndex ( const IndexT i)

erase element at index

◆ IsEmpty()

template<class TYPE >
bool Util::ArrayQueue< TYPE >::IsEmpty ( ) const

return true if queue is empty

◆ operator!=()

template<class TYPE >
bool Util::ArrayQueue< TYPE >::operator!= ( const ArrayQueue< TYPE > & rhs) const

inequality operator

◆ operator=() [1/2]

template<class TYPE >
void Util::ArrayQueue< TYPE >::operator= ( ArrayQueue< TYPE > && rhs)

move assignment operator

◆ operator=() [2/2]

template<class TYPE >
void Util::ArrayQueue< TYPE >::operator= ( const ArrayQueue< TYPE > & rhs)

assignment operator

◆ operator==()

template<class TYPE >
bool Util::ArrayQueue< TYPE >::operator== ( const ArrayQueue< TYPE > & rhs) const

equality operator

◆ operator[]()

template<class TYPE >
TYPE & Util::ArrayQueue< TYPE >::operator[] ( IndexT index) const

access element by index, 0 is the frontmost element (next to be dequeued)

◆ Peek()

template<class TYPE >
TYPE & Util::ArrayQueue< TYPE >::Peek ( ) const

access to element at front of queue without removing it

◆ Reserve()

template<class TYPE >
void Util::ArrayQueue< TYPE >::Reserve ( SizeT num)

increase capacity to fit N more elements into the queue

◆ Size()

template<class TYPE >
SizeT Util::ArrayQueue< TYPE >::Size ( ) const

returns number of elements in the queue

Member Data Documentation

◆ queueArray

template<class TYPE >
Array<TYPE> Util::ArrayQueue< TYPE >::queueArray
protected

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