From 9c51b925b680b3765fe33c3eeab5cdaedb691fec Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Sun, 31 Oct 2010 21:19:34 +0100 Subject: [PATCH] alternate function prototypes without verbose parameter --- eo/src/eoCombinedInit.h | 12 ++++++++---- eo/src/eoProportionalCombinedOp.h | 10 +++++++--- eo/src/utils/eoOStreamMonitor.h | 4 ++++ eo/src/utils/eoStdoutMonitor.h | 8 ++++++-- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/eo/src/eoCombinedInit.h b/eo/src/eoCombinedInit.h index 240dd7b8..cdd4aa7d 100644 --- a/eo/src/eoCombinedInit.h +++ b/eo/src/eoCombinedInit.h @@ -43,12 +43,16 @@ public: rates.push_back(_rate); } - /** The usual method to add objects to the combination - */ void add(eoInit & _init, double _rate, bool _verbose=false) { - eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoCombinedInit::add is deprecated and will be removed in the next release." << std::endl; - + eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoCombinedInit::add is deprecated and will be removed in the next release." << std::endl; + add( _init, _rate ); + } + + /** The usual method to add objects to the combination + */ + void add(eoInit & _init, double _rate) + { initializers.push_back(&_init); rates.push_back(_rate); // compute the relative rates in percent - to warn the user! diff --git a/eo/src/eoProportionalCombinedOp.h b/eo/src/eoProportionalCombinedOp.h index 58dd79a4..b5b69655 100644 --- a/eo/src/eoProportionalCombinedOp.h +++ b/eo/src/eoProportionalCombinedOp.h @@ -171,13 +171,17 @@ public: rates.push_back(_rate); } -virtual std::string className() const { return "eoPropCombinedQuadOp"; } + virtual std::string className() const { return "eoPropCombinedQuadOp"; } - // addition of a true operator -virtual void add(eoQuadOp & _op, const double _rate, bool _verbose=false) + virtual void add(eoQuadOp & _op, const double _rate, bool _verbose=false) { eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoPropCombinedQuadOp::add is deprecated and will be removed in the next release." << std::endl; + add(_op,_rate); + } + // addition of a true operator + virtual void add(eoQuadOp & _op, const double _rate) + { ops.push_back(&_op); rates.push_back(_rate); // compute the relative rates in percent - to warn the user! diff --git a/eo/src/utils/eoOStreamMonitor.h b/eo/src/utils/eoOStreamMonitor.h index 506944cd..2984a991 100644 --- a/eo/src/utils/eoOStreamMonitor.h +++ b/eo/src/utils/eoOStreamMonitor.h @@ -48,6 +48,10 @@ public : eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoOStreamMonitor constructor is deprecated and will be removed in the next release" << std::endl; } + eoOStreamMonitor( std::ostream & _out, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true) + {} + eoMonitor& operator()(void); virtual std::string className(void) const { return "eoOStreamMonitor"; } diff --git a/eo/src/utils/eoStdoutMonitor.h b/eo/src/utils/eoStdoutMonitor.h index 68e694c5..b25e797f 100644 --- a/eo/src/utils/eoStdoutMonitor.h +++ b/eo/src/utils/eoStdoutMonitor.h @@ -43,12 +43,16 @@ class eoStdoutMonitor : public eoOStreamMonitor public : eoStdoutMonitor(bool _verbose=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : eoOStreamMonitor( std::cout, _verbose, _delim, _width, _fill) - { - + { eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoStdutMonitor constructor is deprecated and will be removed in the next release" << std::endl; } + eoStdoutMonitor(std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + eoOStreamMonitor( std::cout, _delim, _width, _fill) + {} + virtual std::string className(void) const { return "eoStdoutMonitor"; } }; #endif +