source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_binary_tree_goto_next_root.cpp @ 81

Last change on this file since 81 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 537 bytes
Line 
1#ifdef STATISTICS
2#include "Behavioural/include/Stat_binary_tree.h"
3
4namespace morpheo {
5namespace behavioural {
6  Stat_binary_tree * Stat_binary_tree::goto_next_root (void)
7  {
8    if ((_data_type == OPERATOR_BINARY) and
9        ((_left  == NULL ) or
10         (_right == NULL )))
11      return this;
12   
13    if ((_data_type == OPERATOR_UNARY) and
14        ((_left  == NULL )))
15      return this;
16
17    if (_root == NULL)
18      throw(ERRORMORPHEO("Stat_binary_tree::goto_next_root",_("Invalid root.")));
19
20    return _root->goto_next_root();
21  }
22
23};
24};
25#endif
Note: See TracBrowser for help on using the repository browser.