Rev | Line | |
---|
[2] | 1 | #ifdef STATISTICS |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Generic/Counter/include/Statistics.h" |
---|
| 10 | |
---|
| 11 | #include <sstream> |
---|
| 12 | using namespace std; |
---|
| 13 | |
---|
| 14 | namespace morpheo { |
---|
| 15 | namespace behavioural { |
---|
| 16 | namespace generic { |
---|
| 17 | namespace counter { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | string Statistics::print (uint32_t depth) |
---|
| 21 | { |
---|
| 22 | log_printf(FUNC,Counter,"print","Begin"); |
---|
| 23 | |
---|
| 24 | string tab = string(depth,'\t'); |
---|
| 25 | ostringstream msg; |
---|
| 26 | |
---|
| 27 | msg << tab << "<counter name=\"" << _name << "\" >" << endl |
---|
| 28 | << print_body(depth+1) |
---|
| 29 | << tab << "</counter>" << endl; |
---|
| 30 | |
---|
| 31 | log_printf(FUNC,Counter,"print","End"); |
---|
| 32 | |
---|
| 33 | return msg.str(); |
---|
| 34 | }; |
---|
| 35 | |
---|
| 36 | ostream& operator<< (ostream& output_stream , |
---|
| 37 | morpheo::behavioural::generic::counter::Statistics & x) |
---|
| 38 | { |
---|
| 39 | output_stream << x.print(0); |
---|
| 40 | |
---|
| 41 | return output_stream; |
---|
| 42 | }; |
---|
| 43 | |
---|
| 44 | }; // end namespace counter |
---|
| 45 | }; // end namespace generic |
---|
| 46 | |
---|
| 47 | }; // end namespace behavioural |
---|
| 48 | }; // end namespace morpheo |
---|
| 49 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.