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

Contents of /trunk/eweasel/tests/incr071/active.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: 2125 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 "``Active'' data structures, which at every stage have %
5 %a possibly undefined ``current item''. %
6 %Basic access and modification operations apply to the current item.";
7
8 status: "See notice at end of class";
9 names: active, access;
10 access: membership;
11 contents: generic;
12 date: "$Date$";
13 revision: "$Revision$"
14
15 deferred class ACTIVE [G] inherit
16
17 BAG [G]
18
19 feature -- Access
20
21 item: G is
22 -- Current item
23 require
24 readable: readable
25 deferred
26 end;
27
28 feature -- Status report
29
30 readable: BOOLEAN is
31 -- Is there a current item that may be read?
32 deferred
33 end;
34
35 writable: BOOLEAN is
36 -- Is there a current item that may be modified?
37 deferred
38 end;
39
40 feature -- Element change
41
42 replace (v: G) is
43 -- Replace current item by `v'.
44 require
45 writable: writable
46 deferred
47 ensure
48 item_replaced: item = v
49 end;
50
51 feature -- Removal
52
53 remove is
54 -- Remove current item.
55 require
56 prunable: prunable;
57 writable: writable
58 deferred
59 end;
60
61 invariant
62
63 writable_constraint: writable implies readable;
64 empty_constraint: is_empty implies (not readable) and (not writable)
65
66 end -- class ACTIVE
67
68
69 --|----------------------------------------------------------------
70 --| EiffelBase: Library of reusable components for Eiffel.
71 --| Copyright (c) 1993-2006 University of Southern California and contributors.
72 --| For ISE customers the original versions are an ISE product
73 --| covered by the ISE Eiffel license and support agreements.
74 --| EiffelBase may now be used by anyone as FREE SOFTWARE to
75 --| develop any product, public-domain or commercial, without
76 --| payment to ISE, under the terms of the ISE Free Eiffel Library
77 --| License (IFELL) at http://eiffel.com/products/base/license.html.
78 --|
79 --| Interactive Software Engineering Inc.
80 --| ISE Building, 2nd floor
81 --| 270 Storke Road, Goleta, CA 93117 USA
82 --| Telephone 805-685-1006, Fax 805-685-6869
83 --| Electronic mail <info@eiffel.com>
84 --| Customer support e-mail <support@eiffel.com>
85 --| For latest info see award-winning pages: http://eiffel.com
86 --|----------------------------------------------------------------
87

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23