source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_binary_tree_valid.cpp @ 94

Last change on this file since 94 was 94, checked in by rosiere, 16 years ago

Update document on Vhdl generation.

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 702 bytes
RevLine 
[71]1#ifdef STATISTICS
2#include "Behavioural/include/Stat_binary_tree.h"
3
4namespace morpheo {
5namespace behavioural {
[88]6
[71]7  bool Stat_binary_tree::valid (void)
8  {
[88]9    if (_data_type == NONE)
10      return false;
11
[71]12    if ((_data_type == VARIABLE) or
13        (_data_type == CONSTANT))
14      return ((_left  == NULL) and
[88]15              (_right == NULL) );
16   
[71]17    if (_data_type == OPERATOR_UNARY)
18      return ((_right == NULL) and
[88]19              (_left  != NULL) and
20              (_left->valid()));
[71]21
22    if (_data_type == OPERATOR_BINARY)
23      return ((_left  != NULL ) and
[88]24              (_left ->valid()) and
25              (_right != NULL ) and
26              (_right->valid()));
[71]27
28    return false;
29  }
[88]30
[71]31};
32};
33#endif
Note: See TracBrowser for help on using the repository browser.