source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_list.cpp @ 43

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

Modif mineur : ajout d'info de débug

Release non stable

File size: 1.1 KB
Line 
1#ifdef VHDL
2
3/*
4 * $Id$
5 *
6 * [ Description ]
7 *
8 */
9
10#include "Behavioural/include/Vhdl.h"
11
12#include <sstream>
13using namespace std;
14
15namespace morpheo              {
16namespace behavioural          {
17 
18#undef  FUNCTION
19#define FUNCTION "Vhdl::get_list"
20  string Vhdl::get_list (list<string> liste                ,
21                         uint32_t     depth                ,
22                         string       separator            ,
23                         bool         last_separator       )
24  {
25    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
26
27    list<string>::iterator i     = liste.begin();
28    bool                   empty = liste.empty();
29
30    string                 tab   = string(depth,'\t');
31    ostringstream          text;
32
33    if (not empty)
34      {
35        // First
36        if (i != liste.end())
37          {
38            text << tab << *i;
39            ++i;
40          }
41       
42        while (i != liste.end())
43          {
44            text << separator << endl;
45            text << tab << *i;
46            ++i;
47          }
48       
49        if (last_separator)
50          text << separator << endl;
51      }
52
53    log_printf(FUNC,Behavioural,FUNCTION,"End");
54
55    return text.str();
56  };
57 
58}; // end namespace behavioural         
59}; // end namespace morpheo             
60
61#endif
Note: See TracBrowser for help on using the repository browser.