PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/tutorial/backtracking/logigram/constraints/constraint_couple.e

http://github.com/tybor/Liberty
Specman e | 52 lines | 21 code | 6 blank | 25 comment | 0 complexity | ed975686693b81cad76ded338d29b2a1 MD5 | raw file
 1-- See the Copyright notice at the end of this file.
 2--
 3deferred class CONSTRAINT_COUPLE
 4	--
 5	-- constraint on a couple of items NOT in the same group
 6	--
 7
 8inherit
 9	CONSTRAINT
10
11feature {ANY}
12	item1, item2: ITEM
13			-- the couple of items
14
15	make (i1, i2: ITEM) is
16			-- creation
17		require
18			i1.group /= i2.group
19		do
20			item1 := i1
21			item2 := i2
22		end
23
24	get_items (collector: ITEM_COLLECTOR) is
25			-- collect the items
26		do
27			collector.put(item1)
28			collector.put(item2)
29		end
30
31	build_masks (builder: MASK_BUILDER) is
32			-- creation of the mask for the constaint
33		deferred
34		end
35
36end -- class CONSTRAINT_COUPLE
37--
38-- ------------------------------------------------------------------------------------------------------------------------------
39-- Copyright notice below. Please read.
40--
41-- This file is free software, which comes along with SmartEiffel. This software is distributed in the hope that it will be
42-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
43-- You can modify it as you want, provided this footer is kept unaltered, and a notification of the changes is added.
44-- You are allowed to redistribute it and sell it, alone or as a part of another product.
45--
46-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P.       - University of Nancy 1 - FRANCE
47-- Copyright(C) 2003-2005: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
48--
49-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
50--
51-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
52-- ------------------------------------------------------------------------------------------------------------------------------