Cafu Engine
ConsoleWarningsOnly.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_CONSOLE_WARNINGS_ONLY_HPP_INCLUDED
8 #define CAFU_CONSOLE_WARNINGS_ONLY_HPP_INCLUDED
9 
10 #include "Console.hpp"
11 
12 
13 namespace cf
14 {
15  /// This class implements a console that only prints warnings (and filters normal output).
16  /// The output is directed to another given console.
18  {
19  public:
20 
21  /// Constructor for the warnings only console.
22  /// @param Console_ The target console on which the warnings should be printed.
23  ConsoleWarningsOnlyT(ConsoleI* Console_);
24 
25  // Methods of the ConsoleI interface.
26  void Print(const std::string& s);
27  void DevPrint(const std::string& s);
28  void Warning(const std::string& s);
29  void DevWarning(const std::string& s);
30 
31 
32  private:
33 
34  ConsoleI* Console; ///< The console to direct all output to.
35  };
36 }
37 
38 #endif
ConsoleWarningsOnlyT(ConsoleI *Console_)
Constructor for the warnings only console.
Definition: ConsoleWarningsOnly.cpp:13
This class implements a console that only prints warnings (and filters normal output).
Definition: ConsoleWarningsOnly.hpp:17
void Warning(const std::string &s)
Print warning to console.
Definition: ConsoleWarningsOnly.cpp:29
This class is an interface to the application console.
Definition: Console.hpp:18
void DevWarning(const std::string &s)
Print dev warning to console.
Definition: ConsoleWarningsOnly.cpp:35
void DevPrint(const std::string &s)
Print dev message to console.
Definition: ConsoleWarningsOnly.cpp:24
void Print(const std::string &s)
Print message to console.
Definition: ConsoleWarningsOnly.cpp:19