Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 1, 2008, 3:54:20 PM (16 years ago)
Author:
rgrieder
Message:
  • @everyone: Do not create a branch until I've added the svn:eol-style property correctly. Otherwise this would cost me another 4 hours or so when we want to merge back.
  • merged network branch back to trunk
  • I had to omit the changes from last evening concerning the line endings
  • might not work yet because of the line endings
  • @beni: script branch is the only branch still open. you probably will have to apply a patch because of inconsistent new lines
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/core/OutputHandler.cc

    r1062 r1502  
    3535#include "CoreSettings.h"
    3636#include "ConsoleCommand.h"
     37#include "Shell.h"
    3738
    3839namespace orxonox
    3940{
    40     ConsoleCommandShortcutGeneric(log, createExecutor(createFunctor(&OutputHandler::log), "log", AccessLevel::None));
     41    SetConsoleCommandShortcutGeneric(log,     createConsoleCommand(createFunctor(&OutputHandler::log),     "log"    ));
     42    SetConsoleCommandShortcutGeneric(error,   createConsoleCommand(createFunctor(&OutputHandler::error),   "error"  ));
     43    SetConsoleCommandShortcutGeneric(warning, createConsoleCommand(createFunctor(&OutputHandler::warning), "warning"));
     44    SetConsoleCommandShortcutGeneric(info,    createConsoleCommand(createFunctor(&OutputHandler::info),    "info"   ));
     45    SetConsoleCommandShortcutGeneric(debug,   createConsoleCommand(createFunctor(&OutputHandler::debug),   "debug"  ));
    4146
    4247    /**
     
    8287
    8388    /**
     89        @brief Returns the Shell's OutputBuffer. This is mere placed here to avoid
     90               recompiling the entire project when Shell.h changes.
     91        @return The OutputBuffer of the Shell
     92    */
     93    OutputBuffer& OutputHandler::getShellOutputBuffer()
     94    {
     95        return Shell::getInstance().getOutputBuffer();
     96    }
     97
     98    /**
    8499        @brief Overloaded << operator, redirects the output to the console and the logfile.
    85100        @param sb The streambuffer that should be shown in the console
     
    96111            this->logfile_.flush();
    97112        }
     113
     114        if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Shell) >= this->outputLevel_)
     115            Shell::getInstance().getOutputBuffer() << sb;
    98116
    99117        return *this;
     
    116134        }
    117135
     136        if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Shell) >= this->outputLevel_)
     137            Shell::getInstance().getOutputBuffer() << manipulator;
     138
    118139        return *this;
    119140    }
     
    134155            this->logfile_.flush();
    135156        }
     157
     158        if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Shell) >= this->outputLevel_)
     159            Shell::getInstance().getOutputBuffer() << manipulator;
    136160
    137161        return *this;
     
    154178        }
    155179
     180        if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Shell) >= this->outputLevel_)
     181            Shell::getInstance().getOutputBuffer() << manipulator;
     182
    156183        return *this;
    157184    }
Note: See TracChangeset for help on using the changeset viewer.