- Timestamp:
- Aug 21, 2011, 4:04:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/output/src/libraries/util/output/OutputManager.h
r8833 r8848 27 27 */ 28 28 29 /** 30 @file 31 @ingroup Output 32 @brief Declaration of the OutputManager class which receives output from orxonox::OutputStream 33 and distributes it to all instances of orxonox::OutputListener. 34 */ 35 29 36 #ifndef _OutputManager_H__ 30 37 #define _OutputManager_H__ … … 39 46 namespace orxonox 40 47 { 48 /** 49 @brief OutputManager acts as the center of the output system and is implemented as a singleton. 50 51 All instances of OutputStream (and hence also the orxout() function) 52 send their buffered output to OutputManager. OutputManager then 53 distributes this output to all registered instances of OutputListener. 54 55 For each listener OutputManager checks if it wants to receive output 56 with the given level and context. OutputManager itself also maintains 57 masks that define the accepted levels and concept. They are a 58 combination of the masks of all output listeners. See the description 59 of OutputListener for a more conclusive description of these masks. 60 61 Additionally OutputManager is used to register output contexts. 62 */ 41 63 class _UtilExport OutputManager 42 64 { … … 55 77 void updateCombinedAdditionalContextsMask(); 56 78 79 /** 80 @brief Returns true if at least one of the output listeners will accept output with the given level and context. 81 82 For the sake of performance, output messages with levels or 83 contexts that are not accepted should be ignored or, even 84 better, not generated at all. 85 */ 57 86 inline bool acceptsOutput(OutputLevel level, const OutputContextContainer& context) const 58 87 { … … 71 100 ~OutputManager(); 72 101 73 std::vector<OutputListener*> listeners_; 102 std::vector<OutputListener*> listeners_; ///< List of all registered output listeners 74 103 75 OutputLevel combinedLevelMask_; 76 OutputLevel combinedAdditionalContextsLevelMask_; 77 OutputContextMask combinedAdditionalContextsMask_; 104 OutputLevel combinedLevelMask_; ///< The combined mask of accepted levels of all listeners 105 OutputLevel combinedAdditionalContextsLevelMask_; ///< The combined mask of accepted additional contexts levels of all listeners 106 OutputContextMask combinedAdditionalContextsMask_; ///< The combined mask of accepted additional contexts of all listeners 78 107 79 std::map<std::string, OutputContextMask> contextMasks_; 80 std::map<std::string, OutputContextContainer> contextContainers_; 81 OutputContextSubID subcontextCounter_; 108 std::map<std::string, OutputContextMask> contextMasks_; ///< Contains all main-contexts and their masks 109 std::map<std::string, OutputContextContainer> contextContainers_; ///< Contains all contexts including sub-contexts and their containers 110 OutputContextSubID subcontextCounter_; ///< Counts the number of sub-contexts (and generates their IDs) 82 111 }; 83 112 }
Note: See TracChangeset
for help on using the changeset viewer.