deq

Section: OATH Reference Manual (3O)
Updated: 26 August 1991
Index Return to Main Contents
 

NAME

deq (deqA, deqG) - a double-ended queue (fifo ordered by default)  

SYNOPSIS

#include <oath/deq.h>  

DESCRIPTION

The deq is a queue that allows objs to be inserted and removed from both ends. Thus, the deq is capable of both LIFO (Last-In, First-Out) and FIFO (First-In, First-Out) behaviors (and more); however, the deq IS a fifoQueue, and as such the operators << and >> will behave FIFO. Note then, the deq cannot be passed as or converted to a lifoQueue.  

DERIVATION

deq : fifoQueue : seq : queue : bag : obj

deq is an abstract type.  

STATIC OPERATIONS

deqA deqA:: isa (objA)
deqA::isa(O) returns O if it is truly a deq; otherwise it returns Nil.
 

MEMBER OPERATIONS

objA deqA:: end ()
D.end() returns the obj at the end of the deq D.
deqA deqA:: pushFront (objA)
D.pushFront(O) inserts obj O at the front of the deq D and returns D.
deqA deqA:: pushEnd (objA)
D.pushEnd(O) inserts obj O at the end of the deq D and returns D. This is the same as D << O.
deqA deqA:: pullFrontX (objA)
D.pullFrontX(O) sets O to access the front obj of deq D, removes that obj from D, and returns D. This is the same as D >> O.
deqA deqA:: pullFront ()
D.pullFront() removes the front obj from deq D and returns D. This is the same as D.extract().
deqA deqA:: pullEndX (objA)
D.pullEndX(O) sets O to access the end obj of deq D, removes that obj from D, and returns D.
deqA deqA:: pullEnd ()
D.pullEnd() removes the end obj from deq D and returns D.
 

INTERNAL OPERATIONS

virtual const objG* deqG:: end () const
G->end() returns the obj at the end of deq G.
virtual void deqG:: pushFront (const objG*)
G->pushFront(O) inserts obj O into deq G at the front.
virtual const objG* deqG:: pullEnd ()
G->pullEnd() removes and returns the obj at the end of deq G.
 

SEE ALSO

OATH(3O), fifoQueue(3O)  

AUTHOR

Brian M. Kennedy (Computer Science Center, Texas Instruments Incorporated)  

BUGS


 

Index

NAME
SYNOPSIS
DESCRIPTION
DERIVATION
STATIC OPERATIONS
MEMBER OPERATIONS
INTERNAL OPERATIONS
SEE ALSO
AUTHOR
BUGS

This document was created by man2html, using the manual pages.
Time: 20:37:51 GMT, July 24, 2024