MRPT logo

mrpt::utils::CDebugOutputCapable Class Reference

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. More...

#include <mrpt/utils/CDebugOutputCapable.h>

Inheritance diagram for mrpt::utils::CDebugOutputCapable:

mrpt::bayes::CParticleFilter mrpt::hwdrivers::C2DRangeFinderAbstract mrpt::hwdrivers::CCameraSensor mrpt::hwdrivers::CGPSInterface mrpt::hwdrivers::CRoboticHeadInterface mrpt::math::CGraphPartitioner mrpt::math::CLevenbergMarquardtTempl< NUMTYPE, USERPARAM > mrpt::slam::CConsistentObservationAlignment mrpt::slam::CDetectorDoorCrossing mrpt::slam::CIncrementalMapPartitioner mrpt::slam::CMetricMapBuilder mrpt::slam::CMetricMapsAlignmentAlgorithm mrpt::slam::CPathPlanningMethod mrpt::slam::CRangeBearingKFSLAM mrpt::slam::CRangeBearingKFSLAM2D mrpt::utils::CServerTCPSocket

List of all members.

Public Member Functions

 CDebugOutputCapable (CStream *strm=NULL)
 Default initialization.
virtual ~CDebugOutputCapable ()
void debugOutputSetStream (CStream *str)
 The passed stream MUST be a valid pointer during all the life of the derived class.
void debugOutputEnableConsole (bool enable)
 Display messages into the console (std::cout) apart from the stream (default=true).
void printf_debug (const char *frmt,...)
 Sends a formated text to "debugOut" if not NULL, or to cout otherwise.

Private Attributes

CStreamm_stream
bool m_show_console


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 the stream passed to debugOutputSetStream, but console output can be switched off with debugOutputEnableConsole(false).

See CDebugOutputCapable::printf_debug.

Definition at line 47 of file CDebugOutputCapable.h.


Constructor & Destructor Documentation

mrpt::utils::CDebugOutputCapable::CDebugOutputCapable ( CStream strm = NULL  )  [inline]

Default initialization.

Definition at line 55 of file CDebugOutputCapable.h.

virtual mrpt::utils::CDebugOutputCapable::~CDebugOutputCapable (  )  [inline, virtual]

Definition at line 57 of file CDebugOutputCapable.h.


Member Function Documentation

void mrpt::utils::CDebugOutputCapable::debugOutputEnableConsole ( bool  enable  )  [inline]

Display messages into the console (std::cout) apart from the stream (default=true).

Definition at line 63 of file CDebugOutputCapable.h.

void mrpt::utils::CDebugOutputCapable::debugOutputSetStream ( CStream str  )  [inline]

The passed stream MUST be a valid pointer during all the life of the derived class.

Set to NULL to disable.

Definition at line 60 of file CDebugOutputCapable.h.

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

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


Member Data Documentation

Definition at line 51 of file CDebugOutputCapable.h.

Reimplemented in mrpt::hwdrivers::C2DRangeFinderAbstract.

Definition at line 50 of file CDebugOutputCapable.h.




Page generated by Doxygen 1.5.7.1 for MRPT 0.7.1 SVN: at Mon Aug 17 23:02:22 EDT 2009