PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/src/tools/statue/liberty_enlightening_the_world.e

http://github.com/tybor/Liberty
Specman e | 50 lines | 27 code | 6 blank | 17 comment | 0 complexity | c715badb4e8758ca5cc49a46406e3fdc 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--
15expanded class LIBERTY_ENLIGHTENING_THE_WORLD
16--
17-- Allows to ensure that the compiler is still progressing. Useful to avoid staying stuck in an infinite loop.
18--
19
20insert
21   LOGGING
22
23feature {ANY}
24   burn is
25      do
26         torch.increment
27         debug
28            log.trace.put_string(once "FLAME: ")
29            log.trace.put_integer(torch.value)
30            log.trace.put_new_line
31         end
32      end
33
34   flame: LIBERTY_FLAME is
35      do
36         Result.set(torch.value)
37      end
38
39   still_burns (a_flame: like flame): BOOLEAN is
40      do
41         Result := torch.value > a_flame.light
42      end
43
44feature {}
45   torch: COUNTER is
46      once
47         create Result
48      end
49
50end -- class LIBERTY_ENLIGHTENING_THE_WORLD