

TRUE  
FALSE  
Specifies which nodes are visited during several of the tree functions, including traverse() and find().
TRAVERSE_LEAFS Specifies that only leaf nodes should be visited. TRAVERSE_NON_LEAFS Specifies that only nonleaf nodes should be visited. TRAVERSE_ALL Specifies that all nodes should be visited. TRAVERSE_MASK Combination of multiple traverse flags.
Specifies the type of traversal performed by traverse() and find().
PRE_ORDER Visits a node, then its children. IN_ORDER Visits a node’s left child first, then the node itself, then its right child. This is the one to use if you want the output sorted according to the compare function. POST_ORDER Visits the node’s children, then the node itself. LEVEL_ORDER Calls the function for each child of the node, then recursively visits each child.
Creates a new Tree::Nary object. Used to create the first node in a tree. Insert optional DATA into new created node.
Inserts a NODE beneath the PARENT at the given POSITION, returning inserted NODE. If POSITION is 1, NODE is inserted as the last child of PARENT.
Inserts a NODE beneath the PARENT before the given SIBLING, returning inserted NODE. If SIBLING is undef, the NODE is inserted as the last child of PARENT.
Inserts a NODE as the last child of the given PARENT, returning inserted NODE.
Inserts a NODE as the first child of the given PARENT, returning inserted NODE.
Inserts a <B>newB> node containing DATA, beneath the PARENT at the given POSITION. Returns the new inserted node.
Inserts a <B>newB> node containing DATA, beneath the PARENT, before the given SIBLING. Returns the new inserted node.
Inserts a <B>newB> node containing DATA as the last child of the given PARENT. Returns the new inserted node.
Inserts a <B>newB> node containing DATA as the first child of the given PARENT. Returns the new inserted node.
Reverses the order of the children of NODE. It doesn’t change the order of the grandchildren.
Traverses a tree starting at the given root NODE. It calls the given FUNCTION (with optional user DATA to pass to the FUNCTION) for each node visited.The traversal can be halted at any point by returning TRUE from FUNCTION.
The ORDER in which nodes are visited is one of IN_ORDER, PRE_ORDER, POST_ORDER and LEVEL_ORDER.
FLAGS specifies which types of children are to be visited, one of TRAVERSE_ALL, TRAVERSE_LEAFS and TRAVERSE_NON_LEAFS.
MAXDEPTH is the maximum depth of the traversal. Nodes below this depth will not be visited. If MAXDEPTH is 1, all nodes in the tree are visited. If MAXDEPTH is 1, only the root is visited. If MAXDEPTH is 2, the root and its children are visited. And so on.
Calls a FUNCTION (with optional user DATA to pass to the FUNCTION) for each of the children of a NODE. Note that it doesn’t descend beneath the child nodes. FLAGS specifies which types of children are to be visited, one of TRAVERSE_ALL, TRAVERSE_LEAFS and TRAVERSE_NON_LEAFS.
Gets the root node of a tree, starting from NODE.
Finds a NODE in a tree with the given DATA.The ORDER in which nodes are visited is one of IN_ORDER, PRE_ORDER, POST_ORDER and LEVEL_ORDER.
FLAGS specifies which types of children are to be searched, one of TRAVERSE_ALL, TRAVERSE_LEAFS and TRAVERSE_NON_LEAFS.
Returns the found node, or undef if the DATA is not found.
Finds the first child of a NODE with the given DATA.FLAGS specifies which types of children are to be searched, one of TRAVERSE_ALL, TRAVERSE_LEAFS and TRAVERSE_NON_LEAFS.
Returns the found child node, or undef if the DATA is not found.
Gets the position of the first child of a NODE which contains the given DATA. Returns the index of the child of node which contains data, or 1 if DATA is not found.
Gets the position of a NODE with respect to its siblings. CHILD must be a child of NODE. The first child is numbered 0, the second 1, and so on. Returns the position of CHILD with respect to its siblings.
Returns the first child of a NODE. Returns undef if NODE is undef or has no children.
Returns the last child of a NODE. Returns undef if NODE is undef or has no children.
Gets a child of a NODE, using the given INDEX. The first child is at INDEX 0. If the INDEX is too big, undef is returned. Returns the child of NODE at INDEX.
Returns the first sibling of a NODE. This could possibly be the NODE itself.
Returns the previous sibling of a NODE.
Returns the next sibling of a NODE.
Returns the last sibling of a NODE. This could possibly be the NODE itself.
Returns TRUE if NODE is a leaf node (no children).
Returns TRUE if NODE is a root node (no parent nor siblings).
Returns the depth of NODE. If NODE is undef, the depth is 0. The root node has a depth of 1. For the children of the root node, the depth is 2. And so on.
Returns the number of nodes in a tree.FLAGS specifies which types of children are to be counted, one of TRAVERSE_ALL, TRAVERSE_LEAFS and TRAVERSE_NON_LEAFS.
Returns the number of children of NODE.
Returns TRUE if NODE is an ancestor of DESCENDANT. This is true if NODE is the parent of DESCENDANT, or if NODE is the grandparent of DESCENDANT, etc.
Returns the maximum height of all branches beneath NODE. This is the maximum distance from NODE to all leaf nodes.If NODE is undef, 0 is returned. If NODE has no children, 1 is returned. If NODE has children, 2 is returned. And so on.
Sorts all the children references of NODE according to the data field.
Returns the normalized shape of NODE.
Returns TRUE if NODE and ANOTHER_NODE have same structures and contents.
Returns TRUE if the structure of NODE and ANOTHER_NODE are identical.
Unlinks NODE from a tree, resulting in two separate trees. The NODE to unlink becomes the root of a new tree.
An example for each function can be found in the test suite bundled with <B>Tree::NaryB>.
Frederic Soriano, <fsoriano@cpan.org>
This package is free software and is provided as is without express or implied warranty. It may be used, redistributed and/or modified under the same terms as Perl itself.
API from the GLIB project, http://developer.gnome.org/doc/API/glib/glibnarytrees.html.
Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 1342: You forgot a ’=back’ before ’=head2’ Around line 1347: ’=item’ outside of any ’=over’ Around line 1363: You forgot a ’=back’ before ’=head2’ Around line 1367: ’=item’ outside of any ’=over’ Around line 1384: You forgot a ’=back’ before ’=head1’
perl v5.20.3  TREE::NARY (3)  20040105 
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.