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
Line 
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
18#undef  FUNCTION
19#define FUNCTION "@COMPONENT::print"
20  string Statistics::print (uint32_t depth)
21  {
22    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
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   
31    log_printf(FUNC,@COMPONENT,FUNCTION,"End");
32
33    return msg.str();
34  };
35
36#undef  FUNCTION
37#define FUNCTION "@COMPONENT::operator<<"
38  ostream& operator<< (ostream& output_stream ,
39                       morpheo::behavioural::@NAMESPACE_USE::Statistics & x)
40  {
41    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
42
43    output_stream << x.print(0);
44
45    log_printf(FUNC,@COMPONENT,FUNCTION,"End");
46
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.