/[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 91477 - (show annotations)
Sun Jan 14 09:47:13 2007 UTC (13 years ago) by ericb
File size: 2178 byte(s)
Synchronized with ISE 6.0.65740
1 indexing
2
3 description:
4 "Stacks implemented by resizable arrays"
5 legal: "See notice at end of class."
6
7 status: "See notice at end of class."
8 names: dispenser, array;
9 representation: array;
10 access: fixed, lifo, membership;
11 size: fixed;
12 contents: generic;
13 date: "$Date$"
14 revision: "$Revision$"
15
16 class ARRAYED_STACK [G] inherit
17
18 STACK [G]
19 undefine
20 copy, is_equal, prune_all, replace, is_inserted
21 redefine
22 linear_representation
23 select
24 remove, extend, put
25 end
26
27 ARRAYED_LIST [G]
28 rename
29 put as al_put,
30 extend as al_extend,
31 force as al_force,
32 remove as al_remove,
33 start as finish,
34 finish as start,
35 forth as back,
36 back as forth,
37 after as before,
38 before as after
39 export
40 {NONE} all
41 {ANY}
42 count, readable, writable, extendible,
43 make, wipe_out, valid_index, index, off
44 {STACK} before, after, start, finish, forth, back
45 {ARRAYED_STACK} valid_cursor, cursor, go_to, area,
46 subarray, subcopy, i_th, upper, lower
47 undefine
48 readable, writable,
49 append, fill
50 redefine
51 linear_representation
52 end
53
54 create
55 make
56
57 create {ARRAYED_STACK}
58 make_filled
59
60 feature -- Element change
61
62 extend, put, force (v: like item) is
63 -- Push `v' on top.
64 do
65 al_extend (v)
66 start
67 end
68
69 feature -- Removal
70
71 remove is
72 -- Remove top item.
73 require else
74 not_empty: count /= 0
75 do
76 al_remove
77 start
78 end
79
80 feature -- Conversion
81
82 linear_representation: ARRAYED_LIST [G] is
83 -- Representation as a linear structure
84 -- (in the reverse order of original insertion)
85 local
86 i: INTEGER
87 do
88 from
89 create Result.make (count)
90 i := count
91 until
92 i < 1
93 loop
94 Result.extend (i_th (i))
95 i := i - 1
96 end
97 end
98
99 indexing
100 library: "EiffelBase: Library of reusable components for Eiffel."
101 copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
102 license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
103 source: "[
104 Eiffel Software
105 356 Storke Road, Goleta, CA 93117 USA
106 Telephone 805-685-1006, Fax 805-685-6869
107 Website http://www.eiffel.com
108 Customer support http://support.eiffel.com
109 ]"
110
111
112
113
114
115
116
117 end -- class ARRAYED_STACK
118
119
120

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23