tree_get_next_enum_tag_name

 

Description

Scan the current tree node for all child notes and find the next child node tag name. The first child is used to get the enumeration prefix. If the first child is not in the form of enumerated node, we return -1.

Syntax

int tree_get_next_enum_tag_name( const TreeNode & tr, string & strTag = NULL )

Parameters

tr
[input]A tree branch node that we need to scan for
strTag
[output]result tagName

Return

the enumeration index of the tag if successful, or -1 if tr is not a branch

Examples

EX1

void tree_get_next_enum_tag_name_ex1()
{        
    Tree tr;
    tr.AddNode("Node1");
    tr.AddNode("Node2");
    tr.AddNode("Node3");
 
    string strNextTagName;
    int nn = tree_get_next_enum_tag_name(tr, strNextTagName);
    out_str(strNextTagName);
}

Remark

See Also

header to Include

origin.h

Reference