source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_signal.cpp @ 29

Last change on this file since 29 was 29, checked in by rosiere, 17 years ago

Changement de classes de gestions des Interfaces.

-> simplification pour les déclarations de ports, application pour le composant Select_Priority_Fixed.
-> !!! essayer de supprimer la redondance dans les fichierx xxx_vhdl_testbench_transition.cpp

File size: 932 bytes
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/Interface.h"
9
10
11namespace morpheo              {
12namespace behavioural          {
13
14  string Interface::get_signal (void)
15  {
16    uint32_t               depth          = 0;
17    string                 separator      = ",\n";
18    bool                   last_separator = false;
19
20
21    list<Signal>::iterator i     = _list_signal.begin();
22    bool                   empty = _list_signal.empty();
23
24    string                 tab   = string(depth,'\t');
25    ostringstream          text;
26
27    if (not empty)
28      {
29        // First
30        if (i != _list_signal.end())
31          {
32            text << tab << *i;
33            ++i;
34          }
35       
36        while (i != _list_signal.end())
37          {
38            text << separator;
39            text << tab << *i;
40            ++i;
41          }
42       
43        if (last_separator)
44          text << separator;
45      }
46
47    return text.str();
48  };
49
50}; // end namespace behavioural         
51}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.