TreeNode::NextNode

ClassName

TreeNode

AccessType

public

Name

NextNode

Declaration

TreeNode NextNode

Remark

Examples

EX1

void TreeNode_NextNode_ex1()
{
    Tree myTree1;
    TreeNode tn1, tn11, tn12, tnTmp;
    tn1 = myTree1.AddTextNode("abc", "Name", 1);
    tn11 = tn1.AddTextNode("def", "Addr", 11);
    tn12 = tn1.AddTextNode("ghi", "Mail", 12);
    out_tree(myTree1);
    /*
            myTree1
               |
            Name(abc)
           /        \
     Addr(def)  Mail(ghi)
    */
 
    tnTmp = tn1.FirstNode;    // Start enumerating from the first node
    while(tnTmp.IsValid())
    {
        out_str("Tag name = " + tnTmp.tagName);
        tnTmp = tnTmp.NextNode;       // Forward visiting
    }
}

Description

read only. The next adjacent node of this node.

Header to Include

origin.h

See Also

TreeNode::PrevNode, TreeNode::FirstNode, TreeNode::LastNode, TreeNode::NextLeaf

Reference