/[eiffelstudio]/FreeELKS/trunk/library/structures/access/container.e
ViewVC logotype

Contents of /FreeELKS/trunk/library/structures/access/container.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 91424 - (show annotations)
Tue Oct 26 18:39:32 2004 UTC (15 years, 3 months ago) by manus_eiffel
File size: 2672 byte(s)
Initial revision

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23