Last change
on this file since 125 was
88,
checked in by rosiere, 16 years ago
|
Almost complete design
with Test and test platform
|
-
Property svn:keywords set to
Id
|
File size:
938 bytes
|
Line | |
---|
1 | #ifdef STATISTICS |
---|
2 | #include "Behavioural/include/Stat_binary_tree.h" |
---|
3 | |
---|
4 | namespace morpheo { |
---|
5 | namespace behavioural { |
---|
6 | |
---|
7 | void Stat_binary_tree::change_type (counter_t cst) |
---|
8 | { |
---|
9 | if (_data_type != NONE) |
---|
10 | throw (ERRORMORPHEO("Stat_binary_tree::change_type",_("To change type, data_type must be \'NONE\'.\n"))); |
---|
11 | |
---|
12 | _data_type = CONSTANT; |
---|
13 | _data.cst = cst; |
---|
14 | } |
---|
15 | |
---|
16 | void Stat_binary_tree::change_type (counter_t * var) |
---|
17 | { |
---|
18 | if (_data_type != NONE) |
---|
19 | throw (ERRORMORPHEO("Stat_binary_tree::change_type",_("To change type, data_type must be \'NONE\'.\n"))); |
---|
20 | |
---|
21 | _data_type = VARIABLE; |
---|
22 | _data.var = var; |
---|
23 | } |
---|
24 | |
---|
25 | void Stat_binary_tree::change_type (operator_t op ) |
---|
26 | { |
---|
27 | if (_data_type != NONE) |
---|
28 | throw (ERRORMORPHEO("Stat_binary_tree::change_type",_("To change type, data_type must be \'NONE\'.\n"))); |
---|
29 | |
---|
30 | _data_type = ((op == inc) or (op == dec))?OPERATOR_UNARY:OPERATOR_BINARY; |
---|
31 | _data.op = op; |
---|
32 | } |
---|
33 | }; |
---|
34 | }; |
---|
35 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.