home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1998 May
/
Pcwk5b98.iso
/
Borland
/
Cplus45
/
BC45
/
CLOBSS.PAK
/
DEQUE.CPO
< prev
next >
Wrap
Text File
|
1995-08-29
|
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));
}