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

/test/language/unclassified/aux_jlp8_row_provider.e

http://github.com/tybor/Liberty
Specman e | 75 lines | 40 code | 14 blank | 21 comment | 2 complexity | b20001afb611f56be757030786f831eb 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--
 4class AUX_JLP8_ROW_PROVIDER[E -> NUMERIC]
 5
 6inherit
 7   AUX_JLP8_PROVIDER[E]
 8
 9create {ANY}
10   make
11
12feature {ANY}
13   abort
14      do
15      end
16
17   make (m: AUX_JLP8_MATRIX[E]; r: INTEGER)
18      do
19         matrix := m
20         row := r
21         incr := m.incr_row
22      end
23
24   start
25      do
26         index := 0
27         if not exhausted then
28            item := matrix.item(row, index)
29         end
30      end
31
32   next
33      do
34         index := index + incr
35         if not exhausted then
36            item := matrix.item(row, index)
37         end
38      end
39
40   item: E
41
42   exhausted: BOOLEAN
43      do
44         Result := index >= matrix.nb_column
45      end
46
47   aborted: BOOLEAN
48
49   row: INTEGER
50
51   matrix: AUX_JLP8_MATRIX[E]
52
53   incr: INTEGER
54
55   index: INTEGER
56
57end -- class AUX_JLP8_ROW_PROVIDER
58--
59-- ------------------------------------------------------------------------------------------------------------------------------
60-- Copyright notice below. Please read.
61--
62-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
63-- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
64-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
65-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
66-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
67-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
68--
69-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P.       - University of Nancy 1 - FRANCE
70-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
71--
72-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
73--
74-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
75-- ------------------------------------------------------------------------------------------------------------------------------