Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 12, 2013, 11:13:03 PM (11 years ago)
Author:
landauf
Message:

merged testing branch back to trunk. unbelievable it took me 13 months to finish this chore…

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/util/output/ConsoleWriter.h

    r8858 r9550  
    3737
    3838#include "util/UtilPrereqs.h"
     39
     40#include <ostream>
     41
    3942#include "BaseWriter.h"
    4043
     
    4447        @brief ConsoleWriter inherits from BaseWriter and writes output to the console.
    4548
    46         This class can be seen as an equivalent to std::cout within the output
    47         system. It is implemented as a singleton for static acces.
     49        This class can be seen as an equivalent to std::cout within the output system.
    4850    */
    4951    class _UtilExport ConsoleWriter : public BaseWriter
    5052    {
    5153        public:
    52             static ConsoleWriter& getInstance();
     54            ConsoleWriter(std::ostream& outputStream);
     55            ConsoleWriter(const ConsoleWriter&);
     56            virtual ~ConsoleWriter();
    5357
    5458            void enable();
    5559            void disable();
     60
     61            inline const std::ostream& getOutputStream() const
     62                { return this->outputStream_; }
    5663
    5764        protected:
     
    5966
    6067        private:
    61             ConsoleWriter();
    62             ConsoleWriter(const ConsoleWriter&);
    63             virtual ~ConsoleWriter();
    64 
    65             bool bEnabled_; ///< If false, the instance will not write output to the console.
     68            std::ostream& outputStream_; ///< The ostream to which the console writer writes its output
     69            bool bEnabled_;              ///< If false, the instance will not write output to the console.
    6670    };
    6771}
Note: See TracChangeset for help on using the changeset viewer.