Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 21, 2011, 4:04:54 PM (13 years ago)
Author:
landauf
Message:

added documentation and some comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/util/output/OutputManager.h

    r8833 r8848  
    2727 */
    2828
     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
    2936#ifndef _OutputManager_H__
    3037#define _OutputManager_H__
     
    3946namespace orxonox
    4047{
     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    */
    4163    class _UtilExport OutputManager
    4264    {
     
    5577            void updateCombinedAdditionalContextsMask();
    5678
     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            */
    5786            inline bool acceptsOutput(OutputLevel level, const OutputContextContainer& context) const
    5887            {
     
    71100            ~OutputManager();
    72101
    73             std::vector<OutputListener*> listeners_;
     102            std::vector<OutputListener*> listeners_;                            ///< List of all registered output listeners
    74103
    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
    78107
    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)
    82111    };
    83112}
Note: See TracChangeset for help on using the changeset viewer.