PageRenderTime 21ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/src/lib/backtracking/low_level/backtracking_sequence_list.e

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