#ifdef STATISTICS
/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Statistics.h"

#include <sstream>
using namespace std;

namespace morpheo {
namespace behavioural {
namespace core {
namespace multi_execute_loop {
namespace execute_loop {
namespace register_unit {


#undef  FUNCTION
#define FUNCTION "Register_unit::print"
  string Statistics::print (uint32_t depth)
  {
    log_printf(FUNC,Register_unit,FUNCTION,"Begin");

    string        tab = string(depth,'\t');
    ostringstream msg;

    msg << tab << "<register_unit name=\"" << _name << "\" >" << endl
        << print_body(depth+1) << endl
	<< tab << "</register_unit>" << endl;
    
    log_printf(FUNC,Register_unit,FUNCTION,"End");

    return msg.str();
  };

#undef  FUNCTION
#define FUNCTION "Register_unit::operator<<"
  ostream& operator<< (ostream& output_stream ,
		       morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::Statistics & x)
  {
    log_printf(FUNC,Register_unit,FUNCTION,"Begin");

    output_stream << x.print(0);

    log_printf(FUNC,Register_unit,FUNCTION,"End");

    return output_stream;
  };

}; // end namespace register_unit
}; // end namespace execute_loop
}; // end namespace multi_execute_loop
}; // end namespace core

}; // end namespace behavioural
}; // end namespace morpheo              
#endif
