get_node_label

 

Description

Get the treenode Label, if not Label will return tagName.

Syntax

string get_node_label( const TreeNode & tr, bool bGetLabelFirst = true )

Parameters

tr
[input] TreeNode want to get Label.
bGetLabelFirst
[input] If true, will get Label if exist, else get tagName, if not label, return tagName.

Return

Return the Label of the treenode, if not label return tagName; if bGetLabelFirst = false, return tagname.

Examples

EX1

int    get_node_label_ex1()
{
    Tree    tr;
    TreeNode tn = tr.AddNode("tagName");
    tn.SetAttribute(STR_LABEL_ATTRIB,"Label");
    string strTagName = get_node_label(tn, false);
    string strLabel = get_node_label(tn);
    return 1;
}

Remark

See Also

header to Include

origin.h

Reference