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

Contents of /trunk/eweasel/tests/incr071/container.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: 2693 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 "Data structures of the most general kind, %
5 %used to hold zero or more items.";
6
7 status: "See notice at end of class";
8 names: access;
9 access: membership;
10 contents: generic;
11 date: "$Date$";
12 revision: "$Revision$"
13
14 deferred class
15 CONTAINER [G]
16
17 feature -- Access
18
19 has (v: G): BOOLEAN is
20 -- Does structure include `v'?
21 -- (Reference or object equality,
22 -- based on `object_comparison'.)
23 deferred
24 ensure
25 not_found_in_empty: Result implies not is_empty
26 end;
27
28 feature -- Status report
29
30 is_empty: BOOLEAN is
31 -- Is there no element?
32 deferred
33 end;
34
35 empty: BOOLEAN is
36 -- Is there no element?
37 obsolete
38 "ELKS 2000: Use `is_empty' instead"
39 do
40 Result := is_empty
41 end;
42
43 object_comparison: BOOLEAN;
44 -- Must search operations use `equal' rather than `='
45 -- for comparing references? (Default: no, use `='.)
46
47 changeable_comparison_criterion: BOOLEAN is
48 -- May `object_comparison' be changed?
49 -- (Answer: yes by default.)
50 do
51 Result := True
52 end;
53
54 feature -- Status setting
55
56 compare_objects is
57 -- Ensure that future search operations will use `equal'
58 -- rather than `=' for comparing references.
59 require
60 changeable_comparison_criterion
61 do
62 object_comparison := True
63 ensure
64 object_comparison
65 end;
66
67 compare_references is
68 -- Ensure that future search operations will use `='
69 -- rather than `equal' for comparing references.
70 require
71 changeable_comparison_criterion
72 do
73 object_comparison := False
74 ensure
75 reference_comparison: not object_comparison
76 end;
77
78 feature -- Conversion
79
80 linear_representation: LINEAR [G] is
81 -- Representation as a linear structure
82 deferred
83 end;
84
85 end -- class CONTAINER
86
87
88 --|----------------------------------------------------------------
89 --| EiffelBase: Library of reusable components for Eiffel.
90 --| Copyright (c) 1993-2006 University of Southern California and contributors.
91 --| For ISE customers the original versions are an ISE product
92 --| covered by the ISE Eiffel license and support agreements.
93 --| EiffelBase may now be used by anyone as FREE SOFTWARE to
94 --| develop any product, public-domain or commercial, without
95 --| payment to ISE, under the terms of the ISE Free Eiffel Library
96 --| License (IFELL) at http://eiffel.com/products/base/license.html.
97 --|
98 --| Interactive Software Engineering Inc.
99 --| ISE Building, 2nd floor
100 --| 270 Storke Road, Goleta, CA 93117 USA
101 --| Telephone 805-685-1006, Fax 805-685-6869
102 --| Electronic mail <info@eiffel.com>
103 --| Customer support e-mail <support@eiffel.com>
104 --| For latest info see award-winning pages: http://eiffel.com
105 --|----------------------------------------------------------------
106

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23