/src/tools/interpreter/liberty_interpreter_native_array_iterator.e
Specman e | 64 lines | 40 code | 10 blank | 14 comment | 0 complexity | e97e74f03bd62d80b62b4c3054ae7644 MD5 | raw file
1-- This file is part of Liberty Eiffel. 2-- 3-- Liberty Eiffel is free software: you can redistribute it and/or modify 4-- it under the terms of the GNU General Public License as published by 5-- the Free Software Foundation, version 3 of the License. 6-- 7-- Liberty Eiffel is distributed in the hope that it will be useful, 8-- but WITHOUT ANY WARRANTY; without even the implied warranty of 9-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10-- GNU General Public License for more details. 11-- 12-- You should have received a copy of the GNU General Public License 13-- along with Liberty Eiffel. If not, see <http://www.gnu.org/licenses/>. 14-- 15class LIBERTY_INTERPRETER_NATIVE_ARRAY_ITERATOR[E_] 16 17inherit 18 ITERATOR[LIBERTY_INTERPRETER_OBJECT] 19 20creation {LIBERTY_INTERPRETER_NATIVE_ARRAY_TYPED} 21 make 22 23feature {ANY} 24 start is 25 do 26 elements.start 27 end 28 29 is_off: BOOLEAN is 30 do 31 Result := elements.is_off 32 end 33 34 item: LIBERTY_INTERPRETER_OBJECT is 35 do 36 Result := accessor.retrieve(elements.item) 37 end 38 39 next is 40 do 41 elements.next 42 end 43 44feature {} 45 make (a_elements: like elements; a_accessor: like accessor) is 46 require 47 a_elements /= Void 48 a_accessor /= Void 49 do 50 elements := a_elements 51 accessor := a_accessor 52 ensure 53 elements = a_elements 54 accessor = a_accessor 55 end 56 57 elements: ITERATOR[E_] 58 accessor: LIBERTY_INTERPRETER_NATIVE_ARRAY_ACCESSOR_TYPED[E_] 59 60invariant 61 elements /= Void 62 accessor /= Void 63 64end -- class LIBERTY_INTERPRETER_NATIVE_ARRAY_ITERATOR