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