Last change
on this file since 114 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
|
Line | |
---|
1 | #ifdef STATISTICS |
---|
2 | #include "Behavioural/include/Stat_binary_tree.h" |
---|
3 | |
---|
4 | namespace morpheo { |
---|
5 | namespace behavioural { |
---|
6 | |
---|
7 | bool Stat_binary_tree::valid (void) |
---|
8 | { |
---|
9 | if (_data_type == NONE) |
---|
10 | return false; |
---|
11 | |
---|
12 | if ((_data_type == VARIABLE) or |
---|
13 | (_data_type == CONSTANT)) |
---|
14 | return ((_left == NULL) and |
---|
15 | (_right == NULL) ); |
---|
16 | |
---|
17 | if (_data_type == OPERATOR_UNARY) |
---|
18 | return ((_right == NULL) and |
---|
19 | (_left != NULL) and |
---|
20 | (_left->valid())); |
---|
21 | |
---|
22 | if (_data_type == OPERATOR_BINARY) |
---|
23 | return ((_left != NULL ) and |
---|
24 | (_left ->valid()) and |
---|
25 | (_right != NULL ) and |
---|
26 | (_right->valid())); |
---|
27 | |
---|
28 | return false; |
---|
29 | } |
---|
30 | |
---|
31 | }; |
---|
32 | }; |
---|
33 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.