PageRenderTime 17ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/lib/backtracking/low_level/backtracking_sequence.e

http://github.com/tybor/Liberty
Specman e | 59 lines | 24 code | 6 blank | 29 comment | 0 complexity | 7187489964944a413002b7b651c0af67 MD5 | raw file
 1-- This file is part of a Liberty Eiffel library.
 2-- See the full copyright at the end.
 3--
 4class BACKTRACKING_SEQUENCE
 5   --
 6   -- A single node sequence.
 7   --
 8
 9inherit
10   ABSTRACT_BACKTRACKING_SEQUENCE
11      rename pool as pool_of_sequence
12      end
13
14insert
15   BACKTRACKING_GLOBALS
16
17feature {ABSTRACT_BACKTRACKING}
18   next: BACKTRACKING_NODE
19         -- next node
20
21   set_next (value: BACKTRACKING_NODE)
22      require
23         value_not_void: value /= Void
24      do
25         next := value
26      ensure
27         definition: next = value
28         next_not_void: next /= Void
29      end
30
31   next_sequence (explorer: BACKTRACKING)
32      do
33         -- Tell to evaluate 'next' now.
34         explorer.set_current_node(next)
35         -- Sequence is off, remove it.
36         explorer.pop_sequence
37      end
38
39end -- class BACKTRACKING_SEQUENCE
40--
41-- Copyright (C) 2009-2017: by all the people cited in the AUTHORS file.
42--
43-- Permission is hereby granted, free of charge, to any person obtaining a copy
44-- of this software and associated documentation files (the "Software"), to deal
45-- in the Software without restriction, including without limitation the rights
46-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
47-- copies of the Software, and to permit persons to whom the Software is
48-- furnished to do so, subject to the following conditions:
49--
50-- The above copyright notice and this permission notice shall be included in
51-- all copies or substantial portions of the Software.
52--
53-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
54-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
55-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
56-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
57-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
58-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
59-- THE SOFTWARE.