/[eiffelstudio]/trunk/eweasel/tests/incr071/linked_list_cursor.e
ViewVC logotype

Contents of /trunk/eweasel/tests/incr071/linked_list_cursor.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 65297 - (show annotations)
Thu Nov 30 20:22:33 2006 UTC (13 years ago) by manus
File size: 1865 byte(s)
Moved from trunk/Src/eweasel to trunk/eweasel so that a simple checkout of the source code is not penalized by the lenghty process of checking out all the tests of eweasel.
1 indexing
2
3 description:
4 "Cursors for linked lists";
5
6 status: "See notice at end of class";
7 names: linked_list_cursor, cursor;
8 contents: generic;
9 date: "$Date$";
10 revision: "$Revision$"
11
12 class LINKED_LIST_CURSOR [G] inherit
13
14 CURSOR
15
16 creation
17
18 make
19
20 feature {LINKED_LIST} -- Initialization
21
22 make (active_element: like active; aft, bef: BOOLEAN) is
23 -- Create a cursor and set it up on `active_element'.
24 do
25 active := active_element;
26 after := aft;
27 before := bef
28 end;
29
30 feature {LINKED_LIST} -- Implementation
31
32 active: LINKABLE [G];
33 -- Current element in linked list
34
35 after: BOOLEAN;
36 -- Is there no valid cursor position to the right of cursor?
37
38 before: BOOLEAN;
39 -- Is there no valid cursor position to the right of cursor?
40
41 invariant
42 not_both: not (before and after);
43 no_active_not_on: active = Void implies (before or after)
44
45 end -- class LINKED_LIST_CURSOR
46
47
48 --|----------------------------------------------------------------
49 --| EiffelBase: Library of reusable components for Eiffel.
50 --| Copyright (c) 1993-2006 University of Southern California and contributors.
51 --| For ISE customers the original versions are an ISE product
52 --| covered by the ISE Eiffel license and support agreements.
53 --| EiffelBase may now be used by anyone as FREE SOFTWARE to
54 --| develop any product, public-domain or commercial, without
55 --| payment to ISE, under the terms of the ISE Free Eiffel Library
56 --| License (IFELL) at http://eiffel.com/products/base/license.html.
57 --|
58 --| Interactive Software Engineering Inc.
59 --| ISE Building, 2nd floor
60 --| 270 Storke Road, Goleta, CA 93117 USA
61 --| Telephone 805-685-1006, Fax 805-685-6869
62 --| Electronic mail <info@eiffel.com>
63 --| Customer support e-mail <support@eiffel.com>
64 --| For latest info see award-winning pages: http://eiffel.com
65 --|----------------------------------------------------------------
66

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23