From d12fea6f13129071c6545dc3e95687a90894d22f Mon Sep 17 00:00:00 2001 From: fred Date: Sat, 30 Nov 1996 02:27:03 +0000 Subject: [PATCH] flower-1.0.10 --- flower/list.hh | 18 ++++++++---------- flower/plist.hh | 4 ++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/flower/list.hh b/flower/list.hh index 1516e16642..117e1862e4 100644 --- a/flower/list.hh +++ b/flower/list.hh @@ -1,5 +1,3 @@ -// list.hh - #ifndef __LIST_HH #define __LIST_HH @@ -7,7 +5,7 @@ class ostream; template class Cursor; template class Link; -/// all purpose list +/// all-purpose doubly linked list template class List { @@ -15,11 +13,7 @@ class List List(List const&src); /// construct empty list - List(); - - /// construct list from first item. - List( const T& thing ); - + List(); virtual ~List(); Cursor bottom(); @@ -30,6 +24,10 @@ class List protected: friend class Cursor; friend class Link; + + void concatenate(List const &s); + + /// make *this empty void set_empty(); /** @@ -37,10 +35,10 @@ class List */ /// add after after_me - void add( const T& thing, Cursor after_me ); + void add( const T& thing, Cursor &after_me ); /// put thing before #before_me# - void insert( const T& thing, Cursor before_me ); + void insert( const T& thing, Cursor &before_me ); virtual void remove( Cursor me ); /** Remove link pointed to by me. diff --git a/flower/plist.hh b/flower/plist.hh index 78df40cb17..ea2c0ecdae 100644 --- a/flower/plist.hh +++ b/flower/plist.hh @@ -16,8 +16,8 @@ class PointerList : public List public: PCursor top() { return PCursor (List::top()); } PCursor bottom() { return PCursor (List::bottom()); } - - PointerList( const T& thing ) : List( thing ) { } + void concatenate(PointerList const &s) { List::concatenate(s); } +// PointerList( const T& thing ) : List( thing ) { } PointerList() {} }; -- 2.39.5