PageRenderTime 112ms CodeModel.GetById 70ms app.highlight 1ms RepoModel.GetById 29ms app.codeStats 1ms

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