source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_toXML.cpp @ 75

Last change on this file since 75 was 75, checked in by rosiere, 16 years ago

Update all component (except front_end) to :

  • new statistics model
  • no namespace std
File size: 1.6 KB
Line 
1#ifdef POSITION
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/include/Interface.h"
10#include "Behavioural/include/Entity.h"
11
12namespace morpheo              {
13namespace behavioural          {
14
15  XML Interface::toXML (void)
16  {
17    log_printf(FUNC,Behavioural,"toXML","Begin");
18
19    XML xml ("interface");
20   
21    xml.balise_open_begin ("port");
22    xml.  attribut        ("name"         ,_name                 );
23    xml.  attribut        ("direction"   ,toString(_direction   ));
24    xml.  attribut        ("localisation",toString(_localisation));
25    xml.balise_open_end   ();
26    xml.  text            (get_comment());
27
28    if (_list_signal->empty()== false)
29      {
30        std::list<Signal*>::iterator i     = _list_signal->begin();
31
32        while (i != _list_signal->end())
33          {
34            xml.  insert_XML ((*i)->toXML());
35            ++i;
36          }
37      }
38
39    xml.balise_close      ();
40
41    log_printf(FUNC,Behavioural,"toXML","End");
42   
43    return xml;
44  };
45
46  XML Interface::toXML_mapping (void)
47  {
48    log_printf(FUNC,Behavioural,"toXML_mapping","Begin");
49
50    if (_is_map != true)
51      throw (ErrorMorpheo ("Interface \""+_name+"\" is never mapped"));
52
53    XML xml ("interface");
54   
55    xml.singleton_begin ("port_map");
56    xml.  attribut      ("name"     ,_name               );
57    xml.  attribut      ("component",(static_cast<Entity    *>(_entity_map   ))->get_name());
58    xml.  attribut      ("port"     ,(static_cast<Interface *>(_interface_map))->get_name());
59    xml.singleton_end   ();
60
61    log_printf(FUNC,Behavioural,"toXML_mapping","End");
62     
63    return xml;
64  };
65}; // end namespace behavioural         
66}; // end namespace morpheo             
67#endif
Note: See TracBrowser for help on using the repository browser.