/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h"
#include "Behavioural/include/XML.h"
using namespace std;

namespace morpheo                    {
namespace behavioural {
namespace core {
namespace multi_front_end {
namespace front_end {
namespace prediction_unit {
namespace direction {

namespace meta_predictor {
namespace meta_predictor_glue {


  string Parameters::print (uint32_t depth)
  {
    log_printf(FUNC,Meta_Predictor_Glue,"print","Begin");

    XML xml ("meta_predictor_glue");

    xml.balise_open("meta_predictor_glue");

    xml.  singleton_begin("have_meta_predictor               ");               
    xml.    attribut("value",toString(_have_meta_predictor               ));
    xml.  singleton_end();

    xml.  singleton_begin("predictor_0_have_bht              ");        	
    xml.    attribut("value",toString(_predictor_0_have_bht              ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_0_bht_size_shifter      ");	
    xml.    attribut("value",toString(_predictor_0_bht_size_shifter      ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_0_have_pht              ");              
    xml.    attribut("value",toString(_predictor_0_have_pht              ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_0_pht_size_counter      ");      
    xml.    attribut("value",toString(_predictor_0_pht_size_counter      ));
    xml.  singleton_end();

    xml.  singleton_begin("predictor_1_have_bht              ");        	
    xml.    attribut("value",toString(_predictor_1_have_bht              ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_1_bht_size_shifter      ");	
    xml.    attribut("value",toString(_predictor_1_bht_size_shifter      ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_1_have_pht              ");              
    xml.    attribut("value",toString(_predictor_1_have_pht              ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_1_pht_size_counter      ");      
    xml.    attribut("value",toString(_predictor_1_pht_size_counter      ));
    xml.  singleton_end();
    
    xml.  singleton_begin("predictor_2_have_bht              ");        	
    xml.    attribut("value",toString(_predictor_2_have_bht              ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_2_bht_size_shifter      ");	
    xml.    attribut("value",toString(_predictor_2_bht_size_shifter      ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_2_have_pht              ");              
    xml.    attribut("value",toString(_predictor_2_have_pht              ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_2_pht_size_counter      ");      
    xml.    attribut("value",toString(_predictor_2_pht_size_counter      ));
    xml.  singleton_end();
        
    xml.  singleton_begin("nb_prediction                     ");                     
    xml.    attribut("value",toString(_nb_prediction                     ));
    xml.  singleton_end();
    xml.  singleton_begin("nb_branch_complete                ");                
    xml.    attribut("value",toString(_nb_branch_complete                ));
    xml.  singleton_end();

    xml.balise_close();

    log_printf(FUNC,Meta_Predictor_Glue,"print","End");
    
    return xml.get_body(depth);
  };

  ostream& operator<< (ostream& output_stream ,
		       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters & x)
  {
    output_stream << x.print(0);
    
    return output_stream;
  };

}; // end namespace meta_predictor_glue
}; // end namespace meta_predictor

}; // end namespace core
}; // end namespace multi_front_end
}; // end namespace front_end
}; // end namespace prediction_unit
}; // end namespace direction


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