Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide

RWTQueue<T,Container>

Module:  Essential Tools Module   Group:  Traditional Collection


Does not inherit

Local Index

Members

Synopsis

#include <rw/tqueue.h>
RWTQueue<T, C> queue;

Description

This class represents a parameterized queue. Not only can the type of object inserted into the queue be parameterized, but also the implementation.

Parameter T represents the type of object in the queue, either a class or built-in type. The class T must have:

Parameter C represents the class used for implementation. Useful choices are RWTValSlist<T,A> or RWTValDlist<T,A>. Vectors, such as RWTValOrderedVector<T,A>, can also be used, but tend to be less efficient at removing an object from the front of the list.

Persistence

None

Example

In this example a queue of RWCStrings, implemented as a singly-linked list, is exercised.

Program output

Public Member Functions

void
clear();
size_t
entries() const; 
T
first() const; 
T
get();
RWBoolean
isEmpty() const; 
void
insert(T a); 
T
last() const; 


Previous fileTop of DocumentContentsIndex pageNext file

©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.