source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Instance_toXML.cpp @ 131

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

1) add constant method
2) test with systemc 2.2.0

  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1/*
2 * $Id: Instance_toXML.cpp 131 2009-07-08 18:40:08Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Configuration/include/Instance.h"
9#include "Common/include/Basename.h"
10
11namespace morpheo {
12namespace behavioural {
13namespace configuration {
14
15#undef  FUNCTION
16#define FUNCTION "Instance::toXML"
17  XML Instance::toXML (void)
18  {
19    XML xml (basename(_filename,false).c_str());
20    xml.filename_extension("cfg");
21   
22    xml.balise_open_begin("core");
23    xml.attribut("name",_name);
24    xml.balise_open_end  ();
25
26    for (list_parameters_t::iterator it = _list_parameters->begin();
27         it != _list_parameters->end();
28         ++it)
29      xml.insert_XML(it->second->toXML(),1);
30
31    for (list_links_t::iterator it1 = _list_links->begin();
32         it1 != _list_links->end();
33         ++it1)
34      for (list_link_t::iterator it2 = it1->second.begin();
35           it2 != it1->second.end();
36           ++it2)
37        xml.insert_XML(it2->second->toXML(),1);
38   
39    for (list_components_t::iterator it1 = _list_components->begin();
40         it1 != _list_components->end();
41         ++it1)
42      for (list_instances_t::iterator it2 = it1->second.begin();
43           it2 != it1->second.end();
44           ++it2)
45      xml.insert_XML(it2->second->toXML(),1);
46
47    xml.balise_close();
48
49    return xml;
50  }
51
52}; // end namespace configuration
53}; // end namespace behavioural
54}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.