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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 65297 - (show annotations)
Thu Nov 30 20:22:33 2006 UTC (13 years, 2 months ago) by manus
File size: 1902 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 "Sequential lists, without commitment to a particular representation";
5
6 status: "See notice at end of class";
7 names: list, sequence;
8 access: index, cursor, membership;
9 contents: generic;
10 date: "$Date$";
11 revision: "$Revision$"
12
13 deferred class LIST [G] inherit
14
15 CHAIN [G]
16 redefine
17 forth
18 end
19
20 feature -- Cursor movement
21
22 forth is
23 -- Move to next position; if no next position,
24 -- ensure that `exhausted' will be true.
25 deferred
26 ensure then
27 moved_forth: index = old index + 1
28 end;
29
30 feature -- Status report
31
32 after: BOOLEAN is
33 -- Is there no valid cursor position to the right of cursor?
34 do
35 Result := (index = count + 1)
36 end;
37
38 before: BOOLEAN is
39 -- Is there no valid cursor position to the left of cursor?
40 do
41 Result := (index = 0)
42 end;
43
44 invariant
45
46 before_definition: before = (index = 0);
47 after_definition: after = (index = count + 1);
48
49 end -- class LIST
50
51
52 --|----------------------------------------------------------------
53 --| EiffelBase: Library of reusable components for Eiffel.
54 --| Copyright (c) 1993-2006 University of Southern California and contributors.
55 --| For ISE customers the original versions are an ISE product
56 --| covered by the ISE Eiffel license and support agreements.
57 --| EiffelBase may now be used by anyone as FREE SOFTWARE to
58 --| develop any product, public-domain or commercial, without
59 --| payment to ISE, under the terms of the ISE Free Eiffel Library
60 --| License (IFELL) at http://eiffel.com/products/base/license.html.
61 --|
62 --| Interactive Software Engineering Inc.
63 --| ISE Building, 2nd floor
64 --| 270 Storke Road, Goleta, CA 93117 USA
65 --| Telephone 805-685-1006, Fax 805-685-6869
66 --| Electronic mail <info@eiffel.com>
67 --| Customer support e-mail <support@eiffel.com>
68 --| For latest info see award-winning pages: http://eiffel.com
69 --|----------------------------------------------------------------
70

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23