X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fio%2Fconsole.h;h=1755659f9f5b3c0d7e93d3670decf4157d034fdb;hb=5d3a5019399f97af0371f4fd6dc415d36de6ac3a;hp=1200086014e4dae5a82196dd48667c31dfe551a3;hpb=c8bf2d6c15893ccc9dbc4e04611b7229029f4808;p=libs%2Fcore.git diff --git a/source/io/console.h b/source/io/console.h index 1200086..1755659 100644 --- a/source/io/console.h +++ b/source/io/console.h @@ -1,6 +1,7 @@ #ifndef MSP_IO_CONSOLE_H_ #define MSP_IO_CONSOLE_H_ +#include #include "eventobject.h" #include "handle.h" @@ -12,7 +13,7 @@ Provides access to standard input, output and error streams. This class can't be instantiated directly - use one of the cin, cout and cerr references instead. */ -class Console: public EventObject +class MSPCORE_API Console: public EventObject { public: enum Stream @@ -31,8 +32,8 @@ private: public: ~Console(); - virtual void set_block(bool); - virtual void set_inherit(bool); + void set_block(bool) override; + void set_inherit(bool) override; /** If local echo is enabled, characters will appear on the console as they are typed. Can only be used on an input Console. */ @@ -54,19 +55,19 @@ public: void redirect(Base &); protected: - virtual std::size_t do_write(const char *, std::size_t); - virtual std::size_t do_read(char *, std::size_t); + std::size_t do_write(const char *, std::size_t) override; + std::size_t do_read(char *, std::size_t) override; public: - virtual const Handle &get_handle(Mode); - virtual const Handle &get_event_handle() { return handle; } + const Handle &get_handle(Mode) override; + const Handle &get_event_handle() override { return handle; } static Console &instance(Stream); }; -extern Console &cin; -extern Console &cout; -extern Console &cerr; +MSPCORE_API extern Console &cin; +MSPCORE_API extern Console &cout; +MSPCORE_API extern Console &cerr; } // namespace IO } // namespace Msp