BalancedBinarySearchTreeNode
Short summary
Class for a balanced, binary, search tree node
| Access | Abstract | Final | Extends | Implements |
|---|---|---|---|---|
| - | No | No | AbstractDisposableContainer | CNM_CollectionInterfaces.IBalancedBinarySearchTreeNode |
UML Diagram
Parameters
none
Properties
balance
Type: CNM_CollectionInterfaces.TreeBalance
This property represents the balance state for this node, for details see Tree_Balance from Interfacelib…
className
Type: CNM_AbstractObject.ClassName
This abstract property returns the class name of the concrete object, …
leftChild
Type: CNM_CollectionInterfaces.IBinaryTreeNode
This property points to the left child of a binary tree node.…
object
Type: CNM_AbstractObject.IObject
The property points to the content of the treenode. …
rightChild
Type: CNM_CollectionInterfaces.IBinaryTreeNode
This property points to the right child of an binarytreeenode.…
Methods
clearContents
- Return type:
VOID
This method is called in the destruct method and is intended to zero all references and interfaces that should not be destructed. …
clone
- Return type: CNM_AbstractObject.CNM_ReturnTypes.CloneResult
This method is used to create a new instance…
compareTo
- Parameters:
object(CNM_AbstractObject.IObject): foreign object to compare
- Return type: CNM_AbstractObject.CNM_ReturnTypes.ComparationResult
This method compares a foreign object with the own one, this is needed for sort orders.…
deepClone
- Return type: CNM_AbstractObject.CNM_ReturnTypes.CloneResult
This method is used to create a new instance…
destructNodeAndAllChilds
- Parameters:
node(CNM_CollectionInterfaces.IBinaryTreeNode): the node that should be destructed with all it's childs
- Return type:
VOID
destructs / deepdestructs all nodes in the subtrees of a specified node and this node…
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)value(CNM_AbstractObject.IObject)left(CNM_CollectionInterfaces.IBalancedBinarySearchTreeNode)right(CNM_CollectionInterfaces.IBalancedBinarySearchTreeNode)
- Return type:
BOOL
The constructor FB_init is needed to create an unique hash code.…
Code
Declaration
{attribute 'enable_dynamic_creation'}
FUNCTION_BLOCK BalancedBinarySearchTreeNode EXTENDS AbstractDisposableContainer IMPLEMENTS CNM_CollectionInterfaces.IBalancedBinarySearchTreeNode
VAR
nodevalue :CNM_AbstractObject.IObject;
left :CNM_CollectionInterfaces.IBinaryTreeNode;
right :CNM_CollectionInterfaces.IBinaryTreeNode;
nodebalance :CNM_CollectionInterfaces.TreeBalance;
END_VAR