diff --git a/eo/src/utils/eoOStreamMonitor.cpp b/eo/src/utils/eoOStreamMonitor.cpp index 6836f337e..b9e848c58 100644 --- a/eo/src/utils/eoOStreamMonitor.cpp +++ b/eo/src/utils/eoOStreamMonitor.cpp @@ -47,8 +47,10 @@ eoMonitor& eoOStreamMonitor::operator()(void) */ for (iterator it = vec.begin (); it != vec.end (); ++it) { - // value only - out << (*it)->getValue (); + if( print_names ) { + out << (*it)->longName() << name_sep; + } + out << (*it)->getValue(); out << delim << std::left << std::setfill(fill) << std::setw(width); } // for it in vec diff --git a/eo/src/utils/eoOStreamMonitor.h b/eo/src/utils/eoOStreamMonitor.h index 982c954f9..032665224 100644 --- a/eo/src/utils/eoOStreamMonitor.h +++ b/eo/src/utils/eoOStreamMonitor.h @@ -56,8 +56,15 @@ public : } */ - eoOStreamMonitor( std::ostream & _out, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : - out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true) + eoOStreamMonitor( + std::ostream & _out, + std::string _delim = "\t", unsigned int _width=20, char _fill=' ', + bool _print_names = false, std::string _name_sep = ":" + ) : + out(_out), + delim(_delim), width(_width), fill(_fill), + firsttime(true), + print_names(_print_names), name_sep(_name_sep) {} eoMonitor& operator()(void); @@ -70,6 +77,8 @@ private : unsigned int width; char fill; bool firsttime; + bool print_names; + std::string name_sep; }; #endif // _eoOStreamMonitor_h_