Last change
on this file since 104 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:
1011 bytes
|
Rev | Line | |
---|
[88] | 1 | /* |
---|
| 2 | * $Id: Simulator.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Configuration/include/Simulator.h" |
---|
| 9 | #include "Behavioural/include/Stat_binary_tree.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace configuration { |
---|
| 14 | |
---|
| 15 | #undef FUNCTION |
---|
| 16 | #define FUNCTION "Simulator::Simulator" |
---|
| 17 | Simulator::Simulator (std::string filename) |
---|
| 18 | { |
---|
| 19 | log_begin(Configuration,FUNCTION); |
---|
| 20 | |
---|
| 21 | _filename = filename; |
---|
| 22 | _array = new std::map<std::string, Parameter_affectation *>; |
---|
| 23 | |
---|
| 24 | fromFile (filename); |
---|
| 25 | |
---|
| 26 | log_end(Configuration,FUNCTION); |
---|
| 27 | }; |
---|
| 28 | |
---|
| 29 | #undef FUNCTION |
---|
| 30 | #define FUNCTION "Simulator::~Simulator" |
---|
| 31 | Simulator::~Simulator () |
---|
| 32 | { |
---|
| 33 | log_begin(Configuration,FUNCTION); |
---|
| 34 | |
---|
| 35 | for (std::map<std::string, Parameter_affectation *>::iterator it = _array->begin(); |
---|
| 36 | it != _array->end(); |
---|
| 37 | ++it) |
---|
| 38 | { |
---|
| 39 | delete it->second; |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | delete _array; |
---|
| 43 | |
---|
| 44 | log_end(Configuration,FUNCTION); |
---|
| 45 | }; |
---|
| 46 | |
---|
| 47 | }; // end namespace configuration |
---|
| 48 | }; // end namespace behavioural |
---|
| 49 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.