Queue
|
 |
A sequential access container,
the abstract data type queue.
Implemented via circular list.
For iteration see Iterator.
Declaration
#include<ospace/advanced/Queue.h>
template
<
class Instantiator
>
class os_Queue
Constructor
os_Queue(void)
This the default
constructor.
Destructor
~os_Queue()
Destroys all entries in
the queue.
operator
=
os_Queue<T>& operator=(const
os_Queue<T>&)
Replaces contents of one
queuwith another..
operator
==
int
operator==(const os_Queue<T>&)
Returns 1 (true) if two
queues contain items that are equal to one another, otherwise returns 0
(false).
operator
!=
int
operator!=(const os_Queue<T>&)
The negation of
operator==, above.
operator
+=
os_Queue<T>&
operator+=(const os_os_Queue<T>&
s)
Appends queue s, making a
bigger queue.
make_empty
os_Queue&
make_empty(void)
Removes and destroys the
contents. The queue is in state of initial construction.
Size
unsigned int Size(void)
Returns the number of
items in the queue.
push
os_Queue<T>&
push(const T&
item)
Adds the item to the
queue (enqueue operation).
pop
T&
pop(void)
Removes and returns the
item at top of queue (dequeue operation).
top
T&
top(void)
Returns a reference to the
top of queue without removing it.
remove
os_Queue<T>&
remove( T& item)
Removes item, if it is in
the queue.
Copyright©2005-2026 Recursion Software LLC
All Rights Reserved - For use by licensed users only.