* introduce globalWarningStream()
This commit is contained in:
@@ -96,6 +96,14 @@ inline TextOutputStream& globalOutputStream(){
|
||||
return GlobalOutputStream::instance().getOutputStream();
|
||||
}
|
||||
|
||||
class WarningStreamHolder : public OutputStreamHolder {};
|
||||
typedef Static<WarningStreamHolder> GlobalWarningStream;
|
||||
|
||||
/// \brief Returns the global warning stream. Used to display warning messages to the user.
|
||||
inline TextOutputStream& globalWarningStream(){
|
||||
return GlobalWarningStream::instance().getOutputStream();
|
||||
}
|
||||
|
||||
class ErrorStreamHolder : public OutputStreamHolder {};
|
||||
typedef Static<ErrorStreamHolder> GlobalErrorStream;
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ virtual void setError( bool error ) = 0;
|
||||
virtual bool getError() const = 0;
|
||||
|
||||
virtual TextOutputStream& getOutputStream() = 0;
|
||||
virtual TextOutputStream& getWarningStream() = 0;
|
||||
virtual TextOutputStream& getErrorStream() = 0;
|
||||
virtual DebugMessageHandler& getDebugMessageHandler() = 0;
|
||||
|
||||
@@ -99,6 +100,7 @@ inline ModuleServer& globalModuleServer(){
|
||||
|
||||
inline void initialiseModule( ModuleServer& server ){
|
||||
GlobalErrorStream::instance().setOutputStream( server.getErrorStream() );
|
||||
GlobalWarningStream::instance().setOutputStream( server.getWarningStream() );
|
||||
GlobalOutputStream::instance().setOutputStream( server.getOutputStream() );
|
||||
GlobalDebugMessageHandler::instance().setHandler( server.getDebugMessageHandler() );
|
||||
GlobalModuleServer::instance().set( server );
|
||||
|
||||
Reference in New Issue
Block a user