#ifdef STATISTICS
#include "Behavioural/include/Stat_binary_tree.h"

namespace morpheo {
namespace behavioural {
  Stat_binary_tree * Stat_binary_tree::goto_next_root (void)
  {
    if ((_data_type == OPERATOR_BINARY) and 
	((_left  == NULL ) or
	 (_right == NULL )))
      return this;
    
    if ((_data_type == OPERATOR_UNARY) and
	((_left  == NULL )))
      return this;

    if (_root == NULL)
      throw(ERRORMORPHEO("Stat_binary_tree::goto_next_root",_("Invalid root.")));

    return _root->goto_next_root();
  }

};
};
#endif
