home *** CD-ROM | disk | FTP | other *** search
- #ifndef __RWGSLIST_H__
- #define __RWGSLIST_H__
- pragma push_align_members(64);
-
- /*
- * Declarations for General Singly-linked lists.
- *
- * $Header: E:/vcs/rw/gslist.h_v 1.3 18 Feb 1992 19:23:00 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.
- *
- ***************************************************************************
- *
- * $Log: E:/vcs/rw/gslist.h_v $
- *
- * Rev 1.3 18 Feb 1992 19:23:00 KEFFER
- * Now includes "rw/generic.h".
- * Class tag is now RWExport instead of huge.
- *
- * Rev 1.2 28 Oct 1991 09:08:16 keffer
- * Changed inclusions to <rw/xxx.h>
- *
- * Rev 1.1 09 Oct 1991 18:34:32 keffer
- * Ported to Zortech V3.0
- *
- * Rev 1.0 28 Jul 1991 08:11:20 keffer
- * Tools.h++ V4.0.5 PVCS baseline version
- *
- */
-
- #include "rw/slist.h"
- #include "rw/generic.h"
-
- #define GSlist(type) name2(type,GSlist)
- #define GSlistIterator(type) name2(type,GSlistIterator)
-
- #define GSlistdeclare(type) \
- class RWExport GSlist(type) : public RWSlist { \
- public: \
- GSlist(type)() { } \
- GSlist(type)(type* a) : RWSlist(a) { } \
- type* append(type* a) \
- { return (type*)RWSlist::append(a); } \
- type*& at(int i) \
- { return (type*&)RWSlist::at(i); } \
- RWBoolean contains( RWBoolean (*t)(const type*, const void*), const void* a) const\
- { return RWSlist::contains((RWtestGeneric)t, a); } \
- RWBoolean containsReference(const type* a) const \
- { return RWSlist::containsReference(a); } \
- void apply(void (*ap)(type*, void*), void* x) \
- { RWSlist::apply((RWapplyGeneric)ap, x); } \
- type* find(RWBoolean (*t)(const type*, const void*), const void* a) const \
- { return (type*)RWSlist::find((RWtestGeneric)t, a); } \
- type* findReference(const type* a) const \
- { return (type*)RWSlist::findReference(a); } \
- type* first() const \
- { return (type*)RWSlist::first(); } \
- type* get() \
- { return (type*)RWSlist::get(); } \
- type* insert(type* a) \
- { return (type*)RWSlist::append(a); } \
- type* insertAfter(int i, type* a) \
- { return (type*)RWSlist::insertAfter(i,a); } \
- type* last() const \
- { return (type*)RWSlist::last(); } \
- unsigned occurrencesOf(RWBoolean (*t)(const type*, const void*), const void* a) const \
- { return RWSlist::occurrencesOf((RWtestGeneric)t, a); } \
- unsigned occurrencesOfReference(const type* a) const \
- { return RWSlist::occurrencesOfReference(a); } \
- type* prepend(type* a) \
- { return (type*)RWSlist::prepend(a); } \
- type* remove(RWBoolean (*t)(const type*, const void*), const void* a) \
- { return (type*)RWSlist::remove((RWtestGeneric)t, a); } \
- type* removeReference(const type* a) \
- { return (type*)RWSlist::removeReference(a); } \
- }; \
- \
- class RWExport GSlistIterator(type) : public RWSlistIterator { \
- public: \
- GSlistIterator(type)(GSlist(type)& s) : RWSlistIterator(s) { } \
- type* findNext(RWBoolean (*t)(const type*, const void*), const void* a) \
- { return (type*)RWSlistIterator::findNext((RWtestGeneric)t, a); } \
- type* findNextReference(const type* a) \
- { return (type*)RWSlistIterator::findNextReference(a); } \
- type* insertAfterPoint(type* a) \
- { return (type*)RWSlistIterator::insertAfterPoint(a); } \
- type* key() \
- { return (type*)RWSlistIterator::key(); } \
- type* operator()() \
- { return (type*)RWSlistIterator::operator()(); } \
- type* remove() \
- { return (type*)RWSlistIterator::remove(); } \
- type* removeNext(RWBoolean (*t)(const type*, const void*), const void* a) \
- { return (type*)RWSlistIterator::removeNext((RWtestGeneric)t, a); } \
- type* removeNextReference(const type* a) \
- { return (type*)RWSlistIterator::removeNextReference(a); } \
- };
-
- pragma pop_align_members();
- #endif /* __RWGSLIST_H__ */
-