Ejemplo n.º 1
0
//
//  7-Apr-97 133MR1
//	Fix suggested by Ron House ([email protected])
//
void
ASTBase::preorder(void* pData /*= NULL*/ /* MR23 */)
{
	ASTBase *tree = this;

	while ( tree!= NULL )
	{
		if ( tree->_down != NULL ) {
			tree->preorder_before_action(pData); 		// MR1	
		};
		tree->preorder_action(pData);
		if ( tree->_down!=NULL )
		{
			tree->_down->preorder(pData);
			tree->preorder_after_action(pData);			// MR1
		}
		tree = tree->_right;
	}
}
Ejemplo n.º 2
0
//
//  7-Apr-97 133MR1
//	Fix suggested by Ron House ([email protected])
//
void
ASTBase::preorder()
{
	ASTBase *tree = this;

	while ( tree!= NULL )
	{
		if ( tree->_down != NULL ) {
			tree->preorder_before_action(); 		// MR1	
		};
		tree->preorder_action();
		if ( tree->_down!=NULL )
		{
			tree->_down->preorder();
			tree->preorder_after_action();			// MR1
		}
		tree = tree->_right;
	}
}