/[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 94461 - (hide annotations)
Fri Feb 21 15:39:42 2014 UTC (5 years, 9 months ago) by polikarn
File size: 1089 byte(s)
Fixes in model replacement mechanism. Verified LIST (except remove, remove_all). Cleaned up base2.
1 polikarn 94307 note
2     description: "Iterators to read from and update mutable sequences."
3     author: "Nadia Polikarpova"
4     model: target, sequence, index
5    
6     deferred class
7     V_MUTABLE_SEQUENCE_ITERATOR [G]
8    
9     inherit
10     V_SEQUENCE_ITERATOR [G]
11     redefine
12 polikarn 94461 target,
13     index
14 polikarn 94307 end
15    
16     V_IO_ITERATOR [G]
17     redefine
18     target,
19 polikarn 94461 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     index: INTEGER
31     -- Current position.
32    
33 polikarn 94307 feature -- Replacement
34    
35     put (v: G)
36     -- Replace item at current position with `v'.
37     require else
38     modify_model (["map"], target)
39     deferred
40     ensure then
41     target_map_effect: target.map ~ old (target.map.updated (target.lower + index - 1, v))
42     end
43    
44     note
45     copyright: "Copyright (c) 1984-2014, Eiffel Software and others"
46     license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
47     source: "[
48     Eiffel Software
49     5949 Hollister Ave., Goleta, CA 93117 USA
50     Telephone 805-685-1006, Fax 805-685-6869
51     Website http://www.eiffel.com
52     Customer support http://support.eiffel.com
53     ]"
54     end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23