From 8a4aa60b830467d81f8029c194bec5b2e74ceb17 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 22 Oct 2007 17:44:54 +0000 Subject: basic system console (new files) --- src/server/console.cc | 27 +++++++++++++++++++++++++++ src/server/console.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 src/server/console.cc create mode 100644 src/server/console.h (limited to 'src/server') diff --git a/src/server/console.cc b/src/server/console.cc new file mode 100644 index 0000000..40b752d --- /dev/null +++ b/src/server/console.cc @@ -0,0 +1,27 @@ +/* + server/console.cc + This file is part of the Osirion project and is distributed under + the terms and conditions of the GNU General Public License version 2 +*/ + +#include "console.h" +#include + +namespace server { +std::ostream & Console::message() +{ + return std::cout; +} + +std::ostream & Console::warning() +{ + return std::cerr; +} + +std::ostream & Console::debug() +{ + return std::cout; +} + +} // namespace server + diff --git a/src/server/console.h b/src/server/console.h new file mode 100644 index 0000000..69f2ea8 --- /dev/null +++ b/src/server/console.h @@ -0,0 +1,31 @@ +/* + server/console.h + This file is part of the Osirion project and is distributed under + the terms of the GNU General Public License version 2 +*/ + +#ifndef __INCLUDED_SERVERCONSOLE_H__ +#define __INCLUDED_SERVERCONSOLE_H__ + +#include "common/console.h" + +namespace server { + +/// Interface for a console object that writes messages on the screen +class Console : public common::Console { +public: + /// stream to send normal messages too + virtual std::ostream & message(); + + /// stream to send warning messages too + virtual std::ostream & warning(); + + /// stream to send debug messages too + virtual std::ostream & debug(); + +}; // class Console + +} // namespace server + +#endif // __INCLUDED_SERVERCONSOLE_H__ + -- cgit v1.2.3