2.3.1.97 GETN_USE_CURR


Name

GETN_USE_CURR

Declaration

#define GETN_USE_CURR(_TR_NAME)	TreeNode _tmpNode = _TR_NAME; TreeNode _tmpSubNode = _TR_NAME; string _strTemp;

Remark

GETN_USE_CURR can direct reuse an already created treenode. It's mostly the same as GETN_USE, the only difference is GETN_USE_CURR provide a possibility to modify this reuse treenode, but NOT it's subnode.

Parameters

_TR_NAME
[input] Treenode of the exist node

Return

Examples

EX1

#include <GetNbox.h>
void getNewLabel( TreeNode &trN )
{
    GETN_USE_CURR(trN)
    TREE_ADD_LABEL("New Points");                   
}
void GETN_USE_CURR_ex1()
{
    GETN_TREE(testTree)
 
    GETN_CHECK(FitAllCurves, "Fit All Curves", 0)
          GETN_BEGIN_BRANCH(Fit, "Fitting Options")//Match GETN_END_BRANCH
           GETN_CHECK(FixIntercept, "Fix Intercept", 0)
        GETN_CHECK(FixSlope, "Fix Slope", 0)
       GETN_END_BRANCH(Fit)    //Match GETN_BEGIN_BRANCH
    GETN_NUM(Points, "Points", 20)
       
    TreeNode trNode = testTree.Points;
    getNewLabel(trNode);
    
    if(GetNBox(testTree, NULL, NULL, NULL, NULL))
        out_tree(testTree);
}

See Also

GETN_USE

Header to Include

GetNBox.h

Reference