home *** CD-ROM | disk | FTP | other *** search
- #ifndef __RWGDLIST_H__
- #define __RWGDLIST_H__
- pragma push_align_members(64);
-
- /*
- * Declarations for General Doubly-linked lists.
- *
- * $Header: E:/vcs/rw/gdlist.h_v 1.3 18 Feb 1992 19:22:58 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/gdlist.h_v $
- *
- * Rev 1.3 18 Feb 1992 19:22:58 KEFFER
- * Now includes "rw/generic.h".
- * Class tag is now RWExport instead of huge.
- *
- * Rev 1.2 28 Oct 1991 09:08:14 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:18 keffer
- * Tools.h++ V4.0.5 PVCS baseline version
- *
- */
-
- #include "rw/dlist.h"
- #include "rw/generic.h"
-
- #define GDlist(type) name2(type,GDlist)
- #define GDlistIterator(type) name2(type,GDlistIterator)
-
- #define GDlistdeclare(type) \
- class RWExport GDlist(type) : public RWDlist { \
- public: \
- GDlist(type)() { } \
- GDlist(type)(type* a) : RWDlist(a) { } \
- type* append(type* a) \
- { return (type*)RWDlist::append(a); } \
- type*& at(int i) \
- { return (type*&)RWDlist::at(i); } \
- RWBoolean contains( RWBoolean (*t)(const type*, const void*), const void* a) const\
- { return RWDlist::contains((RWtestGeneric)t, a); } \
- RWBoolean containsReference(const type* a) const \
- { return RWDlist::containsReference(a); } \
- void apply(void (*ap)(type*, void*), void* x) \
- { RWDlist::apply((RWapplyGeneric)ap, x); } \
- type* find(RWBoolean (*t)(const type*, const void*), const void* a) const \
- { return (type*)RWDlist::find((RWtestGeneric)t, a); } \
- type* findReference(const type* a) const \
- { return (type*)RWDlist::findReference(a); } \
- type* first() const \
- { return (type*)RWDlist::first(); } \
- type* get() \
- { return (type*)RWDlist::get(); } \
- type* insert(type* a) \
- { return (type*)RWDlist::append(a); } \
- type* insertAfter(int i, type* a) \
- { return (type*)RWDlist::insertAfter(i,a); } \
- type* last() const \
- { return (type*)RWDlist::last(); } \
- unsigned occurrencesOf(RWBoolean (*t)(const type*, const void*), const void* a) const \
- { return RWDlist::occurrencesOf((RWtestGeneric)t, a); } \
- unsigned occurrencesOfReference(const type* a) const \
- { return RWDlist::occurrencesOfReference(a); } \
- type* prepend(type* a) \
- { return (type*)RWDlist::prepend(a); } \
- type* remove(RWBoolean (*t)(const type*, const void*), const void* a) \
- { return (type*)RWDlist::remove((RWtestGeneric)t, a); } \
- type* removeReference(const type* a) \
- { return (type*)RWDlist::removeReference(a); } \
- }; \
- \
- class RWExport GDlistIterator(type) : public RWDlistIterator { \
- public: \
- GDlistIterator(type)(GDlist(type)& s) : RWDlistIterator(s) { } \
- type* findNext(RWBoolean (*t)(const type*, const void*), const void* a) \
- { return (type*)RWDlistIterator::findNext((RWtestGeneric)t, a); } \
- type* findNextReference(const type* a) \
- { return (type*)RWDlistIterator::findNextReference(a); } \
- type* insertAfterPoint(type* a) \
- { return (type*)RWDlistIterator::insertAfterPoint(a); } \
- type* key() const {return (type*)RWDlistIterator::key();} \
- type* operator()() {return (type*)(RWDlistIterator::operator()()); } \
- type* remove() {return (type*)RWDlistIterator::remove();} \
- type* removeNext(RWBoolean (*t)(const type*, const void*), const void* a) \
- {return (type*)RWDlistIterator::removeNext((RWtestGeneric)t, a);} \
- type* removeNextReference(const type* a) \
- {return (type*)RWDlistIterator::removeNextReference(a);} \
- };
-
- pragma pop_align_members();
- #endif /* __RWGDLIST_H__ */
-