source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_interface.cpp @ 41

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

Interface et Signal, c'est deux classes enregistres la valeurs des signaux à chaque cycle ... étape préparatoire avan le changement de la classe Vhdl_Testbench

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