Main MRPT website > C++ reference for MRPT 1.5.9
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-2017, 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 
13 
14 #if !defined(MRPT_DISABLE_WARN_DEPRECATED_DEBUG_OUTPUT_CAPABLE)
15 MRPT_WARNING("`CDebugOutputCapable.h` is deprecated since MRPT 1.5.0, please use `mrpt/utils/COutputLogger.h` instead")
16 #endif
17 
18 namespace mrpt
19 {
20  namespace utils
21  {
22  /** 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.
23  * By default, messages sent to "printf_debug" will be shown in the console (cout) and also in
24  * the stream passed to debugOutputSetStream, but the console output can be
25  * switched off with debugOutputEnableConsole(false).
26  *
27  * 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).
28  *
29  * See CDebugOutputCapable::printf_debug.
30  * \note Deprecated since MRPT 1.5.0, please use COutputLogger instead. This class will be removed in future releases.
31  * \ingroup mrpt_base_grp
32  */
33  class BASE_IMPEXP CDebugOutputCapable : public mrpt::utils::COutputLogger
34  {
35  public:
36  /** Default initialization */
37  CDebugOutputCapable(const std::string &logName = std::string("log")) : mrpt::utils::COutputLogger(logName) { }
38  virtual ~CDebugOutputCapable() { }
39 
40  /** Sends a formated text to "debugOut" if not NULL, or to cout otherwise. */
41  void printf_debug( const char *frmt, ... ) const MRPT_printf_format_check(2,3);
42 
43  }; // End of class def.
44 
45  } // End of namespace
46 } // end of namespace
47 #endif
MRPT_WARNING("This is an old header, please replace with <mrpt/math.h>")
CDebugOutputCapable(const std::string &logName=std::string("log"))
Default initialization.
#define MRPT_printf_format_check(_FMT_, _VARARGS_)
GLsizei const GLchar ** string
Definition: glext.h:3919
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
This base class provides a common printf-like method to send debug information to std::cout...



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020