ScummVM API documentation
Titanic::FixedQueue< T, MAX_SIZE > Class Template Reference

#include <fixed_queue.h>

Public Member Functions

size_type size () const
 
size_type freeSize () const
 
bool empty () const
 
bool full () const
 
void clear ()
 
void compact ()
 
void push (const T &v)
 
const T & top () const
 
T & top ()
 
pop ()
 
T & operator[] (size_type i)
 
const T & operator[] (size_type i) const
 

Protected Attributes

Common::Array< T > _data
 
size_type _topIndex
 

Detailed Description

template<class T, uint MAX_SIZE = 10>
class Titanic::FixedQueue< T, MAX_SIZE >

Extremly simple fixed size queue class.

Member Function Documentation

◆ size()

template<class T, uint MAX_SIZE = 10>
size_type Titanic::FixedQueue< T, MAX_SIZE >::size ( ) const
inline

Returns the size of the queue in use

◆ freeSize()

template<class T, uint MAX_SIZE = 10>
size_type Titanic::FixedQueue< T, MAX_SIZE >::freeSize ( ) const
inline

Returns the amount of free remaining space in the queue

◆ empty()

template<class T, uint MAX_SIZE = 10>
bool Titanic::FixedQueue< T, MAX_SIZE >::empty ( ) const
inline

Returns true if the queue is empty

◆ full()

template<class T, uint MAX_SIZE = 10>
bool Titanic::FixedQueue< T, MAX_SIZE >::full ( ) const
inline

Returns true if the queue is full

◆ clear()

template<class T, uint MAX_SIZE = 10>
void Titanic::FixedQueue< T, MAX_SIZE >::clear ( )
inline

Clears the queue

◆ compact()

template<class T, uint MAX_SIZE = 10>
void Titanic::FixedQueue< T, MAX_SIZE >::compact ( )
inline

If the tail of the queue in use has reached the end of the internal array, pushes all pending data back to the start of the array

◆ push()

template<class T, uint MAX_SIZE = 10>
void Titanic::FixedQueue< T, MAX_SIZE >::push ( const T &  v)
inline

Adds a value to the end of the queue

◆ top() [1/2]

template<class T, uint MAX_SIZE = 10>
const T& Titanic::FixedQueue< T, MAX_SIZE >::top ( ) const
inline

Returns the top value on the queue

◆ top() [2/2]

template<class T, uint MAX_SIZE = 10>
T& Titanic::FixedQueue< T, MAX_SIZE >::top ( )
inline

Returns the top value on the queue

◆ pop()

template<class T, uint MAX_SIZE = 10>
T Titanic::FixedQueue< T, MAX_SIZE >::pop ( )
inline

Pops the top value off the queue

◆ operator[]() [1/2]

template<class T, uint MAX_SIZE = 10>
T& Titanic::FixedQueue< T, MAX_SIZE >::operator[] ( size_type  i)
inline

Returns values from within the queue without popping them

◆ operator[]() [2/2]

template<class T, uint MAX_SIZE = 10>
const T& Titanic::FixedQueue< T, MAX_SIZE >::operator[] ( size_type  i) const
inline

Returns values from within the queue without popping them


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