home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
IRSTACK.H
< prev
next >
Wrap
Text File
|
1993-09-22
|
4KB
|
109 lines
/*******************************************************************************
* *
* COPYRIGHT: *
* IBM C/C++ Tools Version 2.01 - Collection Class Library *
* Licensed Materials - Property of IBM *
* (C) Copyright IBM Corporation 1992, 1993 *
* All Rights Reserved *
* US Government Users Restricted Rights - Use, duplication, or disclosure *
* restricted by GSA ADP Schedule Contract with IBM Corp. *
* *
*******************************************************************************/
#ifndef _IRSTACK_H
#define _IRSTACK_H
#include <iastack.h>
template < class Element, class Base >
class IRStack : public virtual IAStack < Element > {
Base &ivBase;
public:
IRStack (Base& base) : ivBase (base) {};
~IRStack ();
IBoolean add (Element const&);
IBoolean add (Element const&,
ICursor&);
Element const& elementAt (ICursor const&) const;
Element const& anyElement () const;
void removeAll ();
IBoolean isBounded () const;
INumber maxNumberOfElements () const;
INumber numberOfElements () const;
IBoolean isEmpty () const;
IBoolean isFull () const;
ICursor* newCursor () const;
IBoolean setToFirst (ICursor&) const;
IBoolean setToNext (ICursor&) const;
IBoolean allElementsDo (IBoolean (*function)
(Element const&, void*),
void* additionalArgument = 0)
const;
IBoolean allElementsDo (IConstantIterator
<Element>&) const;
IBoolean isConsistent () const;
void removeLast ();
Element const& firstElement () const;
Element const& lastElement () const;
Element const& elementAtPosition (IPosition) const;
IBoolean setToLast (ICursor&) const;
IBoolean setToPrevious (ICursor&) const;
void setToPosition (IPosition,
ICursor&) const;
IBoolean isFirst (ICursor const&) const;
IBoolean isLast (ICursor const&) const;
void addAsLast (Element const&);
void addAsLast (Element const&,
ICursor&);
void push (Element const&);
void push (Element const&,
ICursor&);
void pop ();
void pop (Element&);
Element const& top () const;
protected:
void* identity () const;
};
#ifdef __IBMCPP__
#ifndef __TEMPINC__
#include <irstack.c>
#endif
#endif
#endif