Comment out deprecated stuff and fix corresponding tests
This may break your code if you did not pay attention to warnings in the previous release, the old code is still here in case you want to understand what's going on.
This commit is contained in:
parent
b01c7ac0f0
commit
5827444774
15 changed files with 31 additions and 47 deletions
|
|
@ -201,7 +201,7 @@ eoCheckPoint<EOT>& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu
|
|||
// The Stdout monitor will print parameters to the screen ...
|
||||
if ( needStdoutMonitor )
|
||||
{
|
||||
eoStdoutMonitor *monitor = new eoStdoutMonitor(false);
|
||||
eoStdoutMonitor *monitor = new eoStdoutMonitor(/*false FIXME remove this deprecated prototype*/);
|
||||
_state.storeFunctor(monitor);
|
||||
|
||||
// when called by the checkpoint (i.e. at every generation)
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ eoCheckPoint<EOT>& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval
|
|||
// The Stdout monitor will print parameters to the screen ...
|
||||
if ( needStdoutMonitor )
|
||||
{
|
||||
eoStdoutMonitor *monitor = new eoStdoutMonitor(false);
|
||||
eoStdoutMonitor *monitor = new eoStdoutMonitor(/*false FIXME remove this deprecated prototype*/);
|
||||
_state.storeFunctor(monitor);
|
||||
|
||||
// when called by the checkpoint (i.e. at every generation)
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ eoCheckPoint<EOT>& do_make_checkpoint_assembled(eoParser& _parser, eoState& _sta
|
|||
|
||||
// STDOUT
|
||||
// ------
|
||||
eoStdoutMonitor *monitor = new eoStdoutMonitor(false);
|
||||
eoStdoutMonitor *monitor = new eoStdoutMonitor(/*false FIXME remove this deprecated prototype*/);
|
||||
_state.storeFunctor(monitor);
|
||||
checkpoint->add(*monitor);
|
||||
monitor->add(*generationCounter);
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
/* FIXME remove in next release
|
||||
/// Ctor - for historical reasons ... should disspear some day
|
||||
eoCombinedContinue( eoContinue<EOT>& _cont1, eoContinue<EOT>& _cont2)
|
||||
: eoContinue<EOT>(), std::vector<eoContinue<EOT>* >()
|
||||
|
|
@ -68,12 +69,14 @@ public:
|
|||
this->push_back(&_cont1);
|
||||
this->push_back(&_cont2);
|
||||
}
|
||||
*/
|
||||
|
||||
void add(eoContinue<EOT> & _cont)
|
||||
{
|
||||
this->push_back(&_cont);
|
||||
}
|
||||
|
||||
/* FIXME remove in next release
|
||||
void removeLast(void)
|
||||
{
|
||||
#ifndef DEPRECATED_MESSAGES
|
||||
|
|
@ -82,6 +85,7 @@ public:
|
|||
|
||||
this->pop_back();
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/** Returns false when one of the embedded continuators say so (logical and)
|
||||
|
|
|
|||
|
|
@ -44,11 +44,13 @@ public:
|
|||
rates.push_back(_rate);
|
||||
}
|
||||
|
||||
/* FIXME remove in next release
|
||||
void add(eoInit<EOT> & _init, double _rate, bool _verbose)
|
||||
{
|
||||
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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@ public:
|
|||
|
||||
virtual std::string className() const { return "eoPropCombinedQuadOp"; }
|
||||
|
||||
/* FIXME remove in next release
|
||||
virtual void add(eoQuadOp<EOT> & _op, const double _rate, bool _verbose)
|
||||
{
|
||||
#ifndef DEPRECATED_MESSAGES
|
||||
|
|
@ -195,6 +196,7 @@ public:
|
|||
|
||||
add(_op,_rate);
|
||||
}
|
||||
*/
|
||||
|
||||
// addition of a true operator
|
||||
virtual void add(eoQuadOp<EOT> & _op, const double _rate)
|
||||
|
|
@ -202,7 +204,7 @@ public:
|
|||
ops.push_back(&_op);
|
||||
rates.push_back(_rate);
|
||||
// compute the relative rates in percent - to warn the user!
|
||||
printOn( eo::log << eo::logging );
|
||||
printOn( eo::log << eo::logging );
|
||||
}
|
||||
|
||||
// outputs the operators and percentages
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ eoMonitor& eoOStreamMonitor::operator()(void)
|
|||
} // if firstime
|
||||
|
||||
// ok, now the real saving. write out
|
||||
// FIXME deprecated, remove in next release
|
||||
//! @todo old verbose formatting, do we still need it?
|
||||
/*
|
||||
for (iterator it = vec.begin (); it != vec.end (); ++it) {
|
||||
|
|
|
|||
|
|
@ -44,14 +44,17 @@ Authors:
|
|||
class eoOStreamMonitor : public eoMonitor
|
||||
{
|
||||
public :
|
||||
eoOStreamMonitor( std::ostream & _out, bool /*_verbose*/=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) :
|
||||
/* FIXME remove in next release
|
||||
eoOStreamMonitor( std::ostream & _out, bool _verbose=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) :
|
||||
out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true)
|
||||
{
|
||||
#ifndef DEPRECATED_MESSAGES
|
||||
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;
|
||||
#pragma message "WARNING: the use of the verbose parameter in eoOStreamMonitor constructor is deprecated and will be removed in the next release"
|
||||
#endif // !DEPRECATED_MESSAGES
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
eoOStreamMonitor( std::ostream & _out, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) :
|
||||
out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true)
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
/*
|
||||
(c) Thales group, 2010
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation;
|
||||
version 2 of the License.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: http://eodev.sourceforge.net
|
||||
|
||||
Authors:
|
||||
Caner Candan <caner.candan@thalesgroup.com>
|
||||
|
||||
*/
|
||||
|
||||
#ifndef EO_PARSER_LOGGER_H
|
||||
#define EO_PARSER_LOGGER_H
|
||||
|
||||
#include "eoParser.h"
|
||||
|
||||
#warning "[eoParserLogger] is deprecated"
|
||||
|
||||
typedef eoParser eoParserLogger;
|
||||
|
||||
#endif // !EO_PARSER_LOGGER_H
|
||||
|
|
@ -150,7 +150,8 @@ public :
|
|||
initialize(2*s);
|
||||
}
|
||||
|
||||
/** Re-initializes the Random Number Generator
|
||||
/* FIXME remove in next release
|
||||
** Re-initializes the Random Number Generator
|
||||
|
||||
This is the traditional seeding procedure. This version is deprecated and
|
||||
only provided for compatibility with old code. In new projects you should
|
||||
|
|
@ -159,11 +160,12 @@ public :
|
|||
@see reseed for details on usage of the seeding value.
|
||||
|
||||
@version old version (deprecated)
|
||||
*/
|
||||
*
|
||||
void oldReseed(uint32_t s)
|
||||
{
|
||||
initialize(s);
|
||||
}
|
||||
*/
|
||||
|
||||
/** Random number from unifom distribution
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ Authors:
|
|||
class eoStdoutMonitor : public eoOStreamMonitor
|
||||
{
|
||||
public :
|
||||
/* FIXME remove in next release
|
||||
eoStdoutMonitor(bool _verbose, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) :
|
||||
eoOStreamMonitor( std::cout, _verbose, _delim, _width, _fill)
|
||||
{
|
||||
|
|
@ -50,6 +51,7 @@ public :
|
|||
eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoStdoutMonitor constructor is deprecated and will be removed in the next release" << std::endl;
|
||||
#endif // !DEPRECATED_MESSAGES
|
||||
}
|
||||
*/
|
||||
|
||||
eoStdoutMonitor(std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) :
|
||||
eoOStreamMonitor( std::cout, _delim, _width, _fill)
|
||||
|
|
|
|||
|
|
@ -69,7 +69,8 @@ int main()
|
|||
// Terminators
|
||||
eoGenContinue<Chrom> continuator1(10);
|
||||
eoFitContinue<Chrom> continuator2(CHROM_SIZE);
|
||||
eoCombinedContinue<Chrom> continuator(continuator1, continuator2);
|
||||
eoCombinedContinue<Chrom> continuator(continuator1);
|
||||
continuator.add( continuator2 );
|
||||
eoCheckPoint<Chrom> checkpoint(continuator);
|
||||
eoStdoutMonitor monitor;
|
||||
checkpoint.add(monitor);
|
||||
|
|
|
|||
|
|
@ -73,7 +73,8 @@ int main()
|
|||
// Terminators
|
||||
eoGenContinue<Chrom> continuator1(10);
|
||||
eoFitContinue<Chrom> continuator2(CHROM_SIZE);
|
||||
eoCombinedContinue<Chrom> continuator(continuator1, continuator2);
|
||||
eoCombinedContinue<Chrom> continuator(continuator1);
|
||||
continuator.add( continuator2);
|
||||
eoCheckPoint<Chrom> checkpoint(continuator);
|
||||
eoStdoutMonitor monitor;
|
||||
checkpoint.add(monitor);
|
||||
|
|
|
|||
|
|
@ -72,7 +72,8 @@ int main()
|
|||
// Terminators
|
||||
eoGenContinue<Chrom> continuator1(10);
|
||||
eoFitContinue<Chrom> continuator2(CHROM_SIZE);
|
||||
eoCombinedContinue<Chrom> continuator(continuator1, continuator2);
|
||||
eoCombinedContinue<Chrom> continuator(continuator1);
|
||||
continuator.add(continuator2);
|
||||
eoCheckPoint<Chrom> checkpoint(continuator);
|
||||
eoStdoutMonitor monitor;
|
||||
checkpoint.add(monitor);
|
||||
|
|
|
|||
|
|
@ -139,7 +139,8 @@ void main_function()
|
|||
eoGenContinue<Chrom> continuator1(50);
|
||||
eoFitContinue<Chrom> continuator2(65535.f);
|
||||
|
||||
eoCombinedContinue<Chrom> continuator(continuator1, continuator2);
|
||||
eoCombinedContinue<Chrom> continuator(continuator1);
|
||||
continuator.add( continuator2);
|
||||
|
||||
eoCheckPoint<Chrom> checkpoint(continuator);
|
||||
|
||||
|
|
|
|||
Reference in a new issue