Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 4, 2013, 11:23:57 PM (12 years ago)
Author:
landauf
Message:

ConsoleWriter now accepts and writes to any std::ostream, not just std::cout. Makes it easier to test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/testing/src/libraries/util/output/ConsoleWriter.cc

    r9536 r9537  
    3434#include "ConsoleWriter.h"
    3535
    36 #include <iostream>
    3736
    3837#include "OutputManager.h"
     
    4847        After creation, the instance is enabled.
    4948    */
    50     ConsoleWriter::ConsoleWriter() : BaseWriter("Console")
     49    ConsoleWriter::ConsoleWriter(std::ostream& outputStream) : BaseWriter("Console"), outputStream_(outputStream)
    5150    {
    5251#ifdef ORXONOX_RELEASE
     
    7069    void ConsoleWriter::printLine(const std::string& line, OutputLevel)
    7170    {
    72         std::cout << line << std::endl;
     71        this->outputStream_ << line << std::endl;
    7372    }
    7473
Note: See TracChangeset for help on using the changeset viewer.