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

namespace morpheo {
namespace behavioural {  
  counter_t Stat_binary_tree::val_tree    (void)
  {
    switch (_data.op)
      {
      case add : return _left->eval() + _right->eval();
      case sub : return _left->eval() - _right->eval();
      case mul : return _left->eval() * _right->eval();
      case div : return _left->eval() / _right->eval();
      case inc : return _left->eval() + 1;
      case dec : return _left->eval() - 1;
      default : throw(ERRORMORPHEO("Stat_binary_tree::val_tree",_("Unknow operator.")));
      }
    
    return 0;
  }
};  
};
#endif
