Main MRPT website > C++ reference for MRPT 1.5.7
List of all members | Public Member Functions
mrpt::utils::CDebugOutputCapable Class Reference

Detailed Description

This base class provides a common printf-like method to send debug information to std::cout, with the purpose of allowing its redirection to other streams if desired.

By default, messages sent to "printf_debug" will be shown in the console (cout) and also in the stream passed to debugOutputSetStream, but the console output can be switched off with debugOutputEnableConsole(false).

In addition, this class will send all the messages from "printf_debug" to the Visual Studio "Output Window" in debug mode (obviously, this is a feature only enabled under Windows).

See CDebugOutputCapable::printf_debug.

Note
Deprecated since MRPT 1.5.0, please use COutputLogger instead. This class will be removed in future releases.

Definition at line 33 of file CDebugOutputCapable.h.

#include <mrpt/utils/CDebugOutputCapable.h>

Inheritance diagram for mrpt::utils::CDebugOutputCapable:
Inheritance graph

Public Member Functions

 CDebugOutputCapable (const std::string &logName=std::string("log"))
 Default initialization. More...
 
virtual ~CDebugOutputCapable ()
 
void printf_debug (const char *frmt,...) const MRPT_printf_format_check(2
 Sends a formated text to "debugOut" if not NULL, or to cout otherwise. More...
 

Constructor & Destructor Documentation

◆ CDebugOutputCapable()

mrpt::utils::CDebugOutputCapable::CDebugOutputCapable ( const std::string logName = std::string("log"))
inline

Default initialization.

Definition at line 37 of file CDebugOutputCapable.h.

◆ ~CDebugOutputCapable()

virtual mrpt::utils::CDebugOutputCapable::~CDebugOutputCapable ( )
inlinevirtual

Definition at line 38 of file CDebugOutputCapable.h.

Member Function Documentation

◆ printf_debug()

void CDebugOutputCapable::printf_debug ( const char *  frmt,
  ... 
) const

Sends a formated text to "debugOut" if not NULL, or to cout otherwise.

Definition at line 26 of file CDebugOutputCapable.cpp.

References vsnprintf.




Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 8277875f6 Mon Jun 11 02:47:32 2018 +0200 at lun oct 28 01:50:49 CET 2019