GETN_CURRENT_SUBNODE

 

Name

GETN_CURRENT_SUBNODE

Declaration

#define GETN_CURRENT_SUBNODE        _tmpSubNode

Remark

The current node. It can be used when want to pass the current tree node to other functions.

Examples

EX1

#include <GetNbox.h>
void GETN_CURRENT_SUBNODE_ex1()
{
    GETN_BOX(testTree)
 
        GETN_CHECK(FitAllCurves, "Fit All Curves", 0)

        GETN_AMENU_BEGIN_BRANCH(Fit, "Fitting Options")        //Match GETN_END_BRANCH
                GETN_CHECK(FixIntercept, "Fix Intercept", 0)
                add_subnode(GETN_CURRENT_SUBNODE);                    //pass the current tree node to other functions. 
                GETN_CHECK(FixSlope, "Fix Slope", 0)
        GETN_AMENU_END_BRANCH(Fit)                                            //Match GETN_BEGIN_BRANCH

        if(GetNBox(testTree))
                out_tree(testTree);
}
void add_subnode(TreeNode& trNode)
{
        GETN_USE(trNode)
        GETN_NUM(Points, "Points", 20)
        
        if( GetNBox( trNode ))
        out_tree( trNode );
}

See Also

GETN_CURRENT_NODE

header to Include

GetNbox.h

Reference