/[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 91477 - (show annotations)
Sun Jan 14 09:47:13 2007 UTC (13 years ago) by ericb
File size: 2258 byte(s)
Synchronized with ISE 6.0.65740
1 indexing
2
3 description: "[
4 Data structures of the most general kind,
5 used to hold zero or more items.
6 ]"
7 legal: "See notice at end of class."
8
9 status: "See notice at end of class."
10 names: access;
11 access: membership;
12 contents: generic;
13 date: "$Date$"
14 revision: "$Revision$"
15
16 deferred class
17 CONTAINER [G]
18
19 feature -- Access
20
21 has (v: G): BOOLEAN is
22 -- Does structure include `v'?
23 -- (Reference or object equality,
24 -- based on `object_comparison'.)
25 deferred
26 ensure
27 not_found_in_empty: Result implies not is_empty
28 end
29
30 feature -- Status report
31
32 is_empty: BOOLEAN is
33 -- Is there no element?
34 deferred
35 end
36
37 empty: BOOLEAN is
38 -- Is there no element?
39 obsolete
40 "ELKS 2000: Use `is_empty' instead"
41 do
42 Result := is_empty
43 end
44
45 object_comparison: BOOLEAN
46 -- Must search operations use `equal' rather than `='
47 -- for comparing references? (Default: no, use `='.)
48
49 changeable_comparison_criterion: BOOLEAN is
50 -- May `object_comparison' be changed?
51 -- (Answer: yes by default.)
52 do
53 Result := True
54 end
55
56 feature -- Status setting
57
58 compare_objects is
59 -- Ensure that future search operations will use `equal'
60 -- rather than `=' for comparing references.
61 require
62 changeable_comparison_criterion: changeable_comparison_criterion
63 do
64 object_comparison := True
65 ensure
66 object_comparison
67 end
68
69 compare_references is
70 -- Ensure that future search operations will use `='
71 -- rather than `equal' for comparing references.
72 require
73 changeable_comparison_criterion: changeable_comparison_criterion
74 do
75 object_comparison := False
76 ensure
77 reference_comparison: not object_comparison
78 end
79
80 feature -- Conversion
81
82 linear_representation: LINEAR [G] is
83 -- Representation as a linear structure
84 deferred
85 end
86
87 indexing
88 library: "EiffelBase: Library of reusable components for Eiffel."
89 copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
90 license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
91 source: "[
92 Eiffel Software
93 356 Storke Road, Goleta, CA 93117 USA
94 Telephone 805-685-1006, Fax 805-685-6869
95 Website http://www.eiffel.com
96 Customer support http://support.eiffel.com
97 ]"
98
99
100
101
102
103
104
105 end -- class CONTAINER
106
107
108

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23