AbstractBalancedBinarySearchTreeIterator
Short summary
This class provides the basic methods and functionalities for Balanced Binary Tree iterators.
| Access | Abstract | Final | Extends | Implements |
|---|---|---|---|---|
| Yes | No | AbstractIterator | IBBSTIterator |
UML Diagram
Parameters
none
Properties
changes
Type: __XWORD
root
Type: CNM_CollectionInterfaces.IBalancedBinarySearchTreeNode
Methods
attachTree
- Parameters:
tree(REFERENCE TO BalancedBinarySearchTree)
- Return type:
VOID
This method attaches an binary balances search tree to the iterator.…
FB_Exit
- Parameters:
bInCopyCode(BOOL): TRUE: the exit method is called in order to leave the instance which will be copied afterwards (online change).
- Return type:
BOOL
Mark the object as deleted, as it staiys in the memory.…
FB_init
- Parameters:
bInitRetains(BOOL): if TRUE, the retain variables are initialized (warm start / cold start)bInCopyCode(BOOL): if TRUE, the instance afterwards gets moved into the copy code (online change)tree(REFERENCE TO BalancedBinarySearchTree): The tree that should be iterated, can be 0
- Return type:
BOOL
The constructor FB_init is needed to create an unique hash code.…
getStartNode
- Return type: CNM_CollectionInterfaces.IBinaryTreeNode
This method is called to retrive the first node of the iteration.…
hasNext
- Return type:
BOOL
This method returns if there exists another element to iterate to.…
iterate
- Parameters:
execute(BOOL)
- Return type: CNM_ReturnTypes.SingleExecutionState
This method returns the next object in the iteration and returns an execution state.…
processStartNode
- Parameters:
nodeToProcess(CNM_CollectionInterfaces.IBinaryTreeNode)
- Return type:
VOID
This method is called in the initphase on the rootnode of the tree.…
reset
- Return type:
VOID
This method resets the iterator. …
Abstract methods
getNextTreeNode
- Return type:
BOOL
Gets the next Node that iterate should process.…
processNode
- Parameters:
nodeToProcess(CNM_CollectionInterfaces.IBinaryTreeNode)
- Return type:
VOID
This method is called when the node is taken from the nodelist.…
Code
Declaration
FUNCTION_BLOCK ABSTRACT AbstractBalancedBinarySearchTreeIterator EXTENDS AbstractIterator IMPLEMENTS IBBSTIterator
VAR
{attribute 'hide'}
tree :REFERENCE TO BalancedBinarySearchTree;
nodeList :LinkedList();
currentNode :CNM_CollectionInterfaces.IBinaryTreeNode;
END_VAR