Automatic generation produced by ISE Eiffel

Classes Clusters Cluster hierarchy Chart Relations Text Flat Contracts Flat contracts Go to:
indexing description: "Dynamically modifiable chains" status: "See notice at end of class" names: dynamic_chain, sequence access: index, cursor, membership contents: generic date: "$Date: 2001-11-16 20:32:23 +0000 (Fri, 16 Nov 2001) $" revision: "$Revision: 51435 $" deferred class interface DYNAMIC_CHAIN [G] feature -- Status report Extendible: BOOLEAN is True -- May new items be added? (Answer: yes.) prunable: BOOLEAN -- May items be removed? (Answer: yes.) feature -- Element change put_front (v: like item) -- Add v at beginning. -- Do not move cursor. ensure new_count: count = old count + 1 item_inserted: first = v put_left (v: like item) -- Add v to the left of cursor position. -- Do not move cursor. require extendible: extendible not_before: not before ensure new_count: count = old count + 1 new_index: index = old index + 1 put_right (v: like item) -- Add v to the right of cursor position. -- Do not move cursor. require extendible: extendible not_after: not after ensure new_count: count = old count + 1 same_index: index = old index merge_left (other: like Current) -- Merge other into current structure before cursor -- position. Do not move cursor. Empty other. require extendible: extendible not_before: not before other_exists: other /= void ensure new_count: count = old count + old other.count new_index: index = old index + old other.count other_is_empty: other.is_empty merge_right (other: like Current) -- Merge other into current structure after cursor -- position. Do not move cursor. Empty other. require extendible: extendible not_after: not after other_exists: other /= void ensure new_count: count = old count + old other.count same_index: index = old index other_is_empty: other.is_empty feature -- Removal prune (v: like item) -- Remove first occurrence of v, if any, -- after cursor position. -- If found, move cursor to right neighbor; -- if not, make structure exhausted. remove_left -- Remove item to the left of cursor position. -- Do not move cursor. require left_exists: index > 1 ensure new_count: count = old count - 1 new_index: index = old index - 1 remove_right -- Remove item to the right of cursor position. -- Do not move cursor. require right_exists: index < count ensure new_count: count = old count - 1 same_index: index = old index prune_all (v: like item) -- Remove all occurrences of v. -- (Reference or object equality, -- based on object_comparison.) -- Leave structure exhausted. ensure then is_exhausted: exhausted wipe_out -- Remove all items. feature -- Duplication duplicate (n: INTEGER): like Current -- Copy of sub-chain beginning at current position -- and having min (n, from_here) items, -- where from_here is the number of items -- at or to the right of current position. invariant extendible: extendible indexing library: "[ EiffelBase: Library of reusable components for Eiffel. ]" status: "[ Copyright 1986-2001 Interactive Software Engineering (ISE). For ISE customers the original versions are an ISE product covered by the ISE Eiffel license and support agreements. ]" license: "[ EiffelBase may now be used by anyone as FREE SOFTWARE to develop any product, public-domain or commercial, without payment to ISE, under the terms of the ISE Free Eiffel Library License (IFELL) at http://eiffel.com/products/base/license.html. ]" source: "[ Interactive Software Engineering Inc. ISE Building 360 Storke Road, Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Electronic mail <info@eiffel.com> Customer support http://support.eiffel.com ]" info: "[ For latest info see award-winning pages: http://eiffel.com ]" end -- class DYNAMIC_CHAIN
Classes Clusters Cluster hierarchy Chart Relations Text Flat Contracts Flat contracts Go to:

-- Generated by ISE Eiffel --
For more details: www.eiffel.com