PageRenderTime 27ms CodeModel.GetById 25ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 1ms

/tutorial/backtracking/logigram/item.e

http://github.com/tybor/Liberty
Specman e | 57 lines | 30 code | 9 blank | 18 comment | 0 complexity | 41191f3699c05d7b41e484d72f619187 MD5 | raw file
 1-- See the Copyright notice at the end of this file.
 2--
 3deferred class ITEM
 4
 5inherit
 6	HASHABLE
 7	ANY
 8
 9feature {ANY}
10	group: GROUP
11
12	name: STRING
13
14	index: INTEGER is
15		require
16			not is_off
17		deferred
18		end
19
20	is_like_integer: BOOLEAN is
21		do
22			Result := group.is_like_integer
23		end
24
25	to_integer: INTEGER is
26		require
27			is_like_integer
28			not is_off
29		deferred
30		end
31
32	is_off: BOOLEAN is
33		deferred
34		end
35
36	hash_code: INTEGER is
37		do
38			Result := to_pointer.hash_code
39		end
40
41end -- class ITEM
42--
43-- ------------------------------------------------------------------------------------------------------------------------------
44-- Copyright notice below. Please read.
45--
46-- This file is free software, which comes along with SmartEiffel. This software is distributed in the hope that it will be
47-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48-- You can modify it as you want, provided this footer is kept unaltered, and a notification of the changes is added.
49-- You are allowed to redistribute it and sell it, alone or as a part of another product.
50--
51-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P.       - University of Nancy 1 - FRANCE
52-- Copyright(C) 2003-2005: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
53--
54-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
55--
56-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
57-- ------------------------------------------------------------------------------------------------------------------------------