Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 4, 2013, 10:47:26 PM (12 years ago)
Author:
landauf
Message:

small refactoring: un-singletonized ConsoleWriter, LogWriter, and MemoryWriter - instead the instances are now kept by OutputManager

Location:
code/branches/testing/src/libraries/core/command
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/testing/src/libraries/core/command/IOConsolePOSIX.cc

    r8858 r9536  
    3838#include "util/Math.h"
    3939#include "util/output/ConsoleWriter.h"
     40#include "util/output/OutputManager.h"
    4041#include "core/Game.h"
    4142#include "core/input/InputBuffer.h"
     
    7576
    7677        // Disable standard std::cout logging
    77         ConsoleWriter::getInstance().disable();
     78        OutputManager::getInstance().getConsoleWriter().disable();
    7879        // Redirect std::cout to an ostringstream
    7980        // (Other part is in the initialiser list)
     
    103104        std::cout.rdbuf(this->cout_.rdbuf());
    104105        // Enable standard std::cout logging again
    105         ConsoleWriter::getInstance().enable();
     106        OutputManager::getInstance().getConsoleWriter().enable();
    106107    }
    107108
  • code/branches/testing/src/libraries/core/command/IOConsoleWindows.cc

    r8858 r9536  
    3535#include "util/Math.h"
    3636#include "util/output/ConsoleWriter.h"
     37#include "util/output/OutputManager.h"
    3738#include "core/Game.h"
    3839#include "core/input/InputBuffer.h"
     
    5354    {
    5455        // Disable standard this->cout_ logging
    55         ConsoleWriter::getInstance().disable();
     56        OutputManager::getInstance().getConsoleWriter().disable();
    5657        // Redirect std::cout to an ostringstream
    5758        // (Other part is in the initialiser list)
     
    109110        std::cout.rdbuf(this->cout_.rdbuf());
    110111        // Enable standard this->cout_ logging again
    111         ConsoleWriter::getInstance().enable();
     112        OutputManager::getInstance().getConsoleWriter().enable();
    112113
    113114        resetTerminalMode();
  • code/branches/testing/src/libraries/core/command/Shell.cc

    r9225 r9536  
    8888
    8989        // Get the previous output and add it to the Shell
    90         MemoryWriter::getInstance().resendOutput(this);
     90        OutputManager::getInstance().getMemoryWriter().resendOutput(this);
    9191    }
    9292
Note: See TracChangeset for help on using the changeset viewer.