home *** CD-ROM | disk | FTP | other *** search
- /* Copyright (c) IBM Corp. 1992 */
-
- #ifndef _IREQSEQ_H
- #define _IREQSEQ_H
-
- #include <iaeqseq.h>
-
- template < class Element, class Base >
- class IREqualitySequence : public virtual IAEqualitySequence < Element > {
- Base &ivBase;
- public:
-
- IREqualitySequence (Base& base) : ivBase (base) {};
-
- ~IREqualitySequence ();
-
- Boolean add (Element const&);
-
- Boolean add (Element const&,
- ICursor&);
-
- Element const& elementAt (ICursor const&) const;
-
- Element& elementAt (ICursor const&);
-
- Element const& anyElement () const;
-
- void removeAt (ICursor const&);
-
- INumber removeAll (Boolean (*property)
- (Element const&, void*),
- void* additionalArgument = 0);
-
- void replaceAt (ICursor const&,
- Element const&);
-
- void removeAll ();
-
- Boolean isBounded () const;
-
- INumber maxNumberOfElements () const;
-
- INumber numberOfElements () const;
-
- Boolean isEmpty () const;
-
- Boolean isFull () const;
-
- ICursor* newCursor () const;
-
- Boolean setToFirst (ICursor&) const;
-
- Boolean setToNext (ICursor&) const;
-
- Boolean allElementsDo (Boolean (*function)
- (Element&, void*),
- void* additionalArgument = 0);
-
- Boolean allElementsDo (IIterator <Element>&);
-
- Boolean allElementsDo (Boolean (*function)
- (Element const&, void*),
- void* additionalArgument = 0)
- const;
-
- Boolean allElementsDo (IConstantIterator
- <Element>&) const;
-
- Boolean contains (Element const&) const;
-
- Boolean locate (Element const&, ICursor&)
- const;
-
- Boolean locateOrAdd (Element const&);
-
- Boolean locateOrAdd (Element const&,
- ICursor&);
-
- Boolean remove (Element const&);
-
- INumber numberOfOccurrences (Element const&) const;
-
- Boolean locateNext (Element const&, ICursor&)
- const;
-
- INumber removeAllOccurrences (Element const&);
-
- void removeFirst ();
-
- void removeLast ();
-
- void removeAtPosition (IPosition);
-
- Element const& firstElement () const;
-
- Element const& lastElement () const;
-
- Element const& elementAtPosition (IPosition) const;
-
- Boolean setToLast (ICursor&) const;
-
- Boolean setToPrevious (ICursor&) const;
-
- void setToPosition (IPosition,
- ICursor&) const;
-
- Boolean isFirst (ICursor const&) const;
-
- Boolean isLast (ICursor const&) const;
-
- void addAsFirst (Element const&);
-
- void addAsFirst (Element const&,
- ICursor&);
-
- void addAsLast (Element const&);
-
- void addAsLast (Element const&,
- ICursor&);
-
- void addAsNext (Element const&,
- ICursor&);
-
- void addAsPrevious (Element const&,
- ICursor&);
-
- void addAtPosition (IPosition,
- Element const&);
-
- void addAtPosition (IPosition,
- Element const&,
- ICursor&);
-
- void sort (long (*comparisonFunction)
- (Element const&,
- Element const&));
-
- };
-
- #ifdef __IBMCPP__
- #include <ireqseq.c>
- #endif
-
- #endif