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

#include "Behavioural/Generic/Counter/include/Statistics.h"

#include <sstream>
using namespace std;

namespace morpheo {
namespace behavioural {
namespace generic {
namespace counter {


  string Statistics::print (uint32_t depth)
  {
    log_printf(FUNC,Counter,"print","Begin");

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

    msg << tab << "<counter name=\"" << _name << "\" >" << endl
        << print_body(depth+1)
	<< tab << "</counter>" << endl;
    
    log_printf(FUNC,Counter,"print","End");

    return msg.str();
  };

  ostream& operator<< (ostream& output_stream ,
		       morpheo::behavioural::generic::counter::Statistics & x)
  {
    output_stream << x.print(0);

    return output_stream;
  };

}; // end namespace counter
}; // end namespace generic

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