A cursor that can be run over a tree. More...
#include <gecode/gist/nodecursor.hh>
Public Member Functions | |
| NodeCursor (Node *theNode, const typename Node::NodeAllocator &na) | |
| Construct cursor, initially set to theNode. | |
| Node * | node (void) |
| Return current node. | |
| unsigned int | alternative (void) |
| Return current alternative. | |
| void | alternative (unsigned int a) |
| Set current alternative. | |
Protected Member Functions | |
| void | node (Node *n) |
| Set current node to n. | |
| Node * | startNode (void) |
| Return start node. | |
Protected Attributes | |
| const Node::NodeAllocator & | na |
| The node allocator. | |
Cursor interface | |
| bool | mayMoveUpwards (void) |
| Test if the cursor may move to the parent node. | |
| void | moveUpwards (void) |
| Move cursor to the parent node. | |
| bool | mayMoveDownwards (void) |
| Test if cursor may move to the first child node. | |
| void | moveDownwards (void) |
| Move cursor to the first child node. | |
| bool | mayMoveSidewards (void) |
| Test if cursor may move to the first sibling. | |
| void | moveSidewards (void) |
| Move cursor to the first sibling. | |
Detailed Description
class Gecode::Gist::NodeCursor< Node >
A cursor that can be run over a tree.
Definition at line 43 of file nodecursor.hh.
Constructor & Destructor Documentation
◆ NodeCursor()
|
inline |
Construct cursor, initially set to theNode.
Definition at line 38 of file nodecursor.hpp.
Member Function Documentation
◆ node() [1/2]
|
inlineprotected |
Set current node to n.
Definition at line 62 of file nodecursor.hpp.
◆ startNode()
|
inlineprotected |
Return start node.
Definition at line 58 of file nodecursor.hpp.
◆ node() [2/2]
|
inline |
Return current node.
Definition at line 46 of file nodecursor.hpp.
◆ alternative() [1/2]
|
inline |
Return current alternative.
Definition at line 50 of file nodecursor.hpp.
◆ alternative() [2/2]
|
inline |
Set current alternative.
Definition at line 54 of file nodecursor.hpp.
◆ mayMoveUpwards()
|
inline |
Test if the cursor may move to the parent node.
Definition at line 66 of file nodecursor.hpp.
◆ moveUpwards()
|
inline |
Move cursor to the parent node.
Definition at line 72 of file nodecursor.hpp.
◆ mayMoveDownwards()
|
inline |
Test if cursor may move to the first child node.
Definition at line 89 of file nodecursor.hpp.
◆ moveDownwards()
|
inline |
Move cursor to the first child node.
Definition at line 95 of file nodecursor.hpp.
◆ mayMoveSidewards()
|
inline |
Test if cursor may move to the first sibling.
Definition at line 102 of file nodecursor.hpp.
◆ moveSidewards()
|
inline |
Move cursor to the first sibling.
Definition at line 109 of file nodecursor.hpp.
Member Data Documentation
◆ na
|
protected |
The node allocator.
Definition at line 53 of file nodecursor.hh.
The documentation for this class was generated from the following files:
- gecode/gist/nodecursor.hh
- gecode/gist/nodecursor.hpp
