home *** CD-ROM | disk | FTP | other *** search
- #ifndef __RWSEQCLTN_H__
- #define __RWSEQCLTN_H__
- pragma push_align_members(64);
-
- /*
- * Abstract base class for sequenceable collections.
- *
- * $Header: E:/vcs/rw/seqcltn.h_v 1.2 18 Feb 1992 09:54:44 KEFFER $
- *
- ****************************************************************************
- *
- * Rogue Wave
- * P.O. Box 2328
- * Corvallis, OR 97339
- * Voice: (503) 754-3010 FAX: (503) 757-6650
- *
- * Copyright (C) 1989, 1990, 1991. This software is subject to copyright
- * protection under the laws of the United States and other countries.
- *
- ***************************************************************************
- *
- * This is an abstract base class, inherited by collections whose
- * elements are ordered and accessible by an index.
- *
- * $Log: E:/vcs/rw/seqcltn.h_v $
- *
- * Rev 1.2 18 Feb 1992 09:54:44 KEFFER
- *
- * Rev 1.1 28 Oct 1991 09:08:22 keffer
- * Changed inclusions to <rw/xxx.h>
- *
- * Rev 1.0 28 Jul 1991 08:16:54 keffer
- * Tools.h++ V4.0.5 PVCS baseline version
- *
- */
-
- #include "rw/colclass.h"
-
- class RWExport RWSequenceable : public RWCollection {
-
- public:
-
- /************ Virtual functions inherited from RWCollection *************/
- virtual void apply(RWapplyCollectable, void*) = 0;
- virtual void clear() = 0;
- //virtual void clearAndDestroy();
- //virtual RWBoolean contains(const RWCollectable*) const;
- virtual unsigned entries() const = 0; // Total entries
- virtual RWCollectable* find(const RWCollectable*) const = 0; // First occurrence
- virtual RWCollectable* insert(RWCollectable*) = 0;
- virtual RWBoolean isEmpty() const = 0;
- virtual unsigned occurrencesOf(const RWCollectable*) const = 0;
- virtual RWCollectable* remove(const RWCollectable*) = 0; // Remove first occurrence
- //virtual void removeAndDestroy(const RWCollectable*);
-
- public:
-
- /**************** Added virtual functions for RWSequenceables ****************/
- virtual RWCollectable* append(RWCollectable*) = 0;
- virtual RWCollectable*& at(int) = 0; // Some collections can use as lvalue
- #ifdef CONST_OVERLOADS
- virtual const RWCollectable* at(int) const = 0; // Cannot use as lvalue
- #endif
- virtual RWCollectable* first() const = 0;
- virtual int index(const RWCollectable*) const = 0;
- virtual RWCollectable* insertAfter(int, RWCollectable*) = 0;
- virtual RWCollectable* last() const = 0;
- virtual RWCollectable* prepend(RWCollectable*) = 0;
- };
-
- pragma pop_align_members();
- #endif /* __RWSEQCLTN_H__ */
-