|
gramods
|
This is the base type for back-ends taking care of information sent to the Console class. More...
#include <MessageSink.hh>


Classes | |
| struct | Message |
Public Member Functions | |
| virtual void | initialize () override |
| Called to initialize the MessageSink. More... | |
| void | setShowTime (bool on) |
| Activate or deactivate the output of the time of each message. More... | |
| virtual void | output (Message msg)=0 |
| Outputs the provided message to the implementation specific channel. More... | |
Public Member Functions inherited from gramods::gmCore::Object | |
| Object () | |
| Initializes internal data. More... | |
| virtual | ~Object () |
| Cleaning up internal data. More... | |
| virtual void | accept (Visitor *visitor) |
| Calls the visitors apply method with this as argument. More... | |
| virtual void | traverse (Visitor *visitor) |
| Calls the child Object's accept method, if such exist. More... | |
| virtual std::string | getDefaultKey () |
| Returns the default key for the Object when automatically instantiated in a Configuration, i.e. More... | |
| bool | isInitialized () |
| Returns true if the Object is initialized. More... | |
Static Public Attributes | |
| static gramods::gmCore::OFactory::OFactoryInformation | _gm_ofi |
Protected Member Functions | |
| void | outputMetadata (std::ostream &out, Message msg) |
| Write metadata from the specified message to the specified stream. More... | |
This is the base type for back-ends taking care of information sent to the Console class.
A sink will register itself as a sink of the Console class upon initialization. To remove a registered message sink, call removeSink or removeAllSinks to remove all sinks.
|
overridevirtual |
Called to initialize the MessageSink.
This should be called once only!
Reimplemented from gramods::gmCore::Object.
|
pure virtual |
Outputs the provided message to the implementation specific channel.
This method may be called concurrently from multiple thread and must therefore be thread safe.
Implemented in gramods::gmCore::NullMessageSink, gramods::gmCore::OStreamMessageSink, and gramods::gmCore::LogFileMessageSink.
|
protected |
Write metadata from the specified message to the specified stream.
|
inline |
Activate or deactivate the output of the time of each message.
Default is false, not showing time.
XML-attribute: showTime