Last change
on this file since 136 was
88,
checked in by rosiere, 16 years ago
|
Almost complete design
with Test and test platform
|
-
Property svn:executable set to
*
-
Property svn:keywords set to
Id
|
File size:
1.5 KB
|
Line | |
---|
1 | #ifdef STATISTICS |
---|
2 | #include "Behavioural/include/Stat_binary_tree.h" |
---|
3 | |
---|
4 | namespace morpheo { |
---|
5 | namespace behavioural { |
---|
6 | // static pair_operator_string_t operator2string [] = {std::make_pair(add,"+" ), |
---|
7 | // std::make_pair(sub,"-" ), |
---|
8 | // std::make_pair(mul,"*" ), |
---|
9 | // std::make_pair(div,"/" ), |
---|
10 | // std::make_pair(inc,"++"), |
---|
11 | // std::make_pair(dec,"--")}; |
---|
12 | |
---|
13 | // Stat_binary_tree:: Stat_binary_tree (data_type_t data_type, data_t data) |
---|
14 | // { |
---|
15 | // _valid_left = false; |
---|
16 | // _valid_right = false; |
---|
17 | // _data_type = data_type; |
---|
18 | // _data = data; |
---|
19 | // } |
---|
20 | |
---|
21 | Stat_binary_tree:: Stat_binary_tree (counter_t cst) |
---|
22 | { |
---|
23 | _root = NULL; |
---|
24 | _left = NULL; |
---|
25 | _right = NULL; |
---|
26 | _data_type = NONE; |
---|
27 | |
---|
28 | change_type (cst); |
---|
29 | } |
---|
30 | |
---|
31 | Stat_binary_tree:: Stat_binary_tree (counter_t * var) |
---|
32 | { |
---|
33 | _root = NULL; |
---|
34 | _left = NULL; |
---|
35 | _right = NULL; |
---|
36 | _data_type = NONE; |
---|
37 | |
---|
38 | change_type (var); |
---|
39 | } |
---|
40 | |
---|
41 | Stat_binary_tree:: Stat_binary_tree (operator_t op) |
---|
42 | { |
---|
43 | _root = NULL; |
---|
44 | _left = NULL; |
---|
45 | _right = NULL; |
---|
46 | _data_type = NONE; |
---|
47 | |
---|
48 | change_type (op); |
---|
49 | } |
---|
50 | |
---|
51 | Stat_binary_tree:: Stat_binary_tree (std::string expr, |
---|
52 | std::map<std::string, counter_t*> * operand) |
---|
53 | { |
---|
54 | _root = NULL; |
---|
55 | _left = NULL; |
---|
56 | _right = NULL; |
---|
57 | _data_type = NONE; |
---|
58 | |
---|
59 | import (expr, operand); |
---|
60 | } |
---|
61 | |
---|
62 | Stat_binary_tree::~Stat_binary_tree (void) |
---|
63 | { |
---|
64 | if (_left != NULL) |
---|
65 | delete _left; |
---|
66 | if (_right != NULL) |
---|
67 | delete _right; |
---|
68 | } |
---|
69 | |
---|
70 | }; |
---|
71 | }; |
---|
72 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.