PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/src/lib/backtracking/node/backtracking_node_list.e

http://github.com/tybor/Liberty
Specman e | 76 lines | 39 code | 9 blank | 28 comment | 0 complexity | 422e132d23971f7656a99612d57c23b1 MD5 | raw file
 1-- This file is part of a Liberty Eiffel library.
 2-- See the full copyright at the end.
 3--
 4deferred class BACKTRACKING_NODE_LIST
 5   --
 6   -- Node for a sequence of list of nodes
 7   --
 8
 9inherit
10   BACKTRACKING_NODE
11      undefine
12         fill_tagged_out_memory
13      end
14
15insert
16   BACKTRACKING_NODE_FILL
17
18feature {ANY}
19   node: BACKTRACKING_NODE
20         -- first node of the list
21
22   next: like Current
23         -- remaining of the list
24
25   make (nod: BACKTRACKING_NODE; nxt: like next)
26      require
27         value_not_void: nod /= Void
28      do
29         node := nod
30         next := nxt
31      ensure
32         definition: node = nod and next = nxt
33         node_not_void: node /= Void
34      end
35
36   set_node (value: BACKTRACKING_NODE)
37      require
38         value_not_void: value /= Void
39      do
40         node := value
41      ensure
42         definition: node = value
43         node_not_void: node /= Void
44      end
45
46   set_next (value: like next)
47      do
48         next := value
49      ensure
50         definition: next = value
51      end
52
53invariant
54   node_not_void: node /= Void
55
56end -- class BACKTRACKING_NODE_LIST
57--
58-- Copyright (C) 2009-2017: by all the people cited in the AUTHORS file.
59--
60-- Permission is hereby granted, free of charge, to any person obtaining a copy
61-- of this software and associated documentation files (the "Software"), to deal
62-- in the Software without restriction, including without limitation the rights
63-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
64-- copies of the Software, and to permit persons to whom the Software is
65-- furnished to do so, subject to the following conditions:
66--
67-- The above copyright notice and this permission notice shall be included in
68-- all copies or substantial portions of the Software.
69--
70-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
71-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
72-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
73-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
74-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
75-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
76-- THE SOFTWARE.