source: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/Statistics_print.cpp @ 53

Last change on this file since 53 was 53, checked in by rosiere, 17 years ago
  • Banc de registre multi banc
  • Banc de registre générique.
File size: 1.1 KB
RevLine 
[2]1#ifdef STATISTICS
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/@DIRECTORY/include/Statistics.h"
10
11#include <sstream>
12using namespace std;
13
14namespace morpheo {
15namespace behavioural {
16@NAMESPACE_BEGIN
17
[53]18#undef  FUNCTION
19#define FUNCTION "@COMPONENT::print"
[2]20  string Statistics::print (uint32_t depth)
21  {
[53]22    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
[2]23
24    string        tab = string(depth,'\t');
25    ostringstream msg;
26
27    msg << tab << "<@COMPONENT_LOWER name=\"" << _name << "\" >" << endl
28        << print_body(depth+1) << endl
29        << tab << "</@COMPONENT_LOWER>" << endl;
30   
[53]31    log_printf(FUNC,@COMPONENT,FUNCTION,"End");
[2]32
33    return msg.str();
34  };
35
[53]36#undef  FUNCTION
37#define FUNCTION "@COMPONENT::operator<<"
[2]38  ostream& operator<< (ostream& output_stream ,
39                       morpheo::behavioural::@NAMESPACE_USE::Statistics & x)
40  {
[53]41    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
42
[2]43    output_stream << x.print(0);
44
[53]45    log_printf(FUNC,@COMPONENT,FUNCTION,"End");
46
[2]47    return output_stream;
48  };
49
50@NAMESPACE_END
51}; // end namespace behavioural
52}; // end namespace morpheo             
53#endif
Note: See TracBrowser for help on using the repository browser.