36 #ifndef _OutputManager_H__ 37 #define _OutputManager_H__ 84 { this->updateCombinedLevelMask(); }
86 { this->updateCombinedAdditionalContextsLevelMask(); }
88 { this->updateCombinedAdditionalContextsMask(); }
99 return (this->combinedLevelMask_ & level) ||
100 ((this->combinedAdditionalContextsLevelMask_ & level) && (this->combinedAdditionalContextsMask_ & context.
mask));
109 {
return this->listeners_; }
121 void updateCombinedLevelMask();
122 void updateCombinedAdditionalContextsLevelMask();
123 void updateCombinedAdditionalContextsMask();
143 static std::shared_ptr<OutputManager>& getInstancePointer();
#define _UtilExport
Definition: UtilPrereqs.h:60
OutputContextMask mask
The mask of the context (or the mask of the main-context if this container defines a sub-context) ...
Definition: OutputDefinitions.h:114
OutputContextMask combinedAdditionalContextsMask_
The combined mask of accepted additional contexts of all listeners.
Definition: OutputManager.h:129
Stores all information about a context.
Definition: OutputDefinitions.h:112
::std::string string
Definition: gtest-port.h:756
virtual void updatedAdditionalContextsLevelMask(const OutputListener *listener) override
Definition: OutputManager.h:85
OutputLevel combinedLevelMask_
The combined mask of accepted levels of all listeners.
Definition: OutputManager.h:127
LogWriter * getLogWriter()
Definition: OutputManager.h:76
Output level, used for messages directed to the user (e.g. "Press any key to continue") ...
Definition: OutputDefinitions.h:89
OutputContextSubID subcontextCounter_
Counts the number of sub-contexts (and generates their IDs)
Definition: OutputManager.h:133
std::vector< OutputListener * > listeners_
List of all registered output listeners.
Definition: OutputManager.h:125
virtual void updatedAdditionalContextsMask(const OutputListener *listener) override
Definition: OutputManager.h:87
OutputLevel
Output levels define type and importance of an output message.
Definition: OutputDefinitions.h:84
Defines output levels and output contexts.
Declaration of the AdditionalContextListener interface.
bool acceptsOutput(OutputLevel level, const OutputContextContainer &context) const
Returns true if at least one of the output listeners will accept output with the given level and cont...
Definition: OutputManager.h:97
Definition: OutputManager.h:141
ConsoleWriter * consoleWriterInstance_
The main instance of ConsoleWriter, managed by OutputManager.
Definition: OutputManager.h:137
AdditionalContextListener is an interface which is used to notify OutputManager about additional cont...
Definition: AdditionalContextListener.h:49
OutputManager acts as the center of the output system and is implemented as a singleton.
Definition: OutputManager.h:65
MemoryWriter is a singleton which is derived from OutputListener and writes all output to a list...
Definition: MemoryWriter.h:54
virtual void updatedLevelMask(const OutputListener *listener) override
Definition: OutputManager.h:83
LogWriter * logWriterInstance_
The main instance of LogWriter, managed by OutputManager.
Definition: OutputManager.h:138
_UtilExport const OutputContextContainer & registerContext(const std::string &name, const std::string &subname="")
Registers a context.
Definition: OutputManager.cc:260
uint16_t OutputContextSubID
Used to store the IDs of sub-contexts. Each number except context::no_subcontext defines a sub-contex...
Definition: OutputDefinitions.h:109
const std::vector< OutputListener * > & getListeners() const
Definition: OutputManager.h:108
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
OutputLevel getCombinedLevelMask() const
Definition: OutputManager.h:111
MemoryWriter * getMemoryWriter()
Definition: OutputManager.h:74
Shared library macros, enums, constants and forward declarations for the util library ...
OutputListener is an interface which is used to receive output of a certain level and context from Ou...
Definition: OutputListener.h:51
OutputContextMask getCombinedAdditionalContextsMask() const
Definition: OutputManager.h:113
ConsoleWriter inherits from BaseWriter and writes output to the console.
Definition: ConsoleWriter.h:51
bool isInitialized_
Becomes true once the following instances were created.
Definition: OutputManager.h:135
OutputLevel getCombinedAdditionalContextsLevelMask() const
Definition: OutputManager.h:112
std::map< std::string, OutputContextMask > contextMasks_
Contains all main-contexts and their masks.
Definition: OutputManager.h:131
The LogWriter class inherits from BaseWriter and writes output to a log-file.
Definition: LogWriter.h:55
std::map< std::string, OutputContextContainer > contextContainers_
Contains all contexts including sub-contexts and their containers.
Definition: OutputManager.h:132
ConsoleWriter * getConsoleWriter()
Definition: OutputManager.h:75
MemoryWriter * memoryWriterInstance_
The main instance of MemoryWriter, managed by OutputManager.
Definition: OutputManager.h:136
uint64_t OutputContextMask
Used to store the context masks. Each bit defines a context.
Definition: OutputDefinitions.h:108
OutputLevel combinedAdditionalContextsLevelMask_
The combined mask of accepted additional contexts levels of all listeners.
Definition: OutputManager.h:128