Class to bind to a certain type of logging. More...
#include <LogBinding.h>
Static Public Member Functions | |
static void | print (const std::stringstream &str) |
static void | print (const char *str) |
static void | printError (const std::stringstream &str) |
static void | printError (const char *str) |
static void | printErrorLn (const std::stringstream &str) |
static void | printErrorLn (const char *str) |
static void | printLn (const std::stringstream &str) |
static void | printLn (const char *str) |
static void | printWarn (const std::stringstream &str) |
static void | printWarn (const char *str) |
static void | printWarnLn (const std::stringstream &str) |
static void | printWarnLn (const char *str) |
Static Public Attributes | |
static SHARED_PTR< Log > | Singleton |
Protected Member Functions | |
virtual void | implPrint (const std::stringstream &str)=0 |
virtual void | implPrint (const char *str)=0 |
virtual void | implPrintError (const std::stringstream &str)=0 |
virtual void | implPrintError (const char *str)=0 |
virtual void | implPrintWarn (const std::stringstream &str)=0 |
virtual void | implPrintWarn (const char *str)=0 |
virtual void | printNewLine (bool errorStream)=0 |
Static Private Member Functions | |
static bool | sglOK (const char *msg) |
Static Private Attributes | |
static bool | initSglWarningPrinted = false |
Class to bind to a certain type of logging.
Definition at line 36 of file LogBinding.h.
virtual void GraspIt::Log::implPrint | ( | const std::stringstream & | str | ) | [protected, pure virtual] |
Implemented in GraspIt::StdLog.
virtual void GraspIt::Log::implPrint | ( | const char * | str | ) | [protected, pure virtual] |
Implemented in GraspIt::StdLog.
virtual void GraspIt::Log::implPrintError | ( | const std::stringstream & | str | ) | [protected, pure virtual] |
Implemented in GraspIt::StdLog.
virtual void GraspIt::Log::implPrintError | ( | const char * | str | ) | [protected, pure virtual] |
Implemented in GraspIt::StdLog.
virtual void GraspIt::Log::implPrintWarn | ( | const std::stringstream & | str | ) | [protected, pure virtual] |
Implemented in GraspIt::StdLog.
virtual void GraspIt::Log::implPrintWarn | ( | const char * | str | ) | [protected, pure virtual] |
Implemented in GraspIt::StdLog.
static void GraspIt::Log::print | ( | const std::stringstream & | str | ) | [inline, static] |
Definition at line 39 of file LogBinding.h.
static void GraspIt::Log::print | ( | const char * | str | ) | [inline, static] |
Definition at line 52 of file LogBinding.h.
static void GraspIt::Log::printError | ( | const std::stringstream & | str | ) | [inline, static] |
Definition at line 43 of file LogBinding.h.
static void GraspIt::Log::printError | ( | const char * | str | ) | [inline, static] |
Definition at line 56 of file LogBinding.h.
static void GraspIt::Log::printErrorLn | ( | const std::stringstream & | str | ) | [inline, static] |
Definition at line 73 of file LogBinding.h.
static void GraspIt::Log::printErrorLn | ( | const char * | str | ) | [inline, static] |
Definition at line 98 of file LogBinding.h.
static void GraspIt::Log::printLn | ( | const std::stringstream & | str | ) | [inline, static] |
Definition at line 65 of file LogBinding.h.
static void GraspIt::Log::printLn | ( | const char * | str | ) | [inline, static] |
Definition at line 90 of file LogBinding.h.
virtual void GraspIt::Log::printNewLine | ( | bool | errorStream | ) | [protected, pure virtual] |
Subclasses which do NOT automatically make a new line in implPrint* functions need to implement the printing of a new line in this function.
errorStream | set to true if the new line is to be printed in the error stream. Otherwise is printed to the standard stream. |
Implemented in GraspIt::StdLog.
static void GraspIt::Log::printWarn | ( | const std::stringstream & | str | ) | [inline, static] |
Definition at line 47 of file LogBinding.h.
static void GraspIt::Log::printWarn | ( | const char * | str | ) | [inline, static] |
Definition at line 60 of file LogBinding.h.
static void GraspIt::Log::printWarnLn | ( | const std::stringstream & | str | ) | [inline, static] |
Definition at line 81 of file LogBinding.h.
static void GraspIt::Log::printWarnLn | ( | const char * | str | ) | [inline, static] |
Definition at line 106 of file LogBinding.h.
static bool GraspIt::Log::sglOK | ( | const char * | msg | ) | [inline, static, private] |
If singleton is NULL, prints the message on std::cout and only once prints a warning that Singleton is not inisialized. If singleton is not NULL, this method just returns true.
Definition at line 138 of file LogBinding.h.
bool GraspIt::Log::initSglWarningPrinted = false [static, private] |
Definition at line 152 of file LogBinding.h.
SHARED_PTR< GraspIt::Log > GraspIt::Log::Singleton [static] |
Implementation of methods for logging
Copyright (C) 2016 Jennifer Buehler
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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Definition at line 115 of file LogBinding.h.