Migration Guide > Migration Guide > I. Features Introduced in OpenROAD 6.2 > Changes to Existing Features > Tree Class Gets New and Updated Attributes and Methods
Was this helpful?
Tree Class Gets New and Updated Attributes and Methods
The Tree class, used to manage data that has a hierarchical structure, has the following new attribute:
CheckedNodes
Data Type: array of TreeNode
4GL Access: R
The CheckedNodes attribute is an array of all treenodes that have the IsChecked attribute set. Use the IsChecked attribute to add or subtract nodes from this array.
The Tree class has the following new methods:
CopyNode
Copies a node or branch from one place in a tree to another place in the same tree or a different tree.
MoveNode
Moves a node or branch from one place in a tree to another place in the same tree or a different tree.
SetBranchChecked
Sets all descendants of a node (optionally including the node itself) to be either checked or not checked. If the node is not specified or null, then all nodes of the tree are to have their IsChecked state set.
Sort
Sorts treenodes on one attribute or on an array of attributes.
The following methods are changed in this version of OpenROAD:
AddNode
The AddNode method adds a new node to the tree. The following settings are added to the relation parameter:
TN_CHILDBYLABEL_ASC—Specifies that the new node is to be a child of the relative and is to be inserted among the children, sorted by label in ASCII ascending order
TN_CHILDBYLABEL_DESC—Similar to TN_CHILDBYLABEL_ASC, except inserts in ASCII descending order
TN_CHILDBYKEY_ASC—Similar to TN_CHILDBYLABEL_ASC, except sorts by Key and not by TextLabel
TN_CHILDBYKEY_DESC—Similar to TN_CHILDBYKEY_ASC, except inserts in ASCII descending order
StartTraverse
Specifies the node to start traversing from. If the node is set to NULL or is unspecified, then all nodes of the tree are to be traversed.
For complete information about the Tree class, see the Language Reference Guide.
Last modified date: 06/25/2024