
A cursor that can be run over a tree. More...
#include <nodecursor.hh>
Public Member Functions | |
| NodeCursor (Node *theNode, const typename Node::NodeAllocator &na) | |
| Construct cursor, initially set to theNode. More... | |
| Node * | node (void) |
| Return current node. More... | |
| unsigned int | alternative (void) |
| Return current alternative. More... | |
| void | alternative (unsigned int a) |
| Set current alternative. More... | |
Protected Member Functions | |
| void | node (Node *n) |
| Set current node to n. More... | |
| Node * | startNode (void) |
| Return start node. More... | |
Protected Attributes | |
| const Node::NodeAllocator & | na |
| The node allocator. More... | |
Cursor interface | |
| bool | mayMoveUpwards (void) |
| Test if the cursor may move to the parent node. More... | |
| void | moveUpwards (void) |
| Move cursor to the parent node. More... | |
| bool | mayMoveDownwards (void) |
| Test if cursor may move to the first child node. More... | |
| void | moveDownwards (void) |
| Move cursor to the first child node. More... | |
| bool | mayMoveSidewards (void) |
| Test if cursor may move to the first sibling. More... | |
| void | moveSidewards (void) |
| Move cursor to the first sibling. More... | |
A cursor that can be run over a tree.
Definition at line 47 of file nodecursor.hh.
|
inline |
Construct cursor, initially set to theNode.
Definition at line 42 of file nodecursor.hpp.
|
inlineprotected |
Set current node to n.
Definition at line 66 of file nodecursor.hpp.
|
inlineprotected |
Return start node.
Definition at line 62 of file nodecursor.hpp.
|
inline |
Return current node.
Definition at line 50 of file nodecursor.hpp.
|
inline |
Return current alternative.
Definition at line 54 of file nodecursor.hpp.
|
inline |
Set current alternative.
Definition at line 58 of file nodecursor.hpp.
|
inline |
Test if the cursor may move to the parent node.
Definition at line 70 of file nodecursor.hpp.
|
inline |
Move cursor to the parent node.
Definition at line 76 of file nodecursor.hpp.
|
inline |
Test if cursor may move to the first child node.
Definition at line 93 of file nodecursor.hpp.
|
inline |
Move cursor to the first child node.
Definition at line 99 of file nodecursor.hpp.
|
inline |
Test if cursor may move to the first sibling.
Definition at line 106 of file nodecursor.hpp.
|
inline |
Move cursor to the first sibling.
Definition at line 113 of file nodecursor.hpp.
|
protected |
The node allocator.
Definition at line 57 of file nodecursor.hh.