source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Generator.cpp @ 88

Last change on this file since 88 was 88, checked in by rosiere, 15 years ago

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1/*
2 * $Id: Generator.cpp 88 2008-12-10 18:31:39Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Configuration/include/Generator.h"
9#include "Behavioural/include/Stat_binary_tree.h"
10
11namespace morpheo {
12namespace behavioural {
13namespace configuration {
14
15#undef  FUNCTION
16#define FUNCTION "Generator::Generator"
17  Generator::Generator  (std::string filename)
18  {
19    log_begin(Configuration,FUNCTION);
20
21    _filename = filename;
22    _array_param = new std::map<std::string, Parameter_definition *>;
23    _array_link  = new std::map<std::string, Link_definition *>;
24
25    fromFile (filename);
26
27    log_end(Configuration,FUNCTION);
28  };
29
30#undef  FUNCTION
31#define FUNCTION "Generator::~Generator"
32  Generator::~Generator () 
33  {
34    log_begin(Configuration,FUNCTION);
35
36    for (std::map<std::string, Parameter_definition *>::iterator it = _array_param->begin();
37         it != _array_param->end();
38         ++it)
39      {
40        delete it->second;
41      }
42
43    delete _array_param;
44
45    for (std::map<std::string, Link_definition *>::iterator it = _array_link->begin();
46         it != _array_link->end();
47         ++it)
48      {
49        delete it->second;
50      }
51
52    delete _array_link;
53   
54    log_end(Configuration,FUNCTION);
55  };
56
57}; // end namespace configuration
58}; // end namespace behavioural
59}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.