Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 20, 2011, 3:53:21 AM (13 years ago)
Author:
rgrieder
Message:

The output listener writing to the memory as buffer should record input of ALL levels, but instead be deactivated when not needed anymore.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/unity_build/src/libraries/util/OutputHandler.h

    r7401 r8515  
    103103                { return OutputHandler::getInstance().setOutputLevel(level); }
    104104
    105             typedef std::vector<std::pair<int, std::string> >::const_iterator OutputVectorIterator;
    106             //! Returns an iterator to the beginning of the all-output vector
    107             OutputVectorIterator getOutputVectorBegin() const;
    108             //! Returns an iterator to the end of the all-output vector
    109             OutputVectorIterator getOutputVectorEnd() const;
     105            typedef std::vector<std::pair<int, std::string> > OutputVector;
     106            //! Returns all output written so far (empty if disableMemoryLog() was called)
     107            const OutputVector& getOutput() const;
    110108
    111109            //! Writes to all output devices
     
    140138            //! Enables the std::cout stream for output (startup behaviour)
    141139            void enableCout();
     140            //! Stop writing to the memory buffer (call this as soon as possible to minimise memory usage)
     141            void disableMemoryLog();
    142142
    143143            //! Sets the level of the incoming output and returns the OutputHandler
     
    225225            LogFileWriter*             logFile_;          //!< Listener that writes to the log file
    226226            ConsoleWriter*             consoleWriter_;    //!< Listener for std::cout (just program beginning)
    227             MemoryLogWriter*           output_;           //!< Listener that Stores ALL output below the current soft debug level
     227            MemoryLogWriter*           memoryBuffer_;     //!< Writes to memory as a buffer (can/must be stopped at some time)
    228228            static int                 softDebugLevel_s;  //!< Maximum of all soft debug levels. @note This is only static for faster access
    229229    };
Note: See TracChangeset for help on using the changeset viewer.