Main MRPT website > C++ reference for MRPT 1.4.0
CDebugOutputCapable.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2016, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 #ifndef CDebugOutputCapable_H
10 #define CDebugOutputCapable_H
11 
12 #include <mrpt/base/link_pragmas.h>
13 
14 /*---------------------------------------------------------------
15  Class
16  ---------------------------------------------------------------*/
17 namespace mrpt
18 {
19  namespace utils
20  {
21  /** 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.
22  * By default, messages sent to "printf_debug" will be shown in the console (cout) and also in
23  * the stream passed to debugOutputSetStream, but the console output can be
24  * switched off with debugOutputEnableConsole(false).
25  *
26  * 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).
27  *
28  * See CDebugOutputCapable::printf_debug.
29  * \ingroup mrpt_base_grp
30  */
32  {
33  public:
34  /** Default initialization */
36  virtual ~CDebugOutputCapable() { }
37 
38  /** Sends a formated text to "debugOut" if not NULL, or to cout otherwise. */
39  static void printf_debug( const char *frmt, ... );
40 
41  }; // End of class def.
42 
43  } // End of namespace
44 } // end of namespace
45 #endif
mrpt::utils::CDebugOutputCapable
This base class provides a common printf-like method to send debug information to std::cout,...
Definition: CDebugOutputCapable.h:31
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CParticleFilter.h:16
mrpt::utils::CDebugOutputCapable::CDebugOutputCapable
CDebugOutputCapable()
Default initialization.
Definition: CDebugOutputCapable.h:35
mrpt::utils::CDebugOutputCapable::~CDebugOutputCapable
virtual ~CDebugOutputCapable()
Definition: CDebugOutputCapable.h:36



Page generated by Doxygen 1.8.17 for MRPT 1.4.0 SVN: at Sat Jan 18 22:37:07 UTC 2020