Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
TypedQueue< T > Class Template Reference

A simple, fast, type-safe single-linked queue class with non-virtual methods. More...

#include <SimpleQueue.hxx>

Inheritance diagram for TypedQueue< T >:
SimpleQueue

Public Types

typedef typed_iterator< T > iterator
 Typed iterator type.
 

Public Member Functions

void push_front (T *entry)
 Inserts an entry to the front of the queue.
 
T * pop_front ()
 Removes the entry at the front of the queue.
 
T * front () const
 peeks.
 
iterator begin ()
 
- Public Member Functions inherited from SimpleQueue
bool empty ()
 
void push_front (QMember *member)
 Adds an entry to the front of the queue.
 
QMemberpop_front ()
 Removes the entry at the front of the queue.
 
QMemberfront () const
 peeks.
 
iterator begin ()
 
end_iterator end ()
 
void insert (const iterator &position, QMember *entry)
 Inserts the element entry before the position.
 
void erase (const iterator &position)
 Removes the entry pointed to by the iterator.
 

Additional Inherited Members

- Protected Attributes inherited from SimpleQueue
QMemberhead_
 Top pointer for the stack.
 
- Static Protected Attributes inherited from SimpleQueue
static QMember *const PTR_END = nullptr
 Used as a guard for comparing against for the end of the queue.
 

Detailed Description

template<class T>
class TypedQueue< T >

A simple, fast, type-safe single-linked queue class with non-virtual methods.

see SimpleQueue for details.

Definition at line 192 of file SimpleQueue.hxx.

Member Typedef Documentation

◆ iterator

template<class T >
typedef typed_iterator<T> TypedQueue< T >::iterator

Typed iterator type.

Definition at line 211 of file SimpleQueue.hxx.

Member Function Documentation

◆ begin()

template<class T >
iterator TypedQueue< T >::begin ( )
inline
Returns
iterator pointing to first element.

Definition at line 214 of file SimpleQueue.hxx.

◆ front()

template<class T >
T * TypedQueue< T >::front ( ) const
inline

peeks.

Returns
the entry at the front of the queue.

Definition at line 206 of file SimpleQueue.hxx.

◆ pop_front()

template<class T >
T * TypedQueue< T >::pop_front ( )
inline

Removes the entry at the front of the queue.

Returns
the entry at the front of the queue.

Definition at line 201 of file SimpleQueue.hxx.

◆ push_front()

template<class T >
void TypedQueue< T >::push_front ( T *  entry)
inline

Inserts an entry to the front of the queue.

Definition at line 195 of file SimpleQueue.hxx.


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