diff --git a/eo/src/utils/eoLogger.cpp b/eo/src/utils/eoLogger.cpp index 391076126..e478ba093 100644 --- a/eo/src/utils/eoLogger.cpp +++ b/eo/src/utils/eoLogger.cpp @@ -21,8 +21,8 @@ Contact: http://eodev.sourceforge.net Authors: - Johann Dréo - Caner Candan +Johann Dréo +Caner Candan */ @@ -40,17 +40,7 @@ Authors: #include "eoLogger.h" -eoLogger::eoLogger() : - std::ostream(&_obuf), - - _verbose("quiet", "verbose", "Set the verbose level", 'v'), - _printVerboseLevels(false, "print-verbose-levels", "Print verbose levels", 'l'), - _output("", "output", "Redirect a standard output to a file", 'o'), - - _selectedLevel(eo::progress), - _contextLevel(eo::quiet), - _fd(2), - _obuf(_fd, _contextLevel, _selectedLevel) +void eoLogger::_init() { _standard_io_streams[&std::cout] = 1; _standard_io_streams[&std::clog] = 2; @@ -67,6 +57,37 @@ eoLogger::eoLogger() : addLevel("xdebug", eo::xdebug); } +eoLogger::eoLogger() : + std::ostream(&_obuf), + + _verbose("quiet", "verbose", "Set the verbose level", 'v'), + _printVerboseLevels(false, "print-verbose-levels", "Print verbose levels", 'l'), + _output("", "output", "Redirect a standard output to a file", 'o'), + + _selectedLevel(eo::progress), + _contextLevel(eo::quiet), + _fd(2), + _obuf(_fd, _contextLevel, _selectedLevel) +{ + _init(); +} + +eoLogger::eoLogger(eo::file file) : + std::ostream(&_obuf), + + _verbose("quiet", "verbose", "Set the verbose level", 'v'), + _printVerboseLevels(false, "print-verbose-levels", "Print verbose levels", 'l'), + _output("", "output", "Redirect a standard output to a file", 'o'), + + _selectedLevel(eo::progress), + _contextLevel(eo::quiet), + _fd(2), + _obuf(_fd, _contextLevel, _selectedLevel) +{ + _init(); + *this << file; +} + eoLogger::~eoLogger() { if (_fd > 2) { ::close(_fd); } @@ -99,7 +120,7 @@ void eoLogger::_createParameters( eoParser& parser ) //------------------------------------------------------------------ - // // we're gonna print the list of levels if -l parameter is used. + // we're gonna print the list of levels if -l parameter is used. //------------------------------------------------------------------ if ( _printVerboseLevels.value() ) @@ -195,7 +216,6 @@ namespace eo {} } -//! make_verbose gets level of verbose and sets it in eoLogger void make_verbose(eoParser& parser) { eo::log._createParameters( parser ); diff --git a/eo/src/utils/eoLogger.h b/eo/src/utils/eoLogger.h index 50369d35c..e5faf8f34 100644 --- a/eo/src/utils/eoLogger.h +++ b/eo/src/utils/eoLogger.h @@ -142,12 +142,20 @@ class eoLogger : public eoObject, public std::ostream { public: + //! default ctor eoLogger(); + + //! overidded ctor in order to instanciate a logger with a file define in parameter + eoLogger(eo::file file); + + //! dtor ~eoLogger(); + //! common function for all eo objects virtual std::string className() const; //! Print the available levels on the standard output + //! enablable with the option -l void printLevels() const; /*! Returns the selected levels, that is the one asked by the user @@ -163,11 +171,16 @@ public: inline eo::Levels getLevelContext() const { return _contextLevel; } protected: + //! in order to add a level of verbosity void addLevel(std::string name, eo::Levels level); private: + //! used by the function make_verbose in order to add options to specify the verbose level void _createParameters( eoParser& ); + //! used by the set of ctors to initiate some useful variables + void _init(); + private: /** * outbuf @@ -195,21 +208,26 @@ public: /** * operator<< used there to set a verbose mode. */ + //! in order to use stream style to define the context verbose level where the following logs will be saved friend eoLogger& operator<<(eoLogger&, const eo::Levels); /** * operator<< used there to set a filename through the class file. */ + //! in order to use stream style to define a file to dump instead the standart output friend eoLogger& operator<<(eoLogger&, eo::file); /** * operator<< used there to set a verbose level through the class setlevel. */ + //! in order to use stream style to define manually the verbose level instead using options friend eoLogger& operator<<(eoLogger&, eo::setlevel); /** * operator<< used there to be able to use std::cout to say that we wish to redirect back the buffer to a standard output. */ + //! in order to use stream style to go back to a standart output defined by STL + //! and to get retro-compatibility friend eoLogger& operator<<(eoLogger&, std::ostream&); private: @@ -254,6 +272,7 @@ private: /** @example t-eoLogger.cpp */ +//! make_verbose gets level of verbose and sets it in eoLogger void make_verbose(eoParser&); namespace eo diff --git a/website/index.html b/website/index.html index 39b2185f0..502f20aa7 100644 --- a/website/index.html +++ b/website/index.html @@ -1,33 +1,44 @@ + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - - - - - + + + + + + + - Evolving Objects (EO): Evolutionary Computation Framework - + Evolving Objects (EO): Evolutionary Computation Framework - + + -
- Evolving Objects logo - - - - + + + - + diff --git a/website/lightblue.css b/website/lightblue.css index e96546fb7..b6802a0e7 100644 --- a/website/lightblue.css +++ b/website/lightblue.css @@ -1,14 +1,14 @@ -/*************************************************************************** -* * -* contented3 - An open source xhtml/css website template by Contented * -* Designs. You're free to modify it and use it for any purpose without * -* cost or obligation. We'd prefer that you leave the link to our website * -* in the footer but it's not required. * -* * -* If you have comments or questions, please contact us at * -* http://www.ContentedDesigns.com. Thanks! * -* * -***************************************************************************/ +/**************************************************************************** + * * + * contented3 - An open source xhtml/css website template by Contented * + * Designs. You're free to modify it and use it for any purpose without * + * cost or obligation. We'd prefer that you leave the link to our website * + * in the footer but it's not required. * + * * + * If you have comments or questions, please contact us at * + * http://www.ContentedDesigns.com. Thanks! * + * * + ***************************************************************************/ * { padding:0px; @@ -111,18 +111,18 @@ table { } a { - color: #3366CC; - /*background-color: #FFFFFF;*/ - font-weight: normal; - text-decoration: none; + color: #3366CC; + /*background-color: #FFFFFF;*/ + font-weight: normal; + text-decoration: none; outline:none; } a:hover { - color: #0033CC; - /*background-color: #FFFFFF;*/ - font-weight: normal; - text-decoration: underline; + color: #0033CC; + /*background-color: #FFFFFF;*/ + font-weight: normal; + text-decoration: underline; } @@ -133,12 +133,12 @@ a:hover { } #title { - color:#3366CC; - /*background-color:#FFFFFF;*/ - font-size:3em; - font-weight:bold; - margin:0px 0px 10px 0px; - float:left; + color:#3366CC; + /*background-color:#FFFFFF;*/ + font-size:3em; + font-weight:bold; + margin:0px 0px 10px 0px; + float:left; } #slogan { @@ -170,7 +170,7 @@ ul#menu { margin: 0; padding: 0; list-style: none; - /*width:650px;*/ +/*width:650px;*/ } ul#menu li { @@ -201,7 +201,7 @@ ul#menu a.selected:visited { background: #3366CC; color: #FFFFFF; } padding:1em; margin:1em; /*width:650px; - float:left;*/ + float:left;*/ clear:left; } @@ -217,16 +217,16 @@ ul#menu a.selected:visited { background: #3366CC; color: #FFFFFF; } } #foot a { - color:#3366CC; - background-color:#FFFFFF; - text-decoration: none; + color:#3366CC; + background-color:#FFFFFF; + text-decoration: none; } #foot a:hover { - color:#0033CC; - background-color:#FFFFFF; - font-weight: normal; - text-decoration: underline; + color:#0033CC; + background-color:#FFFFFF; + font-weight: normal; + text-decoration: underline; } #copyright { @@ -248,10 +248,10 @@ ul#menu a.selected:visited { background: #3366CC; color: #FFFFFF; } font-weight:bold; } - .table_form_label { +.table_form_label { text-align:right; padding-right:1em; - } +} .table_form_submit { text-align:center;