/[eiffelstudio]/FreeELKS/trunk/library/structures/dispenser/arrayed_stack.e
ViewVC logotype

Contents of /FreeELKS/trunk/library/structures/dispenser/arrayed_stack.e

Parent Directory Parent Directory | Revision Log Revision Log


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

1 indexing
2
3 description:
4 "Stacks implemented by resizable arrays"
5
6 status: "See notice at end of class"
7 names: dispenser, array;
8 representation: array;
9 access: fixed, lifo, membership;
10 size: fixed;
11 contents: generic;
12 date: "$Date$"
13 revision: "$Revision$"
14
15 class ARRAYED_STACK [G] inherit
16
17 STACK [G]
18 undefine
19 copy, is_equal, prune_all, replace, is_inserted
20 redefine
21 linear_representation
22 select
23 remove, extend, put
24 end
25
26 ARRAYED_LIST [G]
27 rename
28 put as al_put,
29 extend as al_extend,
30 force as al_force,
31 remove as al_remove,
32 start as finish,
33 finish as start,
34 forth as back,
35 back as forth,
36 after as before,
37 before as after
38 export
39 {NONE} all
40 {ANY}
41 count, readable, writable, extendible,
42 make, wipe_out, valid_index, index, off
43 {STACK} before, after, start, finish, forth, back
44 {ARRAYED_STACK} valid_cursor, cursor, go_to, area,
45 subarray, subcopy, i_th, upper, lower
46 undefine
47 readable, writable,
48 append, fill
49 redefine
50 linear_representation
51 end
52
53 create
54 make
55
56 create {ARRAYED_STACK}
57 make_filled
58
59 feature -- Element change
60
61 extend, put, force (v: like item) is
62 -- Push `v' on top.
63 do
64 al_extend (v)
65 start
66 end
67
68 feature -- Removal
69
70 remove is
71 -- Remove top item.
72 require else
73 not_empty: count /= 0
74 do
75 al_remove
76 start
77 end
78
79 feature -- Conversion
80
81 linear_representation: ARRAYED_LIST [G] is
82 -- Representation as a linear structure
83 -- (in the reverse order of original insertion)
84 local
85 i: INTEGER
86 do
87 from
88 create Result.make (count)
89 i := count
90 until
91 i < 1
92 loop
93 Result.extend (i_th (i))
94 i := i - 1
95 end
96 end
97
98 indexing
99
100 library: "[
101 EiffelBase: Library of reusable components for Eiffel.
102 ]"
103
104 status: "[
105 Copyright 1986-2001 Interactive Software Engineering (ISE).
106 For ISE customers the original versions are an ISE product
107 covered by the ISE Eiffel license and support agreements.
108 ]"
109
110 license: "[
111 EiffelBase may now be used by anyone as FREE SOFTWARE to
112 develop any product, public-domain or commercial, without
113 payment to ISE, under the terms of the ISE Free Eiffel Library
114 License (IFELL) at http://eiffel.com/products/base/license.html.
115 ]"
116
117 source: "[
118 Interactive Software Engineering Inc.
119 ISE Building
120 360 Storke Road, Goleta, CA 93117 USA
121 Telephone 805-685-1006, Fax 805-685-6869
122 Electronic mail <info@eiffel.com>
123 Customer support http://support.eiffel.com
124 ]"
125
126 info: "[
127 For latest info see award-winning pages: http://eiffel.com
128 ]"
129
130 end -- class ARRAYED_STACK
131
132
133

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23