/[eiffelstudio]/branches/eth/eve/Src/library/base/base2/iterator/sequence/v_mutable_sequence_iterator.e
ViewVC logotype

Annotation of /branches/eth/eve/Src/library/base/base2/iterator/sequence/v_mutable_sequence_iterator.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 94604 - (hide annotations)
Sat Mar 15 14:57:57 2014 UTC (5 years, 8 months ago) by polikarn
File size: 1136 byte(s)
Removed an unsoundness caused by merging attributes with multiple inheritance. Fixed bug with frozen types vs. frozen classes.
1 polikarn 94307 note
2     description: "Iterators to read from and update mutable sequences."
3     author: "Nadia Polikarpova"
4 polikarn 94492 model: target, sequence, index_
5 polikarn 94307
6     deferred class
7     V_MUTABLE_SEQUENCE_ITERATOR [G]
8    
9     inherit
10     V_SEQUENCE_ITERATOR [G]
11     redefine
12 polikarn 94461 target,
13 polikarn 94492 index_
14 polikarn 94307 end
15    
16     V_IO_ITERATOR [G]
17     redefine
18     target,
19 polikarn 94492 index_,
20 polikarn 94307 put
21     end
22    
23     feature -- Access
24    
25     target: V_MUTABLE_SEQUENCE [G]
26     -- Sequence to iterate over.
27    
28 polikarn 94461 feature -- Measurement
29    
30 polikarn 94492 index_: INTEGER
31 polikarn 94461 -- Current position.
32 polikarn 94604 note
33     status: ghost
34     attribute
35     end
36 polikarn 94461
37 polikarn 94307 feature -- Replacement
38    
39     put (v: G)
40     -- Replace item at current position with `v'.
41     require else
42     modify_model (["map"], target)
43     deferred
44     ensure then
45 polikarn 94492 target_map_effect: target.map ~ old (target.map.updated (target.lower + index_ - 1, v))
46 polikarn 94307 end
47    
48     note
49     copyright: "Copyright (c) 1984-2014, Eiffel Software and others"
50     license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
51     source: "[
52     Eiffel Software
53     5949 Hollister Ave., Goleta, CA 93117 USA
54     Telephone 805-685-1006, Fax 805-685-6869
55     Website http://www.eiffel.com
56     Customer support http://support.eiffel.com
57     ]"
58     end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23