Last change
on this file since 102 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:
694 bytes
|
Line | |
---|
1 | #ifdef STATISTICS |
---|
2 | #include "Behavioural/include/Stat.h" |
---|
3 | |
---|
4 | namespace morpheo { |
---|
5 | namespace behavioural { |
---|
6 | counter_t * Stat::alloc_operand (counter_type_t type, std::string varname, std::string unit, std::string description) |
---|
7 | { |
---|
8 | if (not is_valid_var (varname)) |
---|
9 | throw(ERRORMORPHEO("Stat::alloc_operand",_("Variable is not valid."))); |
---|
10 | |
---|
11 | counter_t * counter = new counter_t; |
---|
12 | var_t var; |
---|
13 | |
---|
14 | var.counter = counter; |
---|
15 | var.type = type; |
---|
16 | var.name = varname; |
---|
17 | var.unit = unit; |
---|
18 | var.description = description; |
---|
19 | |
---|
20 | // insertion dans la table |
---|
21 | (*_list_operand) [varname] = var; |
---|
22 | |
---|
23 | *counter = 0; |
---|
24 | |
---|
25 | return counter; |
---|
26 | } |
---|
27 | }; |
---|
28 | }; |
---|
29 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.