/*
 * $Id: Parameters_print.cpp 81 2008-04-15 18:40:01Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Generic/Victim/include/Parameters.h"
#include "Behavioural/include/XML.h"

namespace morpheo                    {
namespace behavioural {
namespace generic {
namespace victim {


#undef  FUNCTION
#define FUNCTION "Victim::print"
  std::string Parameters::print (uint32_t depth)
  {
    log_printf(FUNC,Victim,FUNCTION,"Begin");

    XML xml ("victim");

    xml.balise_open("victim");
    xml.singleton_begin("victim_scheme"); xml.attribut("value",toString(_victim_scheme)); xml.singleton_end();
    xml.singleton_begin("nb_entity    "); xml.attribut("value",toString(_nb_entity    )); xml.singleton_end();
    xml.singleton_begin("nb_entry     "); xml.attribut("value",toString(_nb_entry     )); xml.singleton_end();
    xml.singleton_begin("nb_access    "); xml.attribut("value",toString(_nb_access    )); xml.singleton_end();
    xml.singleton_begin("table_global "); xml.attribut("value",toString(_table_global )); xml.singleton_end();
    xml.balise_close();

    log_printf(FUNC,Victim,FUNCTION,"End");
    
    return xml.get_body(depth);
  };

#undef  FUNCTION
#define FUNCTION "Victim::operator<<"
  std::ostream& operator<< (std::ostream& output_stream ,
			    morpheo::behavioural::generic::victim::Parameters & x)
  {
    log_printf(FUNC,Victim,FUNCTION,"Begin");

    output_stream << x.print(0);
    
    log_printf(FUNC,Victim,FUNCTION,"End");

    return output_stream;
  };

}; // end namespace victim
}; // end namespace generic

}; // end namespace behavioural
}; // end namespace morpheo              
