34#ifndef _UTILS_SIMPLEQUEUE_HXX_
35#define _UTILS_SIMPLEQUEUE_HXX_
91 bool operator==(
const iterator& o)
const {
95 bool operator==(
const end_iterator& o)
const {
96 return *
link_ ==
nullptr;
99 bool operator!=(
const iterator& o)
const {
100 return *
link_ != *o.link_;
103 bool operator!=(
const end_iterator& o)
const {
104 return *
link_ !=
nullptr;
136 return static_cast<T*
>(*link_);
139 return static_cast<T&
>(**link_);
163 *position.
link_ = entry;
Essentially a "next" pointer container.
QMember * next
pointer to the next member in the queue
Static iterator class pointing to the "end" of the queue.
STL-compatible iterator for SimpleQueue.
iterator(QMember **link)
Constructor.
QMember ** link_
**link == *this for the iterator semantics.
STL-compatible iterator for TypedQueue.
typed_iterator(QMember **link)
Typed itartor consturctor.
A simple fast single-linked stack class with non-virtual methods.
QMember * front() const
peeks.
QMember * pop_front()
Removes the entry at the front of the queue.
static QMember *const PTR_END
Used as a guard for comparing against for the end of the queue.
void push_front(QMember *member)
Adds an entry to the front of the queue.
QMember * head_
Top pointer for the stack.
void erase(const iterator &position)
Removes the entry pointed to by the iterator.
void insert(const iterator &position, QMember *entry)
Inserts the element entry before the position.
A simple, fast, type-safe single-linked queue class with non-virtual methods.
T * pop_front()
Removes the entry at the front of the queue.
typed_iterator< T > iterator
Typed iterator type.
void push_front(T *entry)
Inserts an entry to the front of the queue.
#define HASSERT(x)
Checks that the value of expression x is true, else terminates the current process.