Skip to main content

processNode

Short summary

This method appends (if they exists) the left and right child of the node to the nodelist.

Parameters

NameTypeCommentKind
nodeToProcessCNM_CollectionInterfaces.IBinaryTreeNode-input

Code

Declaration

METHOD PROTECTED processNode
VAR_INPUT
nodeToProcess : CNM_CollectionInterfaces.IBinaryTreeNode;
END_VAR

Implementation

IF(nodeToProcess.leftChild <> 0)THEN
THIS^.nodeList.append(nodeToProcess.leftChild);
END_IF
IF(nodeToProcess.rightChild <> 0)THEN
THIS^.nodeList.append(nodeToProcess.rightChild);
END_IF