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

/test/language/unclassified/aux_jlp8_matrix_rows.e

http://github.com/tybor/Liberty
Specman e | 75 lines | 42 code | 12 blank | 21 comment | 2 complexity | c66bcdac5b8f285ccdbf8a64db79b56e 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_MATRIX_ROWS[E -> NUMERIC]
 5
 6inherit
 7   AUX_JLP8_PROVIDER[AUX_JLP8_ROW_PROVIDER[E]]
 8      redefine is_runnable
 9      end
10
11feature {ANY}
12   make (m: AUX_JLP8_MATRIX[E])
13      do
14         matrix := m
15      end
16
17   start
18      do
19         row := 0
20         if not exhausted then
21            item := matrix.row(row)
22         end
23      end
24
25   next
26      do
27         row := row + matrix.incr_row
28         if not exhausted then
29            item := matrix.row(row)
30         end
31      end
32
33   exhausted: BOOLEAN
34      do
35         Result := row >= matrix.nb_row
36      end
37
38   item: AUX_JLP8_ROW_PROVIDER[E]
39
40   is_runnable: BOOLEAN
41      do
42         Result := matrix /= Void
43      end
44
45   aborted: BOOLEAN
46
47   abort
48      do
49         row := matrix.nb_row
50         aborted := True
51      end
52
53   matrix: AUX_JLP8_MATRIX[E]
54
55   row: INTEGER
56
57end -- class AUX_JLP8_MATRIX_ROWS
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-- ------------------------------------------------------------------------------------------------------------------------------