home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
OTHERUTI
/
TCPP30-1.ZIP
/
CLASSSRC.ZIP
/
DEQUE.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1992-02-18
|
1KB
|
46 lines
/*------------------------------------------------------------------------*/
/* */
/* DEQUE.CPP */
/* */
/* Copyright Borland International 1991 */
/* All Rights Reserved */
/* */
/*------------------------------------------------------------------------*/
#if !defined( __DEQUE_H )
#include <Deque.h>
#endif // __DEQUE_H
#ifndef __IOSTREAM_H
#include <iostream.h>
#endif
Object& Deque::getLeft()
{
Object& temp = theDeque.peekAtHead();
if( temp != NOOBJECT )
{
theDeque.detachFromHead( temp );
itemsInContainer--;
}
return temp;
}
Object& Deque::getRight()
{
Object& temp = theDeque.peekAtTail();
if( temp != NOOBJECT )
{
theDeque.detachFromTail( temp );
itemsInContainer--;
}
return temp;
}
ContainerIterator& Deque::initIterator() const
{
return *((ContainerIterator *)new DoubleListIterator(this->theDeque));
}