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

Contents of /trunk/eweasel/tests/incr071/bounded.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: 1616 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 "Bounded data structures, with a notion of capacity.";
5
6 status: "See notice at end of class";
7 names: bounded, storage;
8 date: "$Date$";
9 revision: "$Revision$"
10
11 deferred class BOUNDED [G] inherit
12
13 FINITE [G]
14
15 feature -- Measurement
16
17 capacity: INTEGER is
18 -- Number of items that may be stored
19 deferred
20 end;
21
22 feature -- Status report
23
24 full: BOOLEAN is
25 -- Is structure full?
26 do
27 Result := (count = capacity)
28 end;
29
30 resizable: BOOLEAN is
31 -- May `capacity' be changed?
32 deferred
33 end;
34
35 invariant
36
37 valid_count: count <= capacity;
38 full_definition: full = (count = capacity)
39
40 end -- class BOUNDED
41
42
43 --|----------------------------------------------------------------
44 --| EiffelBase: Library of reusable components for Eiffel.
45 --| Copyright (c) 1993-2006 University of Southern California and contributors.
46 --| For ISE customers the original versions are an ISE product
47 --| covered by the ISE Eiffel license and support agreements.
48 --| EiffelBase may now be used by anyone as FREE SOFTWARE to
49 --| develop any product, public-domain or commercial, without
50 --| payment to ISE, under the terms of the ISE Free Eiffel Library
51 --| License (IFELL) at http://eiffel.com/products/base/license.html.
52 --|
53 --| Interactive Software Engineering Inc.
54 --| ISE Building, 2nd floor
55 --| 270 Storke Road, Goleta, CA 93117 USA
56 --| Telephone 805-685-1006, Fax 805-685-6869
57 --| Electronic mail <info@eiffel.com>
58 --| Customer support e-mail <support@eiffel.com>
59 --| For latest info see award-winning pages: http://eiffel.com
60 --|----------------------------------------------------------------
61

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23