[78] | 1 | /* |
---|
| 2 | * $Id: Parameters_print.cpp 81 2008-04-15 18:40:01Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Generic/Victim/include/Parameters.h" |
---|
| 9 | #include "Behavioural/include/XML.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace generic { |
---|
| 14 | namespace victim { |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | #undef FUNCTION |
---|
| 18 | #define FUNCTION "Victim::print" |
---|
| 19 | std::string Parameters::print (uint32_t depth) |
---|
| 20 | { |
---|
| 21 | log_printf(FUNC,Victim,FUNCTION,"Begin"); |
---|
| 22 | |
---|
| 23 | XML xml ("victim"); |
---|
| 24 | |
---|
| 25 | xml.balise_open("victim"); |
---|
| 26 | xml.singleton_begin("victim_scheme"); xml.attribut("value",toString(_victim_scheme)); xml.singleton_end(); |
---|
| 27 | xml.singleton_begin("nb_entity "); xml.attribut("value",toString(_nb_entity )); xml.singleton_end(); |
---|
| 28 | xml.singleton_begin("nb_entry "); xml.attribut("value",toString(_nb_entry )); xml.singleton_end(); |
---|
| 29 | xml.singleton_begin("nb_access "); xml.attribut("value",toString(_nb_access )); xml.singleton_end(); |
---|
| 30 | xml.singleton_begin("table_global "); xml.attribut("value",toString(_table_global )); xml.singleton_end(); |
---|
| 31 | xml.balise_close(); |
---|
| 32 | |
---|
| 33 | log_printf(FUNC,Victim,FUNCTION,"End"); |
---|
| 34 | |
---|
| 35 | return xml.get_body(depth); |
---|
| 36 | }; |
---|
| 37 | |
---|
| 38 | #undef FUNCTION |
---|
| 39 | #define FUNCTION "Victim::operator<<" |
---|
| 40 | std::ostream& operator<< (std::ostream& output_stream , |
---|
| 41 | morpheo::behavioural::generic::victim::Parameters & x) |
---|
| 42 | { |
---|
| 43 | log_printf(FUNC,Victim,FUNCTION,"Begin"); |
---|
| 44 | |
---|
| 45 | output_stream << x.print(0); |
---|
| 46 | |
---|
| 47 | log_printf(FUNC,Victim,FUNCTION,"End"); |
---|
| 48 | |
---|
| 49 | return output_stream; |
---|
| 50 | }; |
---|
| 51 | |
---|
| 52 | }; // end namespace victim |
---|
| 53 | }; // end namespace generic |
---|
| 54 | |
---|
| 55 | }; // end namespace behavioural |
---|
| 56 | }; // end namespace morpheo |
---|