home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C Programming Starter Kit 2.0
/
SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso
/
bc45
/
clobss.pak
/
DEQUE.CPO
< prev
next >
Wrap
Text File
|
1997-07-23
|
1KB
|
46 lines
/*------------------------------------------------------------------------*/
/* */
/* DEQUE.CPP */
/* */
/* Copyright Borland International 1991, 1993 */
/* All Rights Reserved */
/* */
/*------------------------------------------------------------------------*/
#if !defined( __IOSTREAM_H )
#include <iostream.h>
#endif // __IOSTREAM_H
#if !defined( __DEQUE_H )
#include "classlib\obsolete\deque.h"
#endif // __DEQUE_H
Object& Deque::getLeft()
{
Object& temp = list.peekAtHead();
if( temp != NOOBJECT )
{
list.detachFromHead( temp );
itemsInContainer--;
}
return temp;
}
Object& Deque::getRight()
{
Object& temp = list.peekAtTail();
if( temp != NOOBJECT )
{
list.detachFromTail( temp );
itemsInContainer--;
}
return temp;
}
ContainerIterator& Deque::initIterator() const
{
return *((ContainerIterator *)new DoubleListIterator(list));
}