X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fio%2Fconsole.h;h=fe777cc04db02e90b88df52730c5f41ec3af513d;hb=c77c9fc85ca6b9fc111b1a3d8a84c3903e3dd646;hp=ac66288832966bd4bf67355519ce2bed5d43170a;hpb=991fabc1956b73a4007859058fb44171000b452e;p=libs%2Fcore.git diff --git a/source/io/console.h b/source/io/console.h index ac66288..fe777cc 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 @@ -64,9 +65,10 @@ public: static Console &instance(Stream); }; -extern Console &cin; -extern Console &cout; -extern Console &cerr; +// TODO make these inline instead of static when upgrading to C++17. +static Console &cin = Console::instance(Console::CIN); +static Console &cout = Console::instance(Console::COUT); +static Console &cerr = Console::instance(Console::CERR); } // namespace IO } // namespace Msp