PageRenderTime 16ms CodeModel.GetById 10ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/src/tools/compiler/asm/data/liberty_asm_system.e

http://github.com/tybor/Liberty
Specman e | 56 lines | 35 code | 7 blank | 14 comment | 0 complexity | 752c71c696edea1143328b7c03d1770d 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--
15class LIBERTY_ASM_SYSTEM
16
17insert
18   ANY
19      redefine
20         is_equal
21      end
22
23create {ANY}
24   make
25
26feature {ANY}
27   types: COLLECTION[LIBERTY_ASM_TYPE]
28   main: LIBERTY_ASM_METHOD
29
30   is_equal (other: like Current): BOOLEAN is
31      do
32         Result := types.count = other.types.count
33            and then types.for_all(agent other.types.has)
34            and then main.is_equal(other.main)
35      end
36
37feature {}
38   make (a_types: like types; a_main: like main) is
39      require
40         a_types /= Void
41         a_main /= Void
42         a_types.fast_has(a_main.type)
43      do
44         types := a_types
45         main := a_main
46      ensure
47         types = a_types
48         main = a_main
49      end
50
51invariant
52   types /= Void
53   main /= Void
54   types.fast_has(main.type)
55
56end -- class LIBERTY_ASM_SYSTEM