/test/language/unclassified/aux_scr1b.e

http://github.com/tybor/Liberty · Specman e · 60 lines · 30 code · 9 blank · 21 comment · 0 complexity · 87427b04016d702df32dd2c27a1b04a1 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. class AUX_SCR1B
  5. create {ANY}
  6. make
  7. feature {ANY}
  8. make
  9. do
  10. next := 0
  11. create clients.make(0, max_clients - 1)
  12. end
  13. feature {AUX_SCR1A}
  14. manage (d: AUX_SCR1A)
  15. require
  16. not_full: next < max_clients
  17. do
  18. clients.put(d, next)
  19. next := next + 1
  20. ensure
  21. job_done: is_managed(d)
  22. end
  23. is_managed (d: AUX_SCR1A): BOOLEAN
  24. do
  25. Result := True
  26. end
  27. feature {ANY}
  28. max_clients: INTEGER 99
  29. next: INTEGER
  30. clients: ARRAY[AUX_SCR1A]
  31. invariant
  32. clients_created: clients /= Void
  33. end -- class AUX_SCR1B
  34. --
  35. -- ------------------------------------------------------------------------------------------------------------------------------
  36. -- Copyright notice below. Please read.
  37. --
  38. -- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
  39. -- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
  40. -- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
  41. -- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
  42. -- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
  43. -- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  44. --
  45. -- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE
  46. -- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
  47. --
  48. -- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
  49. --
  50. -- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
  51. -- ------------------------------------------------------------------------------------------------------------------------------