/** * Walk the subtree rooted under node *top (only the children, not *top itself) * post-order, calling the function void visit(SafraTree& tree, SafraTreeNode *node) * in the SafraTreeVisitor on each node. */ public void walkChildrenPostOrder(SafraTreeVisitor visitor, SafraTreeNode top) { SafraTreeWalker walker = new SafraTreeWalker(visitor); // = don't visit top walker.walkSubTreePostOrder(this, top, false); }
/** * Walk the subtree rooted under node *top post-order, * calling the function void visit(SafraTree& tree, SafraTreeNode *node) * in the SafraTreeVisitor on each node. */ public void walkSubTreePostOrder(SafraTreeVisitor visitor, SafraTreeNode top) { SafraTreeWalker walker = new SafraTreeWalker(visitor); walker.walkSubTreePostOrder(this, top); }
/** * Walk the tree post-order, calling the function * void visit(SafraTree& tree, SafraTreeNode *node) * in the SafraTreeVisitor on each node. */ public void walkTreePostOrder(SafraTreeVisitor visitor) { SafraTreeWalker walker = new SafraTreeWalker(visitor); walker.walkTreePostOrder(this); }