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

Last change on this file since 81 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1/*
2 * $Id: Interfaces_get_interface.cpp 81 2008-04-15 18:40:01Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/Interfaces.h"
9
10
11namespace morpheo              {
12namespace behavioural          {
13
14#undef  FUNCTION
15#define FUNCTION "Interfaces::get_interface"
16  std::string Interfaces::get_interface (void)
17  {
18    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
19
20    uint32_t               depth          = 0;
21    std::string                 separator      = "\n";
22    bool                   last_separator = false;
23
24    std::list<Interface_fifo*>::iterator i  = _list_interface->begin();
25    bool                   empty = _list_interface->empty();
26
27    std::string                 tab   = std::string(depth,'\t');
28    std::ostringstream          text;
29
30    if (not empty)
31      {
32        // First
33        if (i != _list_interface->end())
34          {
35            text << tab << **i;
36            ++i;
37          }
38       
39        while (i != _list_interface->end())
40          {
41            text << separator;
42            text << tab << **i;
43            ++i;
44          }
45       
46        if (last_separator)
47          text << separator;
48      }
49
50    log_printf(FUNC,Behavioural,FUNCTION,"End");
51   
52    return text.str();
53  };
54
55#undef  FUNCTION
56#define FUNCTION "Interfaces::get_interface_list"
57  std::list<Interface_fifo*>* Interfaces::get_interface_list (void)
58  {
59    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
60    std::list<Interface_fifo*>* _return =  _list_interface;
61    log_printf(FUNC,Behavioural,FUNCTION,"End");
62
63    return _return;
64  };
65
66}; // end namespace behavioural         
67}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.