#ifndef logger_null_hh #define logger_null_hh // logger_null.hh // marvin - programme du robot 2006. {{{ // // Copyright (C) 2006 Dufour Jérémy // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program 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 General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // // Contact : // Web: %WEB% // Email: // }}} #include "logger.hh" /// Null logger to prevent losing time. class LoggerNull : public Logger { public: /// Default empty constructor. LoggerNull (void) { } /// Default empty destructor. ~LoggerNull (void) { } /// Empty start. void start (const Log &, const char *, Log::Level) { } /// Empty stop. void stop (void) { } /// Empty << string or variable name. LoggerNull &operator<< (const char *) { return *this; } /// Empty << string or variable name. LoggerNull &operator<< (const std::string &) { return *this; } /// Empty << integer. LoggerNull &operator<< (int) { return *this; } /// Empty << double. LoggerNull &operator << (double) { return *this; } }; #endif // logger_null_hh