Changeset 75 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters_print.cpp
- Timestamp:
- Jan 31, 2008, 6:46:41 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters_print.cpp
r2 r75 7 7 8 8 #include "Behavioural/Generic/Shifter/include/Parameters.h" 9 #include <sstream> 10 using namespace std; 9 #include "Behavioural/include/XML.h" 11 10 12 11 namespace morpheo { … … 16 15 17 16 18 st ring Parameters::print (uint32_t depth)17 std::string Parameters::print (uint32_t depth) 19 18 { 20 string tab = string(depth,'\t'); 21 ostringstream msg; 22 msg << tab << "<shifter>" << endl 23 << tab << "\t<size_data value=\"" << _size_data << "\" />" << endl 24 << tab << "\t<nb_port value=\"" << _nb_port << "\" />" << endl 25 << tab << "\t<shift_value value=\"" << _shift_value << "\" />" << endl 26 << tab << "\t<rotate value=\"" << toString_rotate (_rotate ) << "\" />" << endl 27 << tab << "\t<direction value=\"" << toString_direction (_direction) << "\" />" << endl 28 << tab << "\t<carry value=\"" << toString_carry (_carry ) << "\" />" << endl 29 << tab << "\t<!-- port_completion is type bool : " << toString(_type_completion_bool) << " -->" << endl 30 << tab << "</shifter>" << endl; 19 XML xml ("shifter"); 20 21 xml.balise_open("shifter"); 22 xml.singleton_begin("size_data "); xml.attribut("value",toString(_size_data )); xml.singleton_end(); 23 xml.singleton_begin("nb_port "); xml.attribut("value",toString(_nb_port )); xml.singleton_end(); 24 xml.singleton_begin("shift_value"); xml.attribut("value",toString(_shift_value)); xml.singleton_end(); 25 xml.singleton_begin("rotate "); xml.attribut("value",toString(_rotate )); xml.singleton_end(); 26 xml.singleton_begin("direction "); xml.attribut("value",toString(_direction )); xml.singleton_end(); 27 xml.singleton_begin("carry "); xml.attribut("value",toString(_carry )); xml.singleton_end(); 31 28 32 return msg.str();29 return xml.get_body(depth); 33 30 }; 34 31 35 ostream& operator<< (ostream& output_stream ,36 32 std::ostream& operator<< (std::ostream& output_stream , 33 morpheo::behavioural::generic::shifter::Parameters & x) 37 34 { 38 35 output_stream << x.print(0);
Note: See TracChangeset
for help on using the changeset viewer.