PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/test/language/unclassified/aux_jlp8_map.e

http://github.com/tybor/Liberty
Specman e | 63 lines | 34 code | 8 blank | 21 comment | 2 complexity | c5223f9f1f41d7b47e257a6ff1f99679 MD5 | raw file
 1-- This file is part of SmartEiffel The GNU Eiffel Compiler Tools and Libraries.
 2-- See the Copyright notice at the end of this file.
 3--
 4deferred class AUX_JLP8_MAP[E, F]
 5
 6inherit
 7   AUX_JLP8_OPERATOR[E]
 8   AUX_JLP8_PROVIDER[F]
 9      undefine is_runnable
10      end
11
12feature {ANY}
13   start
14      do
15         provider.start
16         if not exhausted then
17            item := map_operation(provider.item)
18         end
19      end
20
21   item: F
22
23   next
24      do
25         provider.next
26         if not exhausted then
27            item := map_operation(provider.item)
28         end
29      end
30
31   exhausted: BOOLEAN
32      do
33         Result := provider.exhausted
34      end
35
36   map_operation (e: E): F
37      deferred
38      end
39
40   item_action (e: E)
41      do
42         item := map_operation(e)
43      end
44
45end -- class AUX_JLP8_MAP
46--
47-- ------------------------------------------------------------------------------------------------------------------------------
48-- Copyright notice below. Please read.
49--
50-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
51-- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
52-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
53-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
54-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
55-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
56--
57-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P.       - University of Nancy 1 - FRANCE
58-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
59--
60-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
61--
62-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
63-- ------------------------------------------------------------------------------------------------------------------------------