/test/language/unclassified/aux_jlp8_cross.e

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