Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8806


Ignore:
Timestamp:
Jul 31, 2011, 5:15:13 PM (13 years ago)
Author:
landauf
Message:

Replaced COUT with orxout in core. Tried to set levels and contexts in a more or less useful way, but not really optimized.

Location:
code/branches/output/src/libraries
Files:
52 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/core/BaseObject.cc

    r8706 r8806  
    109109    void BaseObject::registerEventListener(BaseObject* object)
    110110    {
    111         COUT(4) << "New EventListener: " << object->getIdentifier()->getName() << " &(" << object << ")." << std::endl;
     111        orxout(verbose, context::events) << "New EventListener: " << object->getIdentifier()->getName() << " &(" << object << ")." << endl;
    112112        this->eventListeners_.insert(object);
    113113    }
     
    186186            this->addTemplate(temp);
    187187        else
    188             COUT(1) << "Error: \"" << name << "\" is not a valid Template name (in class: " << this->getIdentifier()->getName() << ", name: " << this->getName() << ")." << std::endl;
     188            orxout(internal_error) << "\"" << name << "\" is not a valid Template name (in class: " << this->getIdentifier()->getName() << ", name: " << this->getName() << ")." << endl;
    189189    }
    190190
     
    312312        if (it != this->eventStates_.end())
    313313        {
    314             COUT(2) << "Warning: Overwriting EventState in class " << this->getIdentifier()->getName() << '.' << std::endl;
     314            orxout(internal_warning, context::events) << "Overwriting EventState in class " << this->getIdentifier()->getName() << '.' << endl;
    315315            delete (it->second);
    316316        }
     
    379379        this->registerEventStates();
    380380
    381         COUT(4) << this->getIdentifier()->getName() << " (&" << this << ") processing event. originator: " << event.originator_->getIdentifier()->getName() << " (&" << event.originator_ << "), activate: " << event.activate_ << ", name: " << event.name_ << ", statename: " << event.statename_ << "." << std::endl;
     381        orxout(verbose, context::events) << this->getIdentifier()->getName() << " (&" << this << ") processing event. originator: " << event.originator_->getIdentifier()->getName() << " (&" << event.originator_ << "), activate: " << event.activate_ << ", name: " << event.name_ << ", statename: " << event.statename_ << "." << endl;
    382382
    383383        std::map<std::string, EventState*>::const_iterator it = this->eventStates_.find(event.statename_);
     
    385385            it->second->process(event, this);
    386386        else if (!event.statename_.empty())
    387             COUT(2) << "Warning: \"" << event.statename_ << "\" is not a valid state in object \"" << this->getName() << "\" of class " << this->getIdentifier()->getName() << "." << std::endl;
    388         else
    389             COUT(2) << "Warning: Event with invalid source sent to object \"" << this->getName() << "\" of class " << this->getIdentifier()->getName() << "." << std::endl;
     387            orxout(internal_warning, context::events) << "\"" << event.statename_ << "\" is not a valid state in object \"" << this->getName() << "\" of class " << this->getIdentifier()->getName() << "." << endl;
     388        else
     389            orxout(internal_warning, context::events) << "Event with invalid source sent to object \"" << this->getName() << "\" of class " << this->getIdentifier()->getName() << "." << endl;
    390390    }
    391391
     
    412412        }
    413413        else
    414             COUT(2) << "Warning: No MainState defined in object \"" << this->getName() << "\" (" << this->getIdentifier()->getName() << ")" << std::endl;
     414            orxout(internal_warning, context::events) << "No MainState defined in object \"" << this->getName() << "\" (" << this->getIdentifier()->getName() << ")" << endl;
    415415    }
    416416
     
    432432                    this->mainStateFunctor_ = it->second->getFunctor();
    433433                else
    434                     COUT(2) << "Warning: Can't use \"" << this->mainStateName_ << "\" as MainState because it needs a second argument." << std::endl;
     434                    orxout(internal_warning, context::events) << "Can't use \"" << this->mainStateName_ << "\" as MainState because it needs a second argument." << endl;
    435435            }
    436436            else
    437                 COUT(2) << "Warning: \"" << this->mainStateName_ << "\" is not a valid MainState." << std::endl;
     437                orxout(internal_warning, context::events) << "\"" << this->mainStateName_ << "\" is not a valid MainState." << endl;
    438438        }
    439439    }
  • code/branches/output/src/libraries/core/ClassFactory.h

    r8788 r8806  
    7373            ClassFactory(const std::string& name, bool bLoadable = true)
    7474            {
    75                 COUT(4) << "*** ClassFactory: Create entry for " << name << " in Factory." << std::endl;
     75                orxout(verbose, context::identifier) << "Create entry for " << name << " in Factory." << endl;
    7676                ClassIdentifier<T>::getIdentifier(name)->addFactory(this);
    7777                ClassIdentifier<T>::getIdentifier()->setLoadable(bLoadable);
  • code/branches/output/src/libraries/core/CommandLineParser.cc

    r8788 r8806  
    229229        catch (const ArgumentException& ex)
    230230        {
    231             COUT(0) << "Could not parse command line: " << ex.what() << std::endl;
    232             COUT(0) << CommandLineParser::getUsageInformation() << std::endl;
     231            orxout(user_error) << "Could not parse command line: " << ex.what() << endl;
     232            orxout(user_error) << CommandLineParser::getUsageInformation() << endl;
    233233            throw GeneralException("");
    234234        }
     
    286286        }
    287287
    288         infoStr << std::endl;
    289         infoStr << "Usage: orxonox [options]" << std::endl;
    290         infoStr << "Available options:" << std::endl;
     288        infoStr << endl;
     289        infoStr << "Usage: orxonox [options]" << endl;
     290        infoStr << "Available options:" << endl;
    291291
    292292        for (std::map<std::string, CommandLineArgument*>::const_iterator it = inst.cmdLineArgs_.begin();
     
    305305            infoStr << std::string(maxNameSize - it->second->getName().size(), ' ');
    306306            infoStr << ": " << it->second->getInformation();
    307             infoStr << std::endl;
     307            infoStr << endl;
    308308        }
    309309        return infoStr.str();
  • code/branches/output/src/libraries/core/CommandLineParser.h

    r8729 r8806  
    218218            "Cannot add a command line argument with name '" + name + "' twice.");
    219219        OrxAssert(MultiType(defaultValue).getType() != MT_Type::Bool || MultiType(defaultValue).getBool() != true,
    220                "Boolean command line arguments with positive default values are not supported." << std::endl
     220               "Boolean command line arguments with positive default values are not supported." << endl
    221221            << "Please use SetCommandLineSwitch and adjust your argument: " << name);
    222222
  • code/branches/output/src/libraries/core/ConfigFileManager.cc

    r7401 r8806  
    274274                        {
    275275                            boost::filesystem::copy_file(defaultFilepath, filepath);
    276                             COUT(3) << "Copied " << this->filename_ << " from the default config folder." << std::endl;
     276                            orxout(internal_info, context::config) << "Copied " << this->filename_ << " from the default config folder." << endl;
    277277                        }
    278278                        catch (const boost::filesystem::filesystem_error& ex)
    279                         { COUT(1) << "Error in ConfigFile: " << ex.what() << std::endl; }
     279                        { orxout(user_error, context::config) << "Error in ConfigFile: " << ex.what() << endl; }
    280280                    }
    281281                }
     
    375375            file.close();
    376376
    377             COUT(3) << "Loaded config file \"" << this->filename_ << "\"." << std::endl;
     377            orxout(internal_info, context::config) << "Loaded config file \"" << this->filename_ << "\"." << endl;
    378378
    379379            // DO NOT save the file --> we can open supposedly read only config files
     
    404404        if (!file.is_open())
    405405        {
    406             COUT(1) << "Error: Couldn't open config-file \"" << filename << "\"." << std::endl;
     406            orxout(user_error, context::config) << "Couldn't open config-file \"" << filename << "\"." << endl;
    407407            return;
    408408        }
     
    410410        for (std::list<ConfigFileSection*>::const_iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
    411411        {
    412             file << (*it)->getFileEntry() << std::endl;
     412            file << (*it)->getFileEntry() << endl;
    413413
    414414            for (std::list<ConfigFileEntry*>::const_iterator it_entries = (*it)->getEntriesBegin(); it_entries != (*it)->getEntriesEnd(); ++it_entries)
    415                 file << (*it_entries)->getFileEntry() << std::endl;
    416 
    417             file << std::endl;
     415                file << (*it_entries)->getFileEntry() << endl;
     416
     417            file << endl;
    418418        }
    419419
    420420        file.close();
    421421
    422         COUT(4) << "Saved config file \"" << filename << "\"." << std::endl;
     422        orxout(verbose, context::config) << "Saved config file \"" << filename << "\"." << endl;
    423423    }
    424424
     
    669669    {
    670670        if (!this->configImpl(section, entry, value, &ConfigValueContainer::set))
    671             COUT(1) << "Error: Config value \"" << entry << "\" in section \"" << section << "\" doesn't exist." << std::endl;
     671            orxout(user_error, context::config) << "Config value \"" << entry << "\" in section \"" << section << "\" doesn't exist." << endl;
    672672    }
    673673
     
    682682    {
    683683        if (!this->configImpl(section, entry, value, &ConfigValueContainer::tset))
    684             COUT(1) << "Error: Config value \"" << entry << "\" in section \"" << section << "\" doesn't exist." << std::endl;
     684            orxout(user_error, context::config) << "Config value \"" << entry << "\" in section \"" << section << "\" doesn't exist." << endl;
    685685    }
    686686
  • code/branches/output/src/libraries/core/ConfigValueContainer.cc

    r8351 r8806  
    143143        else
    144144        {
    145             COUT(1) << "Error: Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is not a vector." << std::endl;
     145            orxout(user_error, context::config) << "Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is not a vector." << endl;
    146146        }
    147147        return false;
     
    182182            if (index > MAX_VECTOR_INDEX)
    183183            {
    184                 COUT(1) << "Error: Index " << index << " is too large." << std::endl;
     184                orxout(user_error, context::config) << "Index " << index << " is too large." << endl;
    185185                return false;
    186186            }
     
    203203        else
    204204        {
    205             COUT(1) << "Error: Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is not a vector." << std::endl;
     205            orxout(user_error, context::config) << "Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is not a vector." << endl;
    206206            return false;
    207207        }
     
    218218            return this->set(this->valueVector_.size(), input);
    219219
    220         COUT(1) << "Error: Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is not a vector." << std::endl;
     220        orxout(user_error, context::config) << "Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is not a vector." << endl;
    221221        return false;
    222222    }
     
    241241                return true;
    242242            }
    243             COUT(1) << "Error: Invalid vector-index." << std::endl;
    244         }
    245 
    246         COUT(1) << "Error: Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is not a vector." << std::endl;
     243            orxout(user_error, context::config) << "Invalid vector-index." << endl;
     244        }
     245
     246        orxout(user_error, context::config) << "Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is not a vector." << endl;
    247247        return false;
    248248    }
     
    312312            if (!success)
    313313            {
    314                 COUT(1) << "Error: Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is a vector." << std::endl;
     314                orxout(user_error, context::config) << "Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is a vector." << endl;
    315315            }
    316316            else
    317317            {
    318                 COUT(1) << "Error: Invalid vector-index." << std::endl;
     318                orxout(user_error, context::config) << "Invalid vector-index." << endl;
    319319            }
    320320            return false;
  • code/branches/output/src/libraries/core/ConfigValueIncludes.h

    r8729 r8806  
    8787    @code
    8888    MyObject orxonoxobject;
    89     std::cout << "Name:    " << orxonoxobject.getName() << std::endl;
    90     std::cout << "Version: " << orxonoxobject.getVersion() << std::endl;
     89    orxout() << "Name:    " << orxonoxobject.getName() << endl;
     90    orxout() << "Version: " << orxonoxobject.getVersion() << endl;
    9191    @endcode
    9292
     
    200200        else
    201201        {
    202             COUT(2) << "Warning: Couldn't reset config-value '" << entryName << "' in class '"
    203                     << ClassIdentifier<T>::getIdentifier()->getName() << "', corresponding container doesn't exist." << std::endl;
     202            orxout(user_warning, context::config) << "Couldn't reset config-value '" << entryName << "' in class '"
     203                                                  << ClassIdentifier<T>::getIdentifier()->getName() << "', corresponding container doesn't exist." << endl;
    204204        }
    205205    }
     
    238238    else \
    239239    { \
    240         COUT(2) << "Warning: Couln't modify config-value '" << entryName << "' in class '" \
    241                 << ClassByObjectType(object)->getName() << "', corresponding container doesn't exist." << std::endl; \
     240        orxout(user_warning, context::config) << "Couldn't modify config-value '" << entryName << "' in class '" \
     241                                              << ClassByObjectType(object)->getName() << "', corresponding container doesn't exist." << endl; \
    242242    }
    243243
  • code/branches/output/src/libraries/core/Core.cc

    r8799 r8806  
    128128            catch (...)
    129129            {
    130                 COUT(1) << "Couldn't load module \"" << *it << "\": " << Exception::handleMessage() << std::endl;
     130                orxout(user_error) << "Couldn't load module \"" << *it << "\": " << Exception::handleMessage() << endl;
    131131            }
    132132        }
     
    203203            }
    204204            else
    205                 COUT(0) << "Error: Could not open file for documentation writing" << endl;
     205                orxout(internal_error) << "Could not open file for documentation writing" << endl;
    206206        }
    207207    }
     
    321321        {
    322322            // Exit the application if the Ogre config dialog was canceled
    323             COUT(1) << Exception::handleMessage() << std::endl;
     323            orxout(user_error) << Exception::handleMessage() << endl;
    324324            exit(EXIT_FAILURE);
    325325        }
     
    332332            // and reloaded between throw and catch (access violation in MSVC).
    333333            // That's why we abort completely and only display the exception.
    334             COUT(1) << "An exception occurred during upgrade to graphics. "
    335                     << "That is unrecoverable. The message was:" << endl
    336                     << Exception::handleMessage() << endl;
     334            orxout(user_error) << "An exception occurred during upgrade to graphics. "
     335                               << "That is unrecoverable. The message was:" << endl
     336                               << Exception::handleMessage() << endl;
    337337            abort();
    338338        }
     
    368368        catch (...)
    369369        {
    370             COUT(0) << "An exception occurred during 'unloadGraphics':" << Exception::handleMessage() << std::endl
    371                     << "Another exception might be being handled which may lead to undefined behaviour!" << std::endl
    372                     << "Terminating the program." << std::endl;
     370            orxout(user_error) << "An exception occurred during 'unloadGraphics':" << Exception::handleMessage() << endl
     371                               << "Another exception might be being handled which may lead to undefined behaviour!" << endl
     372                               << "Terminating the program." << endl;
    373373            abort();
    374374        }
  • code/branches/output/src/libraries/core/DynLib.cc

    r8351 r8806  
    6868    {
    6969        // Log library load
    70         COUT(2) << "Loading module " << mName << std::endl;
     70        orxout(internal_info) << "Loading module " << mName << endl;
    7171
    7272        std::string name = mName;
     
    9999    {
    100100        // Log library unload
    101         COUT(4) << "Unloading module " << mName << std::endl;
     101        orxout(internal_info) << "Unloading module " << mName << endl;
    102102
    103103        if (DYNLIB_UNLOAD( m_hInst ))
  • code/branches/output/src/libraries/core/Event.cc

    r7401 r8806  
    4949        if (this->bProcessingEvent_)
    5050        {
    51             COUT(2) << "Warning: Detected Event loop in section \"" << event.statename_ << "\" of object \"" << object->getName() << "\" and fired by \"" << event.originator_->getName() << '"' << std::endl;
     51            orxout(internal_warning, context::events) << "Detected Event loop in section \"" << event.statename_ << "\" of object \"" << object->getName() << "\" and fired by \"" << event.originator_->getName() << '"' << endl;
    5252            return;
    5353        }
     
    5555        this->bProcessingEvent_ = true;
    5656
    57         COUT(4) << "Processing event (EventState) : originator: " << event.originator_->getIdentifier()->getName() << " (&" << event.originator_ << "), activate: " << event.activate_ << ", name: " << event.name_ << ", statename: " << event.statename_ << ", object: " << object->getIdentifier()->getName() << " (&" << object << ")" << "." << std::endl;
     57        orxout(verbose, context::events) << "Processing event (EventState) : originator: " << event.originator_->getIdentifier()->getName() << " (&" << event.originator_ << "), activate: " << event.activate_ << ", name: " << event.name_ << ", statename: " << event.statename_ << ", object: " << object->getIdentifier()->getName() << " (&" << object << ")" << "." << endl;
    5858
    5959        // check if the originator is an instance of the requested class
  • code/branches/output/src/libraries/core/GUIManager.cc

    r8805 r8806  
    261261        using namespace CEGUI;
    262262
    263         COUT(3) << "Initialising CEGUI." << std::endl;
     263        orxout(internal_info) << "Initialising CEGUI." << endl;
    264264
    265265        this->oldCEGUI_ = false;
     
    676676        {
    677677            // Display the error and proceed. See @remarks why this can be dangerous.
    678             COUT(1) << ex.getMessage() << std::endl;
     678            orxout(internal_error) << ex.getMessage() << endl;
    679679            return true;
    680680        }
  • code/branches/output/src/libraries/core/Game.cc

    r8788 r8806  
    6060    SetConsoleCommand("exit", &stop_game);
    6161    static void printFPS()
    62         { COUT(0) << Game::getInstance().getAvgFPS() << std::endl; }
     62        { orxout(message) << Game::getInstance().getAvgFPS() << endl; }
    6363    SetConsoleCommand("Stats", "printFPS", &printFPS);
    6464    static void printTickTime()
    65         { COUT(0) << Game::getInstance().getAvgTickTime() << std::endl; }
     65        { orxout(message) << Game::getInstance().getAvgTickTime() << endl; }
    6666    SetConsoleCommand("Stats", "printTickTime", &printTickTime);
    6767
     
    163163    {
    164164        if (this->requestedStateNodes_.empty())
    165             COUT(0) << "Warning: Starting game without requesting GameState. This automatically terminates the program." << std::endl;
     165            orxout(user_error) << "Starting game without requesting GameState. This automatically terminates the program." << endl;
    166166
    167167        // START GAME
     
    189189            catch (...)
    190190            {
    191                 COUT(0) << "An exception occurred in the Core preUpdate: " << Exception::handleMessage() << std::endl;
    192                 COUT(0) << "This should really never happen! Closing the program." << std::endl;
     191                orxout(user_error) << "An exception occurred in the Core preUpdate: " << Exception::handleMessage() << endl;
     192                orxout(user_error) << "This should really never happen! Closing the program." << endl;
    193193                this->stop();
    194194                break;
     
    203203            catch (...)
    204204            {
    205                 COUT(0) << "An exception occurred in the Core postUpdate: " << Exception::handleMessage() << std::endl;
    206                 COUT(0) << "This should really never happen! Closing the program." << std::endl;
     205                orxout(user_error) << "An exception occurred in the Core postUpdate: " << Exception::handleMessage() << endl;
     206                orxout(user_error) << "This should really never happen! Closing the program." << endl;
    207207                this->stop();
    208208                break;
     
    241241                catch (...)
    242242                {
    243                     COUT(1) << "Error: Loading GameState '" << requestedStateNode->name_ << "' failed: " << Exception::handleMessage() << std::endl;
     243                    orxout(user_error) << "Loading GameState '" << requestedStateNode->name_ << "' failed: " << Exception::handleMessage() << endl;
    244244                    // All scheduled operations have now been rendered inert --> flush them and issue a warning
    245245                    if (this->requestedStateNodes_.size() > 1)
    246                         COUT(4) << "All " << this->requestedStateNodes_.size() - 1 << " scheduled transitions have been ignored." << std::endl;
     246                        orxout(internal_info) << "All " << this->requestedStateNodes_.size() - 1 << " scheduled transitions have been ignored." << endl;
    247247                    this->requestedStateNodes_.clear();
    248248                    break;
     
    272272            catch (...)
    273273            {
    274                 COUT(1) << "An exception occurred while updating '" << (*it)->getName() << "': " << Exception::handleMessage() << std::endl;
    275                 COUT(1) << "This should really never happen!" << std::endl;
    276                 COUT(1) << "Unloading all GameStates depending on the one that crashed." << std::endl;
     274                orxout(user_error) << "An exception occurred while updating '" << (*it)->getName() << "': " << Exception::handleMessage() << endl;
     275                orxout(user_error) << "This should really never happen!" << endl;
     276                orxout(user_error) << "Unloading all GameStates depending on the one that crashed." << endl;
    277277                shared_ptr<GameStateTreeNode> current = this->loadedTopStateNode_;
    278278                while (current->name_ != (*it)->getName() && current)
     
    355355        if (!this->checkState(name))
    356356        {
    357             COUT(2) << "Warning: GameState named '" << name << "' doesn't exist!" << std::endl;
     357            orxout(user_warning) << "GameState named '" << name << "' doesn't exist!" << endl;
    358358            return;
    359359        }
     
    361361        if (this->bChangingState_)
    362362        {
    363             COUT(2) << "Warning: Requesting GameStates while loading/unloading a GameState is illegal! Ignoring." << std::endl;
     363            orxout(user_warning) << "Requesting GameStates while loading/unloading a GameState is illegal! Ignoring." << endl;
    364364            return;
    365365        }
     
    372372        if (name == lastRequestedNode->name_)
    373373        {
    374             COUT(2) << "Warning: Requesting the currently active state! Ignoring." << std::endl;
     374            orxout(user_warning) << "Requesting the currently active state! Ignoring." << endl;
    375375            return;
    376376        }
     
    403403
    404404        if (requestedNodes.empty())
    405             COUT(1) << "Error: Requested GameState transition is not allowed. Ignoring." << std::endl;
     405            orxout(user_error) << "Requested GameState transition is not allowed. Ignoring." << endl;
    406406        else
    407407            this->requestedStateNodes_.insert(requestedStateNodes_.end(), requestedNodes.begin(), requestedNodes.end());
     
    425425            this->requestState(lastRequestedNode->parent_.lock()->name_);
    426426        else
    427             COUT(2) << "Warning: Can't pop the internal dummy root GameState" << std::endl;
     427            orxout(internal_warning) << "Can't pop the internal dummy root GameState" << endl;
    428428    }
    429429
     
    437437            std::map<std::string, GameStateInfo>::const_iterator it = gameStateDeclarations_s.find(name);
    438438            if (it != gameStateDeclarations_s.end())
    439                 COUT(1) << "Error: GameState '" << name << "' has not yet been loaded." << std::endl;
     439                orxout(internal_error) << "GameState '" << name << "' has not yet been loaded." << endl;
    440440            else
    441                 COUT(1) << "Error: Could not find GameState '" << name << "'." << std::endl;
     441                orxout(internal_error) << "Could not find GameState '" << name << "'." << endl;
    442442            return shared_ptr<GameState>();
    443443        }
     
    589589        catch (...)
    590590        {
    591             COUT(2) << "Warning: Unloading GameState '" << name << "' threw an exception: " << Exception::handleMessage() << std::endl;
    592             COUT(2) << "         There might be potential resource leaks involved! To avoid this, improve exception-safety." << std::endl;
     591            orxout(internal_warning) << "Unloading GameState '" << name << "' threw an exception: " << Exception::handleMessage() << endl;
     592            orxout(internal_warning) << "There might be potential resource leaks involved! To avoid this, improve exception-safety." << endl;
    593593        }
    594594        // Check if graphics is still required
  • code/branches/output/src/libraries/core/Game.h

    r8788 r8806  
    215215        else
    216216        {
    217             COUT(0) << "Error: Cannot declare two GameStates with the same name." << std::endl;
    218             COUT(0) << "       Ignoring second one ('" << stateName << "')." << std::endl;
     217            orxout(internal_warning) << "Cannot declare two GameStates with the same name." << endl;
     218            orxout(internal_warning) << "Ignoring second one ('" << stateName << "')." << endl;
    219219        }
    220220
  • code/branches/output/src/libraries/core/GraphicsManager.cc

    r8805 r8806  
    191191    void GraphicsManager::loadOgreRoot()
    192192    {
    193         COUT(3) << "Setting up Ogre..." << std::endl;
     193        orxout(internal_info) << "Setting up Ogre..." << endl;
    194194
    195195        if (ogreConfigFile_.empty())
    196196        {
    197             COUT(2) << "Warning: Ogre config file set to \"\". Defaulting to config.cfg" << std::endl;
     197            orxout(internal_warning) << "Ogre config file set to \"\". Defaulting to config.cfg" << endl;
    198198            ModifyConfigValue(ogreConfigFile_, tset, "config.cfg");
    199199        }
    200200        if (ogreLogFile_.empty())
    201201        {
    202             COUT(2) << "Warning: Ogre log file set to \"\". Defaulting to ogre.log" << std::endl;
     202            orxout(internal_warning) << "Ogre log file set to \"\". Defaulting to ogre.log" << endl;
    203203            ModifyConfigValue(ogreLogFile_, tset, "ogre.log");
    204204        }
     
    210210        // Ogre::Root will detect that we've already created a Log
    211211        ogreLogger_ = new Ogre::LogManager();
    212         COUT(4) << "Ogre LogManager created" << std::endl;
     212        orxout(internal_info) << "Ogre LogManager created" << endl;
    213213
    214214        // create our own log that we can listen to
    215215        Ogre::Log *myLog;
    216216        myLog = ogreLogger_->createLog(ogreLogFilepath.string(), true, false, false);
    217         COUT(4) << "Ogre Log created" << std::endl;
     217        orxout(internal_info) << "Ogre Log created" << endl;
    218218
    219219        myLog->setLogDetail(Ogre::LL_BOREME);
    220220        myLog->addListener(this);
    221221
    222         COUT(4) << "Creating Ogre Root..." << std::endl;
     222        orxout(internal_info) << "Creating Ogre Root..." << endl;
    223223
    224224        // check for config file existence because Ogre displays (caught) exceptions if not
     
    234234        ogreRoot_ = new Ogre::Root("", ogreConfigFilepath.string(), ogreLogFilepath.string());
    235235
    236         COUT(3) << "Ogre set up done." << std::endl;
     236        orxout(internal_info) << "Ogre set up done." << endl;
    237237    }
    238238
     
    271271    void GraphicsManager::loadRenderer()
    272272    {
    273         CCOUT(4) << "Configuring Renderer" << std::endl;
     273        orxout(internal_info) << "GraphicsManager: Configuring Renderer" << endl;
    274274
    275275        bool updatedConfig = Core::getInstance().getOgreConfigTimestamp() > Core::getInstance().getLastLevelTimestamp();
    276276        if (updatedConfig)
    277             COUT(2) << "Ogre config file has changed, but no level was started since then. Displaying config dialogue again to verify the changes." << std::endl;
     277            orxout(user_info)<< "Ogre config file has changed, but no level was started since then. Displaying config dialogue again to verify the changes." << endl;
    278278
    279279        if (!ogreRoot_->restoreConfig() || updatedConfig)
     
    285285        }
    286286
    287         CCOUT(4) << "Creating render window" << std::endl;
     287        orxout(internal_info) << "Creating render window" << endl;
    288288
    289289        this->renderWindow_ = ogreRoot_->initialise(true, "Orxonox");
     
    311311    {
    312312        // Load debug overlay to show info about fps and tick time
    313         COUT(4) << "Loading Debug Overlay..." << std::endl;
     313        orxout(internal_info) << "Loading Debug Overlay..." << endl;
    314314        debugOverlay_.reset(new XMLFile("debug.oxo"));
    315315        Loader::open(debugOverlay_.get());
  • code/branches/output/src/libraries/core/Identifier.cc

    r8267 r8806  
    130130        {
    131131            // If no: We have to store the information and initialize the Identifier
    132             COUT(4) << "*** ClassIdentifier: Register Class in " << this->getName() << "-Singleton -> Initialize Singleton." << std::endl;
     132            orxout(verbose, context::identifier) << "Register Class in ClassIdentifier<" << this->getName() << ">-Singleton -> Initialize Singleton." << endl;
    133133            if (bRootClass)
    134134                this->initialize(0); // If a class is derived from two interfaces, the second interface might think it's derived from the first because of the order of constructor-calls. Thats why we set parents to zero in that case.
     
    144144    void Identifier::initialize(std::set<const Identifier*>* parents)
    145145    {
    146         COUT(4) << "*** Identifier: Initialize " << this->name_ << "-Singleton." << std::endl;
     146        orxout(verbose, context::identifier) << "Initialize ClassIdentifier<" << this->name_ << ">-Singleton." << endl;
    147147        this->bCreatedOneObject_ = true;
    148148
     
    191191    void Identifier::createClassHierarchy()
    192192    {
    193         COUT(3) << "*** Identifier: Create class-hierarchy" << std::endl;
     193        orxout(internal_status) << "Create class-hierarchy" << endl;
    194194        Identifier::startCreatingHierarchy();
    195195        for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getStringIdentifierMap().begin(); it != Identifier::getStringIdentifierMap().end(); ++it)
     
    203203        }
    204204        Identifier::stopCreatingHierarchy();
    205         COUT(3) << "*** Identifier: Finished class-hierarchy creation" << std::endl;
     205        orxout(internal_status) << "Finished class-hierarchy creation" << endl;
    206206    }
    207207
     
    242242        else
    243243        {
    244             COUT(1) << "An error occurred in Identifier.cc:" << std::endl;
    245             COUT(1) << "Error: Cannot fabricate an object of type '" << this->name_ << "'. Class has no factory." << std::endl;
    246             COUT(1) << "Aborting..." << std::endl;
     244            orxout(user_error) << "An error occurred in Identifier.cc:" << endl;
     245            orxout(user_error) << "Cannot fabricate an object of type '" << this->name_ << "'. Class has no factory." << endl;
     246            orxout(user_error) << "Aborting..." << endl;
    247247            abort();
    248248            return 0;
     
    404404        if (it != this->configValues_.end())
    405405        {
    406             COUT(2) << "Warning: Overwriting config-value with name " << varname << " in class " << this->getName() << '.' << std::endl;
     406            orxout(internal_warning) << "Overwriting config-value with name " << varname << " in class " << this->getName() << '.' << endl;
    407407            delete (it->second);
    408408        }
     
    450450        if (it != this->xmlportParamContainers_.end())
    451451        {
    452             COUT(2) << "Warning: Overwriting XMLPortParamContainer in class " << this->getName() << '.' << std::endl;
     452            orxout(internal_warning) << "Overwriting XMLPortParamContainer in class " << this->getName() << '.' << endl;
    453453            delete (it->second);
    454454        }
     
    481481        if (it != this->xmlportObjectContainers_.end())
    482482        {
    483             COUT(2) << "Warning: Overwriting XMLPortObjectContainer in class " << this->getName() << '.' << std::endl;
     483            orxout(internal_warning) << "Overwriting XMLPortObjectContainer in class " << this->getName() << '.' << endl;
    484484            delete (it->second);
    485485        }
  • code/branches/output/src/libraries/core/Identifier.h

    r8788 r8806  
    6464    for (Iterator<BaseObject> it = objects.begin(); it != objects.end(); ++it)  // iterate through the objects
    6565        ++count;
    66     COUT(0) << count << std::endl;                                              // prints "2" because we created 2 instances of MyClass so far
     66    orxout() << count << endl;                                                  // prints "2" because we created 2 instances of MyClass so far
    6767
    6868
     
    405405        if (ClassIdentifier<T>::classIdentifier_s == proposal)
    406406        {
    407             COUT(4) << "*** Identifier: Requested Identifier for " << name << " was not yet existing and got created." << std::endl;
     407            orxout(verbose, context::identifier) << "Requested Identifier for " << name << " was not yet existing and got created." << endl;
    408408        }
    409409        else
    410410        {
    411             COUT(4) << "*** Identifier: Requested Identifier for " << name << " was already existing and got assigned." << std::endl;
     411            orxout(verbose, context::identifier) << "Requested Identifier for " << name << " was already existing and got assigned." << endl;
    412412        }
    413413    }
     
    423423    {
    424424        if (bRootClass)
    425             COUT(5) << "*** Register Root-Object: " << className << std::endl;
     425            orxout(verbose, context::object_list) << "Register Root-Object: " << className << endl;
    426426        else
    427             COUT(5) << "*** Register Object: " << className << std::endl;
     427            orxout(verbose, context::object_list) << "Register Object: " << className << endl;
    428428
    429429        object->identifier_ = this;
     
    444444        else
    445445        {
    446             COUT(5) << "*** ClassIdentifier: Added object to " << this->getName() << "-list." << std::endl;
     446            orxout(verbose, context::object_list) << "Added object to " << this->getName() << "-list." << endl;
    447447            object->metaList_->add(this->objects_, this->objects_->add(new ObjectListElement<T>(object)));
    448448
  • code/branches/output/src/libraries/core/Language.cc

    r8788 r8806  
    131131        }
    132132
    133         COUT(2) << "Warning: Language entry " << label << " is duplicate in " << getFilename(this->defaultLanguage_) << '!' << std::endl;
     133        orxout(internal_warning, context::language) << "Language entry " << label << " is duplicate in " << getFilename(this->defaultLanguage_) << '!' << endl;
    134134        return it->second;
    135135    }
     
    142142    void Language::addEntry(const LanguageEntryLabel& label, const std::string& entry)
    143143    {
    144         COUT(5) << "Language: Called addEntry with\n  label: " << label << "\n  entry: " <<  entry << std::endl;
     144        orxout(verbose, context::language) << "Called addEntry with" << '\n' << "label: " << label << '\n' << "entry: " <<  entry << endl;
    145145        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(label);
    146146        if (it == this->languageEntries_.end())
     
    179179        {
    180180            // Uh, oh, an undefined entry was requested: return the default string
    181             COUT(2) << "Warning: Language entry \"" << label << "\" not found!" << std::endl;
     181            orxout(internal_warning, context::language) << "Language entry \"" << label << "\" not found!" << endl;
    182182            return this->defaultLocalisation_;
    183183        }
     
    201201    void Language::readDefaultLanguageFile()
    202202    {
    203         COUT(4) << "Read default language file." << std::endl;
     203        orxout(internal_status, context::language) << "Read default language file." << endl;
    204204
    205205        const std::string& filepath = PathConfig::getConfigPathString() + getFilename(this->defaultLanguage_);
     
    216216        if (!file.is_open())
    217217        {
    218             COUT(1) << "An error occurred in Language.cc:" << std::endl;
    219             COUT(1) << "Error: Couldn't open file " << getFilename(this->defaultLanguage_) << " to read the default language entries!" << std::endl;
     218            orxout(internal_error, context::language) << "An error occurred in Language.cc:" << endl;
     219            orxout(internal_error, context::language) << "Couldn't open file " << getFilename(this->defaultLanguage_) << " to read the default language entries!" << endl;
    220220            return;
    221221        }
     
    237237                else
    238238                {
    239                     COUT(2) << "Warning: Invalid language entry \"" << lineString << "\" in " << getFilename(this->defaultLanguage_) << std::endl;
     239                    orxout(internal_warning, context::language) << "Invalid language entry \"" << lineString << "\" in " << getFilename(this->defaultLanguage_) << endl;
    240240                }
    241241            }
     
    250250    void Language::readTranslatedLanguageFile()
    251251    {
    252         COUT(4) << "Read translated language file (" << Core::getInstance().getLanguage() << ")." << std::endl;
     252        orxout(internal_status, context::language) << "Read translated language file (" << Core::getInstance().getLanguage() << ")." << endl;
    253253
    254254        const std::string& filepath = PathConfig::getConfigPathString() + getFilename(Core::getInstance().getLanguage());
     
    260260        if (!file.is_open())
    261261        {
    262             COUT(1) << "An error occurred in Language.cc:" << std::endl;
    263             COUT(1) << "Error: Couldn't open file " << getFilename(Core::getInstance().getLanguage()) << " to read the translated language entries!" << std::endl;
     262            orxout(internal_error, context::language) << "An error occurred in Language.cc:" << endl;
     263            orxout(internal_error, context::language) << "Couldn't open file " << getFilename(Core::getInstance().getLanguage()) << " to read the translated language entries!" << endl;
    264264            Core::getInstance().resetLanguage();
    265             COUT(3) << "Info: Reset language to " << this->defaultLanguage_ << '.' << std::endl;
     265            orxout(internal_status, context::language) << "Reset language to " << this->defaultLanguage_ << '.' << endl;
    266266            return;
    267267        }
     
    291291                else
    292292                {
    293                     COUT(2) << "Warning: Invalid language entry \"" << lineString << "\" in " << getFilename(Core::getInstance().getLanguage()) << std::endl;
     293                    orxout(internal_warning, context::language) << "Invalid language entry \"" << lineString << "\" in " << getFilename(Core::getInstance().getLanguage()) << endl;
    294294                }
    295295            }
     
    304304    void Language::writeDefaultLanguageFile() const
    305305    {
    306         COUT(4) << "Language: Write default language file." << std::endl;
     306        orxout(internal_status, context::language) << "Write default language file." << endl;
    307307
    308308        const std::string& filepath = PathConfig::getConfigPathString() + getFilename(this->defaultLanguage_);
     
    314314        if (!file.is_open())
    315315        {
    316             COUT(1) << "An error occurred in Language.cc:" << std::endl;
    317             COUT(1) << "Error: Couldn't open file " << getFilename(this->defaultLanguage_) << " to write the default language entries!" << std::endl;
     316            orxout(internal_error, context::language) << "An error occurred in Language.cc:" << endl;
     317            orxout(internal_error, context::language) << "Couldn't open file " << getFilename(this->defaultLanguage_) << " to write the default language entries!" << endl;
    318318            return;
    319319        }
     
    322322        for (std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.begin(); it != this->languageEntries_.end(); ++it)
    323323        {
    324             file << it->second->getLabel() << '=' << it->second->getDefault() << std::endl;
     324            file << it->second->getLabel() << '=' << it->second->getDefault() << endl;
    325325        }
    326326
  • code/branches/output/src/libraries/core/Language.h

    r7401 r8806  
    5151     - Get the localisation of the entry in the configured language:
    5252       @code
    53        std::cout << Language::getInstance()->getLocalisation("name of the entry") << std::endl;
     53       orxout() << Language::getInstance()->getLocalisation("name of the entry") << endl;
    5454       @endcode
    5555
     
    5858    int age = 20;
    5959    AddLanguageEntry("user_age", "Age");
    60     std::cout << GetLocalisation("user_age") << ": " << age << std::endl;
     60    orxout() << GetLocalisation("user_age") << ": " << age << endl;
    6161    @endcode
    6262
  • code/branches/output/src/libraries/core/Loader.cc

    r8788 r8806  
    170170            if (info == NULL)
    171171            {
    172                 COUT(1) << "Error: Could not find XML file '" << file->getFilename() << "'." << std::endl;
     172                orxout(user_error, context::loader) << "Could not find XML file '" << file->getFilename() << "'." << endl;
    173173                return false;
    174174            }
     
    189189            if(verbose)
    190190            {
    191                 COUT(0) << "Start loading " << file->getFilename() << "..." << std::endl;
    192                 COUT(3) << "Mask: " << Loader::currentMask_s << std::endl;
    193             }
    194             else
    195             {
    196                 COUT(4) << "Start loading " << file->getFilename() << "..." << std::endl;
    197                 COUT(4) << "Mask: " << Loader::currentMask_s << std::endl;
     191                orxout(user_status, context::loader) << "Start loading " << file->getFilename() << "..." << endl;
     192                orxout(internal_info, context::loader) << "Mask: " << Loader::currentMask_s << endl;
     193            }
     194            else
     195            {
     196                orxout(verbose, context::loader) << "Start loading " << file->getFilename() << "..." << endl;
     197                orxout(verbose_more, context::loader) << "Mask: " << Loader::currentMask_s << endl;
    198198            }
    199199
     
    208208                rootElement.InsertEndChild(*child);
    209209
    210             COUT(4) << "  creating root-namespace..." << std::endl;
     210            orxout(verbose, context::loader) << "  creating root-namespace..." << endl;
    211211            Namespace* rootNamespace = new Namespace(0);
    212212            rootNamespace->setLoaderIndentation("    ");
     
    217217
    218218            if(verbose)
    219                 COUT(0) << "Finished loading " << file->getFilename() << '.' << std::endl;
    220             else
    221                 COUT(4) << "Finished loading " << file->getFilename() << '.' << std::endl;
    222 
    223             COUT(4) << "Namespace-tree:" << std::endl << rootNamespace->toString("  ") << std::endl;
     219                orxout(user_status, context::loader) << "Finished loading " << file->getFilename() << '.' << endl;
     220            else
     221                orxout(verbose, context::loader) << "Finished loading " << file->getFilename() << '.' << endl;
     222
     223            orxout(verbose, context::loader) << "Namespace-tree:" << '\n' << rootNamespace->toString("  ") << endl;
    224224
    225225            return true;
     
    227227        catch (ticpp::Exception& ex)
    228228        {
    229             COUT(1) << std::endl;
    230             COUT(1) << "An XML-error occurred in Loader.cc while loading " << file->getFilename() << ':' << std::endl;
    231             COUT(1) << ex.what() << std::endl;
    232             COUT(1) << "Loading aborted." << std::endl;
     229            orxout(user_error, context::loader) << endl;
     230            orxout(user_error, context::loader) << "An XML-error occurred in Loader.cc while loading " << file->getFilename() << ':' << endl;
     231            orxout(user_error, context::loader) << ex.what() << endl;
     232            orxout(user_error, context::loader) << "Loading aborted." << endl;
    233233            return false;
    234234        }
    235235        catch (Exception& ex)
    236236        {
    237             COUT(1) << std::endl;
    238             COUT(1) << "A loading-error occurred in Loader.cc while loading " << file->getFilename() << ':' << std::endl;
    239             COUT(1) << ex.what() << std::endl;
    240             COUT(1) << "Loading aborted." << std::endl;
     237            orxout(user_error, context::loader) << endl;
     238            orxout(user_error, context::loader) << "A loading-error occurred in Loader.cc while loading " << file->getFilename() << ':' << endl;
     239            orxout(user_error, context::loader) << ex.what() << endl;
     240            orxout(user_error, context::loader) << "Loading aborted." << endl;
    241241            return false;
    242242        }
    243243        catch (...)
    244244        {
    245             COUT(1) << std::endl;
    246             COUT(1) << "An error occurred in Loader.cc while loading " << file->getFilename() << ':' << std::endl;
    247             COUT(1) << Exception::handleMessage() << std::endl;
    248             COUT(1) << "Loading aborted." << std::endl;
     245            orxout(user_error, context::loader) << endl;
     246            orxout(user_error, context::loader) << "An error occurred in Loader.cc while loading " << file->getFilename() << ':' << endl;
     247            orxout(user_error, context::loader) << Exception::handleMessage() << endl;
     248            orxout(user_error, context::loader) << "Loading aborted." << endl;
    249249            return false;
    250250        }
     
    337337            if (!expectedValue)
    338338            {
    339                 COUT(2) << "Warning: Error in level file" << std::endl;
     339                orxout(internal_error, context::loader) << "Error in level file" << endl;
    340340                // TODO: error handling
    341341                return false;
  • code/branches/output/src/libraries/core/LuaState.cc

    r8801 r8806  
    9797        else
    9898        {
    99             COUT(2) << "LuaState: Cannot include file '" << filename << "' (not found)." << std::endl;
     99            orxout(internal_warning, context::lua) << "LuaState: Cannot include file '" << filename << "' (not found)." << endl;
    100100            return false;
    101101        }
     
    137137        else
    138138        {
    139             COUT(2) << "LuaState: Cannot do file '" << filename << "' (not found)." << std::endl;
     139            orxout(internal_warning, context::lua) << "LuaState: Cannot do file '" << filename << "' (not found)." << endl;
    140140            return false;
    141141        }
     
    177177        {
    178178        case LUA_ERRSYNTAX: // Syntax error
    179             COUT(1) << "Lua syntax error: " << lua_tostring(luaState_, -1) << std::endl;
     179            orxout(internal_error, context::lua) << "Lua syntax error: " << lua_tostring(luaState_, -1) << endl;
    180180            break;
    181181        case LUA_ERRMEM:    // Memory allocation error
    182             COUT(1) << "Lua memory allocation error: Consult your dentist immediately!" << std::endl;
     182            orxout(internal_error, context::lua) << "Lua memory allocation error: Consult your dentist immediately!" << endl;
    183183            break;
    184184        }
     
    201201                    std::string errorString = lua_tostring(this->luaState_, -1);
    202202                    if (errorString.find("Error propagation") == std::string::npos)
    203                         COUT(1) << "Lua runtime error: " << errorString << std::endl;
     203                        orxout(internal_error, context::lua) << "Lua runtime error: " << errorString << endl;
    204204                }
    205205                break;
    206206            case LUA_ERRERR: // Error in the error handler
    207                 COUT(1) << "Lua error in error handler. No message available." << std::endl;
     207                orxout(internal_error, context::lua) << "Lua error in error handler. No message available." << endl;
    208208                break;
    209209            case LUA_ERRMEM: // Memory allocation error
    210                 COUT(1) << "Lua memory allocation error: Consult your dentist immediately!" << std::endl;
     210                orxout(internal_error, context::lua) << "Lua memory allocation error: Consult your dentist immediately!" << endl;
    211211                break;
    212212            }
     
    290290            if (it->first == name || it->second == function)
    291291            {
    292                 COUT(2) << "Warning: Trying to add a Tolua interface with the same name or function." << std::endl;
     292                orxout(internal_warning, context::lua) << "Trying to add a Tolua interface with the same name or function." << endl;
    293293                return true;
    294294            }
     
    309309        if (it == getToluaInterfaces().end())
    310310        {
    311             COUT(2) << "Warning: Cannot remove Tolua interface '" << name << "': Not found" << std::endl;
     311            orxout(internal_warning, context::lua) << "Cannot remove Tolua interface '" << name << "': Not found" << endl;
    312312            return true;
    313313        }
  • code/branches/output/src/libraries/core/MetaObjectList.cc

    r8788 r8806  
    4848    MetaObjectListElement::~MetaObjectListElement()
    4949    {
    50         COUT(5) << "*** MetaObjectList: Removing Object from " << this->list_->getIdentifier()->getName() << "-list." << std::endl;
     50        orxout(verbose, context::object_list) << "Removing Object from " << this->list_->getIdentifier()->getName() << "-list." << endl;
    5151        this->list_->notifyIterators(this->element_->objectBase_);
    5252
  • code/branches/output/src/libraries/core/NamespaceNode.cc

    r8788 r8806  
    7070                if (this->bRoot_)
    7171                {
    72                     COUT(2) << "Warning: Can't go to enclosing namespace with '..' operator in namespace " << this->name_ << ", namespace is root." << std::endl;
     72                    orxout(internal_warning) << "Can't go to enclosing namespace with '..' operator in namespace " << this->name_ << ", namespace is root." << endl;
    7373                    nodes = this->getNodeRelative(secondPart);
    7474                }
    7575                else if (!this->parent_)
    7676                {
    77                     COUT(2) << "Warning: Can't go to enclosing namespace with '..' operator in namespace " << this->name_ << ", no parent namespace set." << std::endl;
     77                    orxout(internal_warning) << "Can't go to enclosing namespace with '..' operator in namespace " << this->name_ << ", no parent namespace set." << endl;
    7878                    nodes = this->getNodeRelative(secondPart);
    7979                }
     
    9191                if (it->second->isHidden())
    9292                {
    93                     COUT(2) << "Warning: Subnamespace '" << firstPart << "' in namespace '" << this->name_ << "' is hidden and can't be accessed." << std::endl;
     93                    orxout(internal_warning) << "Subnamespace '" << firstPart << "' in namespace '" << this->name_ << "' is hidden and can't be accessed." << endl;
    9494                    nodes.insert(this);
    9595                }
     
    115115                if (!bFoundMatchingNamespace)
    116116                {
    117                     COUT(2) << "Warning: No file included with name '" << firstPart.substr(1, std::string::npos) << "' at this part of the level file, using parent namespace instead." << std::endl;
     117                    orxout(internal_warning) << "No file included with name '" << firstPart.substr(1, std::string::npos) << "' at this part of the level file, using parent namespace instead." << endl;
    118118                    nodes = this->getNodeRelative(secondPart);
    119119                }
  • code/branches/output/src/libraries/core/OrxonoxClass.cc

    r7849 r8806  
    6060    {
    6161//        if (!this->requestedDestruction_)
    62 //            COUT(2) << "Warning: Destroyed object without destroy() (" << this->getIdentifier()->getName() << ')' << std::endl;
     62//            orxout(internal_warning) << "Destroyed object without destroy() (" << this->getIdentifier()->getName() << ')' << endl;
    6363
    6464        assert(this->referenceCount_ <= 0);
  • code/branches/output/src/libraries/core/PathConfig.cc

    r8788 r8806  
    137137        if (bf::exists(executablePath_ / "orxonox_dev_build.keep_me"))
    138138        {
    139             COUT(1) << "Running from the build tree." << std::endl;
     139            orxout(internal_info) << "Running from the build tree." << endl;
    140140            PathConfig::bBuildDirectoryRun_ = true;
    141141            modulePath_ = specialConfig::moduleDevDirectory;
     
    247247            if (bf::create_directories(it->first)) // function may not return true at all (bug?)
    248248            {
    249                 COUT(4) << "Created " << it->second << " directory" << std::endl;
     249                orxout(internal_info) << "Created " << it->second << " directory" << endl;
    250250            }
    251251        }
  • code/branches/output/src/libraries/core/SubclassIdentifier.h

    r8788 r8806  
    119119                if (!identifier || !identifier->isA(ClassIdentifier<T>::getIdentifier()))
    120120                {
    121                     COUT(1) << "An error occurred in SubclassIdentifier (Identifier.h):" << std::endl;
     121                    orxout(internal_error) << "An error occurred in SubclassIdentifier (Identifier.h):" << endl;
    122122                    if (identifier)
    123123                    {
    124                         COUT(1) << "Error: Class " << identifier->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << '!' << std::endl;
    125                         COUT(1) << "Error: SubclassIdentifier<" << ClassIdentifier<T>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden." << std::endl;
     124                        orxout(internal_error) << "Class " << identifier->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << '!' << endl;
     125                        orxout(internal_error) << "SubclassIdentifier<" << ClassIdentifier<T>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden." << endl;
    126126                    }
    127127                    else
    128128                    {
    129                         COUT(1) << "Error: Can't assign NULL identifier" << std::endl;
     129                        orxout(internal_error) << "Can't assign NULL identifier" << endl;
    130130                    }
    131131                }
     
    177177                    if (this->identifier_)
    178178                    {
    179                         COUT(1) << "An error occurred in SubclassIdentifier (Identifier.h):" << std::endl;
    180                         COUT(1) << "Error: Class " << this->identifier_->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << '!' << std::endl;
    181                         COUT(1) << "Error: Couldn't fabricate a new Object." << std::endl;
     179                        orxout(user_error) << "An error occurred in SubclassIdentifier (Identifier.h):" << endl;
     180                        orxout(user_error) << "Class " << this->identifier_->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << '!' << endl;
     181                        orxout(user_error) << "Couldn't fabricate a new Object." << endl;
    182182                    }
    183183                    else
    184184                    {
    185                         COUT(1) << "An error occurred in SubclassIdentifier (Identifier.h):" << std::endl;
    186                         COUT(1) << "Error: Couldn't fabricate a new Object - Identifier is undefined." << std::endl;
    187                     }
    188 
    189                     COUT(1) << "Aborting..." << std::endl;
     185                        orxout(user_error) << "An error occurred in SubclassIdentifier (Identifier.h):" << endl;
     186                        orxout(user_error) << "Couldn't fabricate a new Object - Identifier is undefined." << endl;
     187                    }
     188
     189                    orxout(user_error) << "Aborting..." << endl;
    190190                    abort();
    191191                    return 0;
  • code/branches/output/src/libraries/core/Super.h

    r8788 r8806  
    114114                    if (!((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_) \
    115115                    { \
    116                         COUT(5) << "Added SuperFunctionCaller for " << #functionname << ": " << ClassIdentifier<T>::getIdentifier()->getName() << " <- " << ((ClassIdentifier<T>*)(*it))->getName() << std::endl; \
     116                        orxout(verbose, context::super) << "Added SuperFunctionCaller for " << #functionname << ": " << ClassIdentifier<T>::getIdentifier()->getName() << " <- " << ((ClassIdentifier<T>*)(*it))->getName() << endl; \
    117117                        ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_##functionname <T>; \
    118118                    } \
     
    184184                    {
    185185                        // Add the SuperFunctionCaller
    186                         COUT(5) << "adding functionpointer to " << ((ClassIdentifier<T>*)(*it))->getName() << std::endl;
     186                        orxout(verbose, context::super) << "adding functionpointer to " << ((ClassIdentifier<T>*)(*it))->getName() << endl;
    187187                        ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_##functionname <T>;
    188188                    }
  • code/branches/output/src/libraries/core/Template.cc

    r8788 r8806  
    8888            it = Template::getTemplateMap().find(this->getName());
    8989            if (it != Template::getTemplateMap().end())
    90                 COUT(2) << "Warning: Template with name \"" << this->getName() << "\" already exists." << std::endl;
     90                orxout(internal_warning, context::templates) << "Template with name \"" << this->getName() << "\" already exists." << endl;
    9191            else
    9292                Template::getTemplateMap()[this->getName()] = this;
     
    117117                else
    118118                {
    119                     COUT(2) << "Warning: Linking from " << this->getName() << " to " << this->link_ << " leads to an infinite loop. Returning own element." << std::endl;
     119                    orxout(internal_warning, context::templates) << "Linking from \"" << this->getName() << "\" to \"" << this->link_ << "\" leads to an infinite loop. Returning own element." << endl;
    120120                }
    121121            }
    122122            else
    123123            {
    124                 COUT(2) << "Warning: " << this->link_ << " is not an existing Template name. Returning own element." << std::endl;
     124                orxout(internal_warning, context::templates) << '"' << this->link_ << "\" is not an existing Template name. Returning own element." << endl;
    125125            }
    126126        }
     
    142142            if (!object->isA(this->baseclassIdentifier_))
    143143            {
    144                 COUT(1) << "Error: Can't apply template (name: " << this->getName() << "), object (name: " << object->getName() << ", class: " << object->getIdentifier()->getName() << ") is not a " << this->baseclassIdentifier_->getName() << std::endl;
     144                orxout(internal_error, context::templates) << "Can't apply template (name: " << this->getName() << "), object (name: " << object->getName() << ", class: " << object->getIdentifier()->getName() << ") is not a " << this->baseclassIdentifier_->getName() << endl;
    145145                return;
    146146            }
    147147        }
    148148
    149         COUT(4) << object->getLoaderIndentation() << " aplying Template \"" << this->getName() << "\"..." << std::endl;
     149        orxout(verbose, context::templates) << object->getLoaderIndentation() << " aplying Template \"" << this->getName() << "\"..." << endl;
    150150
    151151        Element temp = &const_cast<TiXmlElement&>(this->getXMLElement());
     
    170170        else
    171171        {
    172             COUT(2) << "Warning: Template with name " << name << " doesn't exist." << std::endl;
     172            orxout(internal_warning, context::templates) << "Template with name " << name << " doesn't exist." << endl;
    173173            return 0;
    174174        }
  • code/branches/output/src/libraries/core/WeakPtr.h

    r8079 r8806  
    6565    void myCallback()                                   // definition of the callback function
    6666    {
    67         COUT(0) << "Object destroyed" << std::endl;
     67        orxout() << "Object destroyed" << endl;
    6868    }
    6969
  • code/branches/output/src/libraries/core/XMLPort.cc

    r7163 r8806  
    6464                        if (!this->sectionname_.empty())
    6565                        {
    66                             COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a valid classname." << std::endl;
     66                            orxout(internal_warning, context::xml) << object->getLoaderIndentation() << "'" << child->Value() << "' is not a valid classname." << endl;
    6767                        }
    6868                        else
     
    7474                    if (!identifier->isA(objectIdentifier_))
    7575                    {
    76                         COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << objectIdentifier_->getName() << "'." << std::endl;
     76                        orxout(internal_warning, context::xml) << object->getLoaderIndentation() << "'" << child->Value() << "' is not a '" << objectIdentifier_->getName() << "'." << endl;
    7777                        continue;
    7878                    }
    7979                    if (!identifier->isLoadable())
    8080                    {
    81                         COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not loadable." << std::endl;
     81                        orxout(internal_warning, context::xml) << object->getLoaderIndentation() << "'" << child->Value() << "' is not loadable." << endl;
    8282                        continue;
    8383                    }
     
    8787                    try
    8888                    {
    89                         COUT(4) << object->getLoaderIndentation() << "fabricating " << child->Value() << "..." << std::endl;
     89                        orxout(verbose, context::xml) << object->getLoaderIndentation() << "fabricating " << child->Value() << "..." << endl;
    9090
    9191                        BaseObject* newObject = identifier->fabricate(object);
     
    9595                        {
    9696                            newObject->XMLPort(*child, XMLPort::LoadObject);
    97                             COUT(4) << object->getLoaderIndentation() << "assigning " << child->Value() << " (objectname " << newObject->getName() << ") to " << this->identifier_->getName() << " (objectname " << static_cast<BaseObject*>(object)->getName() << ')' << std::endl;
     97                            orxout(verbose, context::xml) << object->getLoaderIndentation() << "assigning " << child->Value() << " (objectname " << newObject->getName() << ") to " << this->identifier_->getName() << " (objectname " << static_cast<BaseObject*>(object)->getName() << ')' << endl;
    9898                        }
    9999                        else
    100100                        {
    101                             COUT(4) << object->getLoaderIndentation() << "assigning " << child->Value() << " (object not yet loaded) to " << this->identifier_->getName() << " (objectname " << static_cast<BaseObject*>(object)->getName() << ')' << std::endl;
     101                            orxout(verbose, context::xml) << object->getLoaderIndentation() << "assigning " << child->Value() << " (object not yet loaded) to " << this->identifier_->getName() << " (objectname " << static_cast<BaseObject*>(object)->getName() << ')' << endl;
    102102                        }
    103 
    104                         COUT(5) << object->getLoaderIndentation();
    105103
    106104                        this->callLoadExecutor(object, newObject);
     
    109107                            newObject->XMLPort(*child, XMLPort::LoadObject);
    110108
    111                         COUT(5) << object->getLoaderIndentation() << "...fabricated " << child->Value() << " (objectname " << newObject->getName() << ")." << std::endl;
     109                        orxout(verbose, context::xml) << object->getLoaderIndentation() << "fabricated " << child->Value() << " (objectname " << newObject->getName() << ")." << endl;
    112110                    }
    113111                    catch (AbortLoadingException& ex)
    114112                    {
    115                         COUT(1) << "An error occurred while loading object, abort loading..." << std::endl;
     113                        orxout(internal_error, context::xml) << "An error occurred while loading object, abort loading..." << endl;
    116114                        throw ex;
    117115                    }
    118116                    catch (...)
    119117                    {
    120                         COUT(1) << "An error occurred while loading object:" << std::endl;
    121                         COUT(1) << Exception::handleMessage() << std::endl;
     118                        orxout(internal_error, context::xml) << "An error occurred while loading object:" << endl;
     119                        orxout(internal_error, context::xml) << Exception::handleMessage() << endl;
    122120                    }
    123121                }
     
    125123            catch (ticpp::Exception& ex)
    126124            {
    127                 COUT(1) << std::endl;
    128                 COUT(1) << "An error occurred in XMLPort.h while loading a '" << objectIdentifier_->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << object->getName() << ") in " << object->getFilename() << ':' << std::endl;
    129                 COUT(1) << ex.what() << std::endl;
     125                orxout(internal_error, context::xml) << endl;
     126                orxout(internal_error, context::xml) << "An error occurred in XMLPort.h while loading a '" << objectIdentifier_->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << object->getName() << ") in " << object->getFilename() << ':' << endl;
     127                orxout(internal_error, context::xml) << ex.what() << endl;
    130128            }
    131129        }
  • code/branches/output/src/libraries/core/XMLPort.h

    r8788 r8806  
    415415                        if ((!attributeValue.empty()) || ((mode != XMLPort::ExpandObject) && this->loadexecutor_->allDefaultValuesSet()))
    416416                        {
    417                             COUT(5) << this->owner_->getLoaderIndentation() << "Loading parameter " << this->paramname_ << " in " << this->identifier_->getName() << " (objectname " << this->owner_->getName() << ")." << std::endl << this->owner_->getLoaderIndentation();
     417                            orxout(verbose_more, context::xml) << this->owner_->getLoaderIndentation() << "Loading parameter " << this->paramname_ << " in " << this->identifier_->getName() << " (objectname " << this->owner_->getName() << ")." << endl;
    418418                            int error;
    419419                            this->loadexecutor_->parse(object, attributeValue, &error, ",");
     
    430430                    catch (ticpp::Exception& ex)
    431431                    {
    432                         COUT(1) << std::endl;
    433                         COUT(1) << "An error occurred in XMLPort.h while loading attribute '" << this->paramname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << this->owner_->getName() << ") in " << this->owner_->getFilename() << ':' << std::endl;
    434                         COUT(1) << ex.what() << std::endl;
     432                        orxout(internal_error, context::xml) << endl;
     433                        orxout(internal_error, context::xml) << "An error occurred in XMLPort.h while loading attribute '" << this->paramname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << this->owner_->getName() << ") in " << this->owner_->getFilename() << ':' << endl;
     434                        orxout(internal_error, context::xml) << ex.what() << endl;
    435435                    }
    436436                }
  • code/branches/output/src/libraries/core/command/CommandEvaluation.cc

    r7401 r8806  
    151151            if (this->bEvaluatedArguments_)
    152152            {
    153                 COUT(6) << "CE_execute (evaluation): " << this->execCommand_->getName() << " with " << this->numberOfEvaluatedArguments_ << " arguments: " << this->arguments_[0] << ' ' << this->arguments_[1] << ' ' << this->arguments_[2] << ' ' << this->arguments_[3] << ' ' << this->arguments_[4] << std::endl;
     153                orxout(verbose, context::commands) << "CE_execute (evaluation): " << this->execCommand_->getName() << " with " << this->numberOfEvaluatedArguments_ << " arguments: " << this->arguments_[0] << ' ' << this->arguments_[1] << ' ' << this->arguments_[2] << ' ' << this->arguments_[3] << ' ' << this->arguments_[4] << endl;
    154154
    155155                // pass as many arguments to the executor as were evaluated (thus the executor can still use additional default values)
     
    186186        {
    187187            if (bPrintError)
    188                 COUT(1) << "Error: Can't evaluate arguments, no console command assigned." << std::endl;
     188                orxout(internal_error, context::commands) << "Can't evaluate arguments, no console command assigned." << endl;
    189189            return CommandExecutor::Error;
    190190        }
     
    200200            this->bEvaluatedArguments_ = true;
    201201        else if (bPrintError)
    202             COUT(1) << "Error: Can't evaluate arguments, not enough arguments given." << std::endl;
     202            orxout(internal_error, context::commands) << "Can't evaluate arguments, not enough arguments given." << endl;
    203203
    204204        return error;
  • code/branches/output/src/libraries/core/command/CommandExecutor.cc

    r7401 r8806  
    261261            if ((tokens.size() == 1 && ConsoleCommand::getCommand(tokens[0])) || (tokens.size() == 2 && ConsoleCommand::getCommand(tokens[0], tokens[1])))
    262262            {
    263                 COUT(1) << "Error: A command with name \"" << alias << "\" already exists." << std::endl;
     263                orxout(user_error) << "A command with name \"" << alias << "\" already exists." << endl;
    264264                return;
    265265            }
     
    271271                createConsoleCommand(tokens[0], tokens[1], executor);
    272272            else
    273                 COUT(1) << "Error: \"" << alias << "\" is not a valid alias name (must have one or two words)." << std::endl;
     273                orxout(user_error) << "\"" << alias << "\" is not a valid alias name (must have one or two words)." << endl;
    274274        }
    275275        else
    276             COUT(1) << "Error: \"" << command << "\" is not a valid command (did you mean \"" << evaluation.getCommandSuggestion() << "\"?)." << std::endl;
     276            orxout(user_error) << "\"" << command << "\" is not a valid command (did you mean \"" << evaluation.getCommandSuggestion() << "\"?)." << endl;
    277277    }
    278278}
  • code/branches/output/src/libraries/core/command/ConsoleCommand.cc

    r8316 r8806  
    172172                if (!this->executor_->defaultValueSet(i))
    173173                {
    174                     COUT(2) << "Default value " << i << " is missing" << std::endl;
     174                    orxout(internal_warning, context::commands) << "Default value " << i << " is missing" << endl;
    175175                    return false;
    176176                }
     
    202202                if (!executor->defaultValueSet(i))
    203203                {
    204                     COUT(2) << "Default value " << i << " is missing" << std::endl;
     204                    orxout(internal_warning, context::commands) << "Default value " << i << " is missing" << endl;
    205205                    return false;
    206206                }
     
    229229        else
    230230        {
    231             COUT(1) << "Error: Couldn't assign new executor to console command \"" << this->baseName_ << "\", headers don't match." << std::endl;
     231            orxout(internal_error, context::commands) << "Couldn't assign new executor to console command \"" << this->baseName_ << "\", headers don't match." << endl;
    232232            return false;
    233233        }
     
    256256        else
    257257        {
    258             COUT(1) << "Error: Couldn't assign new functor to console command \"" << this->baseName_ << "\", headers don't match." << std::endl;
     258            orxout(internal_error, context::commands) << "Couldn't assign new functor to console command \"" << this->baseName_ << "\", headers don't match." << endl;
    259259            return false;
    260260        }
     
    307307            this->pushFunction(new Executor(*this->executor_.get()));
    308308        else
    309             COUT(1) << "Error: Couldn't push copy of executor in console command \"" << this->baseName_ << "\", no executor set." << std::endl;
     309            orxout(internal_error, context::commands) << "Couldn't push copy of executor in console command \"" << this->baseName_ << "\", no executor set." << endl;
    310310    }
    311311
     
    367367            }
    368368            else if (object)
    369                 COUT(1) << "Error: Can't assign object to console command \"" << this->baseName_ << "\", no functor set." << std::endl;
     369                orxout(internal_error, context::commands) << "Can't assign object to console command \"" << this->baseName_ << "\", no functor set." << endl;
    370370        }
    371371        else if (object)
    372             COUT(1) << "Error: Can't assign object to console command \"" << this->baseName_ << "\", no executor set." << std::endl;
     372            orxout(internal_error, context::commands) << "Can't assign object to console command \"" << this->baseName_ << "\", no executor set." << endl;
    373373
    374374        return false;
     
    418418            this->executor_->setDefaultValues(arg1);
    419419        else
    420             COUT(1) << "Error: Can't set default values in console command \"" << this->baseName_ << "\", no executor set." << std::endl;
     420            orxout(internal_error, context::commands) << "Can't set default values in console command \"" << this->baseName_ << "\", no executor set." << endl;
    421421
    422422        return *this;
     
    431431            this->executor_->setDefaultValues(arg1, arg2);
    432432        else
    433             COUT(1) << "Error: Can't set default values in console command \"" << this->baseName_ << "\", no executor set." << std::endl;
     433            orxout(internal_error, context::commands) << "Can't set default values in console command \"" << this->baseName_ << "\", no executor set." << endl;
    434434
    435435        return *this;
     
    444444            this->executor_->setDefaultValues(arg1, arg2, arg3);
    445445        else
    446             COUT(1) << "Error: Can't set default values in console command \"" << this->baseName_ << "\", no executor set." << std::endl;
     446            orxout(internal_error, context::commands) << "Can't set default values in console command \"" << this->baseName_ << "\", no executor set." << endl;
    447447
    448448        return *this;
     
    457457            this->executor_->setDefaultValues(arg1, arg2, arg3, arg4);
    458458        else
    459             COUT(1) << "Error: Can't set default values in console command \"" << this->baseName_ << "\", no executor set." << std::endl;
     459            orxout(internal_error, context::commands) << "Can't set default values in console command \"" << this->baseName_ << "\", no executor set." << endl;
    460460
    461461        return *this;
     
    470470            this->executor_->setDefaultValues(arg1, arg2, arg3, arg4, arg5);
    471471        else
    472             COUT(1) << "Error: Can't set default values in console command \"" << this->baseName_ << "\", no executor set." << std::endl;
     472            orxout(internal_error, context::commands) << "Can't set default values in console command \"" << this->baseName_ << "\", no executor set." << endl;
    473473
    474474        return *this;
     
    485485            this->executor_->setDefaultValue(index, arg);
    486486        else
    487             COUT(1) << "Error: Can't set default values in console command \"" << this->baseName_ << "\", no executor set." << std::endl;
     487            orxout(internal_error, context::commands) << "Can't set default values in console command \"" << this->baseName_ << "\", no executor set." << endl;
    488488
    489489        return *this;
     
    500500            this->argumentCompleter_[index] = completer;
    501501        else
    502             COUT(2) << "Warning: Couldn't add autocompletion-function for index " << index << " in console command \"" << this->baseName_ << "\": index out of bound." << std::endl;
     502            orxout(internal_warning, context::commands) << "Couldn't add autocompletion-function for index " << index << " in console command \"" << this->baseName_ << "\": index out of bound." << endl;
    503503
    504504        return *this;
     
    611611        {
    612612            if (group == "")
    613                 COUT(1) << "Error: Couldn't find console command with shortcut \"" << name << "\"" << std::endl;
     613                orxout(internal_error, context::commands) << "Couldn't find console command with shortcut \"" << name << "\"" << endl;
    614614            else
    615                 COUT(1) << "Error: Couldn't find console command with group \"" << group << "\" and name \"" << name << "\"" << std::endl;
     615                orxout(internal_error, context::commands) << "Couldn't find console command with group \"" << group << "\" and name \"" << name << "\"" << endl;
    616616        }
    617617        return 0;
     
    644644        {
    645645            if (group == "")
    646                 COUT(1) << "Error: Couldn't find console command with shortcut \"" << name << "\"" << std::endl;
     646                orxout(internal_error, context::commands) << "Couldn't find console command with shortcut \"" << name << "\"" << endl;
    647647            else
    648                 COUT(1) << "Error: Couldn't find console command with group \"" << group << "\" and name \"" << name << "\"" << std::endl;
     648                orxout(internal_error, context::commands) << "Couldn't find console command with group \"" << group << "\" and name \"" << name << "\"" << endl;
    649649        }
    650650        return 0;
     
    681681        {
    682682            if (group == "")
    683                 COUT(2) << "Warning: A console command with shortcut \"" << name << "\" already exists." << std::endl;
     683                orxout(internal_warning, context::commands) << "A console command with shortcut \"" << name << "\" already exists." << endl;
    684684            else
    685                 COUT(2) << "Warning: A console command with name \"" << name << "\" already exists in group \"" << group << "\"." << std::endl;
     685                orxout(internal_warning, context::commands) << "A console command with name \"" << name << "\" already exists in group \"" << group << "\"." << endl;
    686686        }
    687687        else
  • code/branches/output/src/libraries/core/command/ConsoleCommand.h

    r8418 r8806  
    5353    void myCoutFunction(const std::string& text)        // Define a static function
    5454    {
    55         COUT(0) << "Text: " << text << std::endl;       // Print the text to the console
     55        orxout() << "Text: " << text << endl;           // Print the text to the console
    5656    }
    5757
     
    125125    void myOtherCoutFunction(const std::string& text)                       // Define a new static function
    126126    {
    127         COUT(0) << "Uppercase: " << getUppercase(text) << std::endl;        // Print the text in uppercase to the console
     127        orxout() << "Uppercase: " << getUppercase(text) << endl;            // Print the text in uppercase to the console
    128128    }
    129129
  • code/branches/output/src/libraries/core/command/ConsoleCommandCompilation.cc

    r8788 r8806  
    4848//    SetConsoleCommand("source", source).argumentCompleter(0, autocompletion::files());  // disabled because we use the implementation in Tcl
    4949    SetConsoleCommand("echo", echo);
    50 //    SetConsoleCommand("puts", puts);                                                    // disabled because we use the implementation in Tcl
    5150
    5251//    SetConsoleCommand("read", read).argumentCompleter(0, autocompletion::files());      // disabled because we use the implementation in Tcl
     
    6665        if (it != executingFiles.end())
    6766        {
    68             COUT(1) << "Error: Recurring source command in \"" << filename << "\". Stopped execution." << std::endl;
     67            orxout(user_error) << "Recurring source command in \"" << filename << "\". Stopped execution." << endl;
    6968            return;
    7069        }
     
    7675        if (!file.is_open())
    7776        {
    78             COUT(1) << "Error: Couldn't open file \"" << filename << "\"." << std::endl;
     77            orxout(user_error) << "Couldn't open file \"" << filename << "\"." << endl;
    7978            return;
    8079        }
     
    103102
    104103    /**
    105         @brief Writes text to the console, depending on the first argument with or without a line-break after it.
    106     */
    107     void puts(bool newline, const std::string& text)
    108     {
    109         if (newline)
    110         {
    111             COUT(0) << stripEnclosingBraces(text) << std::endl;
    112         }
    113         else
    114         {
    115             COUT(0) << stripEnclosingBraces(text);
    116         }
    117     }
    118 
    119     /**
    120104        @brief Writes text to a file.
    121105    */
     
    127111        if (!file.is_open())
    128112        {
    129             COUT(1) << "Error: Couldn't write to file \"" << filename << "\"." << std::endl;
     113            orxout(user_error) << "Couldn't write to file \"" << filename << "\"." << endl;
    130114            return;
    131115        }
    132116
    133         file << text << std::endl;
     117        file << text << endl;
    134118        file.close();
    135119    }
     
    145129        if (!file.is_open())
    146130        {
    147             COUT(1) << "Error: Couldn't append to file \"" << filename << "\"." << std::endl;
     131            orxout(user_error) << "Couldn't append to file \"" << filename << "\"." << endl;
    148132            return;
    149133        }
    150134
    151         file << text << std::endl;
     135        file << text << endl;
    152136        file.close();
    153137    }
     
    163147        if (!file.is_open())
    164148        {
    165             COUT(1) << "Error: Couldn't read from file \"" << filename << "\"." << std::endl;
     149            orxout(user_error) << "Couldn't read from file \"" << filename << "\"." << endl;
    166150            return "";
    167151        }
     
    192176            if (expr.getResult() == 42.0)
    193177            {
    194                 COUT(3) << "Greetings from the restaurant at the end of the universe." << std::endl;
     178                orxout(user_info) << "Greetings from the restaurant at the end of the universe." << endl;
    195179            }
    196180            if (!expr.getRemains().empty())
    197181            {
    198                 COUT(2) << "Warning: Expression could not be parsed to the end! Remains: '" << expr.getRemains() << '\'' << std::endl;
     182                orxout(user_warning) << "Expression could not be parsed to the end! Remains: '" << expr.getRemains() << '\'' << endl;
    199183            }
    200184            return static_cast<float>(expr.getResult());
     
    202186        else
    203187        {
    204             COUT(1) << "Error: Cannot calculate expression: Parse error." << std::endl;
     188            orxout(user_error) << "Cannot calculate expression: Parse error." << endl;
    205189            return 0;
    206190        }
  • code/branches/output/src/libraries/core/command/ConsoleCommandCompilation.h

    r7401 r8806  
    4242    _CoreExport void source(const std::string& filename);
    4343    _CoreExport std::string echo(const std::string& text);
    44     _CoreExport void puts(bool newline, const std::string& test);
    4544
    4645    _CoreExport void write(const std::string& filename, const std::string& text);
  • code/branches/output/src/libraries/core/command/Executor.cc

    r8788 r8806  
    104104        {
    105105            if (bPrintError)
    106                 COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough arguments or default values given (input: " << arguments.join() << ")." << std::endl;
     106                orxout(internal_warning) << "Can't call executor " << this->name_ << " through parser: Not enough arguments or default values given (input: " << arguments.join() << ")." << endl;
    107107            return MT_Type::Null;
    108108        }
    109109
    110         COUT(5) << "Executor::parse: \"" << arguments.join(delimiter) << "\" -> " << argCount << " arguments: " << arg[0] << " / " << arg[1] << " / " << arg[2] << " / " << arg[3] << " / " << arg[4] << std::endl;
     110        orxout(verbose, context::executor) << "Executor::parse: \"" << arguments.join(delimiter) << "\" -> " << argCount << " arguments: " << arg[0] << " / " << arg[1] << " / " << arg[2] << " / " << arg[3] << " / " << arg[4] << endl;
    111111
    112112        // execute the function with the evaluated arguments (the default values of the executor are also included in these arguments)
  • code/branches/output/src/libraries/core/command/Executor.h

    r7401 r8806  
    5757    void myFunction(int a, int b)                           // declare a static function
    5858    {
    59         COUT(0) << "The sum is " << (a + b) << std::endl;   // print the sum of a and b to the console
     59        orxout() << "The sum is " << (a + b) << endl;       // print the sum of a and b to the console
    6060    }
    6161
  • code/branches/output/src/libraries/core/command/Functor.h

    r8788 r8806  
    256256                else
    257257                {
    258                     COUT(1) << "Error: Can't execute FunctorMember, no object set." << std::endl;
     258                    orxout(internal_error) << "Can't execute FunctorMember, no object set." << endl;
    259259                    return MT_Type::Null;
    260260                }
     
    339339            // see Functor::setRawObjectPointer()
    340340            inline void setRawObjectPointer(void*)
    341                 { COUT(2) << "Warning: Can't assign an object pointer to a static functor" << std::endl; }
     341                { orxout(internal_warning) << "Can't assign an object pointer to a static functor" << endl; }
    342342            // see Functor::getRawObjectPointer()
    343343            inline void* getRawObjectPointer() const
  • code/branches/output/src/libraries/core/command/IOConsoleWindows.cc

    r8805 r8806  
    250250            || !SetConsoleMode(this->stdInHandle_, 0))
    251251        {
    252             orxout(user_error) << "Error: Could not set Windows console settings" << endl;
     252            orxout(user_error) << "Could not set Windows console settings" << endl;
    253253            return;
    254254        }
  • code/branches/output/src/libraries/core/command/IRC.cc

    r7401 r8806  
    8585        }
    8686        catch (Tcl::tcl_error const &e)
    87         {   COUT(1) << "Tcl (IRC) error: " << e.what();   }
     87        {   orxout(user_error, context::tcl) << "Tcl (IRC) error: " << e.what() << endl;   }
    8888
    8989        this->nickname_ = "orx" + multi_cast<std::string>(static_cast<unsigned int>(rand()));
     
    100100        {
    101101            IRC::getInstance().initialize();
    102             COUT(1) << "Error: IRC client wasn't yet initialized, please try again." << std::endl;
     102            orxout(user_error) << "IRC client wasn't yet initialized, please try again." << endl;
    103103            return false;
    104104        }
     
    110110        }
    111111        catch (Tcl::tcl_error const &e)
    112         {   COUT(1) << "Tcl (IRC) error: " << e.what();   }
     112        {   orxout(user_error, context::tcl) << "Tcl (IRC) error: " << e.what() << endl;   }
    113113
    114114        return false;
     
    139139    void IRC::tcl_say(Tcl::object const &channel, Tcl::object const &nick, Tcl::object const &args)
    140140    {
    141         COUT(0) << "IRC> " << nick.get() << ": " << stripEnclosingBraces(args.get()) << std::endl;
     141        orxout(message) << "IRC> " << nick.get() << ": " << stripEnclosingBraces(args.get()) << endl;
    142142    }
    143143
     
    145145    void IRC::tcl_privmsg(Tcl::object const &query, Tcl::object const &nick, Tcl::object const &args)
    146146    {
    147         COUT(0) << "IRC (" << query.get() << ")> " << nick.get() << ": " << stripEnclosingBraces(args.get()) << std::endl;
     147        orxout(message) << "IRC (" << query.get() << ")> " << nick.get() << ": " << stripEnclosingBraces(args.get()) << endl;
    148148    }
    149149
     
    151151    void IRC::tcl_action(Tcl::object const &channel, Tcl::object const &nick, Tcl::object const &args)
    152152    {
    153         COUT(0) << "IRC> * " << nick.get() << ' ' << stripEnclosingBraces(args.get()) << std::endl;
     153        orxout(message) << "IRC> * " << nick.get() << ' ' << stripEnclosingBraces(args.get()) << endl;
    154154    }
    155155
     
    157157    void IRC::tcl_info(Tcl::object const &channel, Tcl::object const &args)
    158158    {
    159         COUT(0) << "IRC> --> " << stripEnclosingBraces(args.get()) << std::endl;
     159        orxout(message) << "IRC> --> " << stripEnclosingBraces(args.get()) << endl;
    160160    }
    161161}
  • code/branches/output/src/libraries/core/command/TclBind.cc

    r8788 r8806  
    106106            }
    107107            catch (Tcl::tcl_error const &e)
    108             {   COUT(1) << "Tcl error while creating Tcl-interpreter: " << e.what() << std::endl;   }
     108            {   orxout(internal_error, context::tcl) << "Tcl error while creating Tcl-interpreter: " << e.what() << endl;   }
    109109        }
    110110    }
     
    129129        }
    130130        catch (Tcl::tcl_error const &e)
    131         {   COUT(1) << "Tcl error while creating Tcl-interpreter: " << e.what() << std::endl; COUT(1) << "Error: Tcl isn't properly initialized. Orxonox might possibly not work like that." << std::endl;   }
     131        {
     132            orxout(internal_error, context::tcl) << "Tcl error while creating Tcl-interpreter: " << e.what() << endl;
     133            orxout(user_error, context::tcl) << "Tcl isn't properly initialized. Orxonox might possibly not work like that." << endl;
     134        }
    132135
    133136        return interpreter;
     
    154157    std::string TclBind::tcl_query(Tcl::object const &args)
    155158    {
    156         COUT(4) << "Tcl_query: " << args.get() << std::endl;
     159        orxout(verbose, context::commands) << "Tcl_query: " << args.get() << endl;
    157160        return TclBind::tcl_helper(args, true);
    158161    }
     
    163166    void TclBind::tcl_execute(Tcl::object const &args)
    164167    {
    165         COUT(4) << "Tcl_execute: " << args.get() << std::endl;
     168        orxout(verbose, context::commands) << "Tcl_execute: " << args.get() << endl;
    166169        TclBind::tcl_helper(args, false);
    167170    }
     
    186189        switch (error)
    187190        {
    188             case CommandExecutor::Error:       COUT(1) << "Error: Can't execute command \"" << command << "\", command doesn't exist. (B)" << std::endl; break;
    189             case CommandExecutor::Incomplete:  COUT(1) << "Error: Can't execute command \"" << command << "\", not enough arguments given. (B)" << std::endl; break;
    190             case CommandExecutor::Deactivated: COUT(1) << "Error: Can't execute command \"" << command << "\", command is not active. (B)" << std::endl; break;
    191             case CommandExecutor::Denied:      COUT(1) << "Error: Can't execute command \"" << command << "\", access denied. (B)" << std::endl; break;
     191            case CommandExecutor::Error:       orxout(user_error) << "Can't execute command \"" << command << "\", command doesn't exist. (B)" << endl; break;
     192            case CommandExecutor::Incomplete:  orxout(user_error) << "Can't execute command \"" << command << "\", not enough arguments given. (B)" << endl; break;
     193            case CommandExecutor::Deactivated: orxout(user_error) << "Can't execute command \"" << command << "\", command is not active. (B)" << endl; break;
     194            case CommandExecutor::Denied:      orxout(user_error) << "Can't execute command \"" << command << "\", access denied. (B)" << endl; break;
    192195        }
    193196
    194197        if (error == CommandExecutor::Error)
    195             COUT(3) << "Did you mean \"" << evaluation.getCommandSuggestion() << "\"?" << std::endl;
     198            orxout(user_info) << "Did you mean \"" << evaluation.getCommandSuggestion() << "\"?" << endl;
    196199
    197200        return result;
     
    211214            }
    212215            catch (Tcl::tcl_error const &e)
    213             {   COUT(1) << "Tcl error: " << e.what() << std::endl;   }
     216            {   orxout(user_error, context::tcl) << "Tcl error: " << e.what() << endl;   }
    214217        }
    215218
     
    223226    void TclBind::bgerror(const std::string& error)
    224227    {
    225         COUT(1) << "Tcl background error: " << stripEnclosingBraces(error) << std::endl;
     228        orxout(user_error, context::tcl) << "Tcl background error: " << stripEnclosingBraces(error) << endl;
    226229    }
    227230
     
    243246        }
    244247        catch (Tcl::tcl_error const &e)
    245         {   COUT(1) << "Tcl error: " << e.what() << std::endl;   }
     248        {   orxout(user_error, context::tcl) << "Tcl error: " << e.what() << endl;   }
    246249
    247250        if (error)
  • code/branches/output/src/libraries/core/command/TclThreadManager.cc

    r8351 r8806  
    225225        TclThreadManager::getInstance().numInterpreterBundles_++;
    226226        TclThreadManager::createWithId(TclThreadManager::getInstance().numInterpreterBundles_);
    227         COUT(0) << "Created new Tcl-interpreter with ID " << TclThreadManager::getInstance().numInterpreterBundles_ << std::endl;
     227        orxout(user_info) << "Created new Tcl-interpreter with ID " << TclThreadManager::getInstance().numInterpreterBundles_ << endl;
    228228        return TclThreadManager::getInstance().numInterpreterBundles_;
    229229    }
     
    288288        }
    289289        catch (const Tcl::tcl_error& e)
    290         {   bundle->interpreter_ = 0; COUT(1) << "Tcl error while creating Tcl-interpreter (" << id_string << "): " << e.what() << std::endl;   }
     290        {
     291            bundle->interpreter_ = 0;
     292            orxout(user_error, context::tcl) << "Tcl error while creating Tcl-interpreter (" << id_string << "): " << e.what() << endl;
     293        }
    291294    }
    292295
     
    407410            {
    408411                // This query would lead to a deadlock - return with an error
    409                 TclThreadManager::error("Error: Circular query (" + this->dumpList(source_bundle->queriers_.getList()) + ' ' + multi_cast<std::string>(source_bundle->id_) \
     412                TclThreadManager::error("Circular query (" + this->dumpList(source_bundle->queriers_.getList()) + ' ' + multi_cast<std::string>(source_bundle->id_) \
    410413                            + " -> " + multi_cast<std::string>(target_bundle->id_) \
    411414                            + "), couldn't query Tcl-interpreter with ID " + multi_cast<std::string>(target_bundle->id_) \
     
    448451                        switch (error)
    449452                        {
    450                             case CommandExecutor::Error:       TclThreadManager::error("Error: Can't execute command \"" + command + "\", command doesn't exist. (T)"); break;
    451                             case CommandExecutor::Incomplete:  TclThreadManager::error("Error: Can't execute command \"" + command + "\", not enough arguments given. (T)"); break;
    452                             case CommandExecutor::Deactivated: TclThreadManager::error("Error: Can't execute command \"" + command + "\", command is not active. (T)"); break;
    453                             case CommandExecutor::Denied:      TclThreadManager::error("Error: Can't execute command \"" + command + "\", access denied. (T)"); break;
     453                            case CommandExecutor::Error:       TclThreadManager::error("Can't execute command \"" + command + "\", command doesn't exist. (T)"); break;
     454                            case CommandExecutor::Incomplete:  TclThreadManager::error("Can't execute command \"" + command + "\", not enough arguments given. (T)"); break;
     455                            case CommandExecutor::Deactivated: TclThreadManager::error("Can't execute command \"" + command + "\", command is not active. (T)"); break;
     456                            case CommandExecutor::Denied:      TclThreadManager::error("Can't execute command \"" + command + "\", access denied. (T)"); break;
    454457                        }
    455458                    }
     
    476479                    // This happens if the main thread tries to query a busy interpreter
    477480                    // To avoid a lock of the main thread, we simply don't proceed with the query in this case
    478                     TclThreadManager::error("Error: Couldn't query Tcl-interpreter with ID " + multi_cast<std::string>(target_bundle->id_) + ", interpreter is busy right now.");
     481                    TclThreadManager::error("Couldn't query Tcl-interpreter with ID " + multi_cast<std::string>(target_bundle->id_) + ", interpreter is busy right now.");
    479482                }
    480483            }
     
    522525        else
    523526        {
    524             TclThreadManager::error("Error: No Tcl-interpreter with ID " + multi_cast<std::string>(id) + " existing.");
     527            TclThreadManager::error("No Tcl-interpreter with ID " + multi_cast<std::string>(id) + " existing.");
    525528            return 0;
    526529        }
  • code/branches/output/src/libraries/core/input/Button.cc

    r8788 r8806  
    255255        if (serious)
    256256        {
    257             COUT(2) << "Error while parsing binding for button/axis " << this->name_ << ". "
    258                 << message << std::endl;
     257            orxout(internal_error, context::input) << "Error while parsing binding for button/axis " << this->name_ << ". "
     258                << message << endl;
    259259        }
    260260        else
    261261        {
    262             COUT(3) << "Warning while parsing binding for button/axis " << this->name_ << ". "
    263                 << message << std::endl;
     262            orxout(internal_warning, context::input) << "Warning while parsing binding for button/axis " << this->name_ << ". "
     263                << message << endl;
    264264        }
    265265    }
  • code/branches/output/src/libraries/core/input/InputDevice.h

    r8788 r8806  
    135135            //       invalid right until the subclass has been constructed!
    136136            oisDevice_->setEventCallback(static_cast<DeviceClass*>(this));
    137             COUT(4) << "Instantiated a " << this->getClassName() << std::endl;
     137            orxout(verbose, context::input) << "Instantiated a " << this->getClassName() << endl;
    138138        }
    139139
     
    147147            catch (const OIS::Exception& ex)
    148148            {
    149                 COUT(1) << this->getClassName() << " destruction failed: " << ex.eText << std::endl
    150                         << "    Potential resource leak!" << std::endl;
     149                orxout(internal_error, context::input) << this->getClassName() << " destruction failed: " << ex.eText << '\n'
     150                                                       << "Potential resource leak!" << endl;
    151151            }
    152152        }
  • code/branches/output/src/libraries/core/input/InputManager.cc

    r8729 r8806  
    100100        RegisterRootObject(InputManager);
    101101
    102         CCOUT(4) << "Constructing..." << std::endl;
     102        orxout(internal_status, context::input) << "InputManager: Constructing..." << endl;
    103103
    104104        // Allocate space for the function call buffer
     
    128128        ModifyConsoleCommand(__CC_InputManager_name, __CC_reload_name).setObject(this);
    129129
    130         CCOUT(4) << "Construction complete." << std::endl;
     130        orxout(internal_status, context::input) << "InputManager: Construction complete." << endl;
    131131        internalState_ = Nothing;
    132132    }
     
    143143    void InputManager::loadDevices()
    144144    {
    145         CCOUT(4) << "Loading input devices..." << std::endl;
     145        orxout(internal_info, context::input) << "InputManager: Loading input devices..." << endl;
    146146
    147147        // When loading the devices they should not already be loaded
     
    196196            // Exception-safety
    197197            Loki::ScopeGuard guard = Loki::MakeGuard(OIS::InputManager::destroyInputSystem, oisInputManager_);
    198             CCOUT(4) << "Created OIS input manager." << std::endl;
     198            orxout(internal_info, context::input) << "Created OIS input manager." << endl;
    199199
    200200            if (oisInputManager_->getNumberOfDevices(OIS::OISKeyboard) > 0)
     
    219219        this->updateActiveStates();
    220220
    221         CCOUT(4) << "Input devices loaded." << std::endl;
     221        orxout(internal_info, context::input) << "Input devices loaded." << endl;
    222222    }
    223223
     
    233233            catch (const std::exception& ex)
    234234            {
    235                 CCOUT(2) << "Warning: Failed to create Mouse:" << ex.what() << std::endl
    236                          << "Proceeding without mouse support." << std::endl;
    237             }
    238         }
    239         else
    240             CCOUT(2) << "Warning: No mouse found! Proceeding without mouse support." << std::endl;
     235                orxout(user_warning, context::input) << "Failed to create Mouse:" << ex.what() << '\n'
     236                                                     << "Proceeding without mouse support." << endl;
     237            }
     238        }
     239        else
     240            orxout(user_warning, context::input) << "No mouse found! Proceeding without mouse support." << endl;
    241241    }
    242242
     
    252252            catch (const std::exception& ex)
    253253            {
    254                 CCOUT(2) << "Warning: Failed to create joy stick: " << ex.what() << std::endl;
     254                orxout(user_warning, context::input) << "Failed to create joy stick: " << ex.what() << endl;
    255255            }
    256256        }
     
    270270    InputManager::~InputManager()
    271271    {
    272         CCOUT(3) << "Destroying..." << std::endl;
     272        orxout(internal_status, context::input) << "InputManager: Destroying..." << endl;
    273273
    274274        // Leave all active InputStates (except "empty")
     
    295295        ModifyConsoleCommand(__CC_InputManager_name, __CC_reload_name).setObject(0);
    296296
    297         CCOUT(3) << "Destruction complete." << std::endl;
     297        orxout(internal_status, context::input) << "InputManager: Destruction complete." << endl;
    298298    }
    299299
     
    306306    void InputManager::destroyDevices()
    307307    {
    308         CCOUT(4) << "Destroying devices..." << std::endl;
     308        orxout(internal_info, context::input) << "InputManager: Destroying devices..." << endl;
    309309
    310310        BOOST_FOREACH(InputDevice*& device, devices_)
     
    315315            delete device;
    316316            device = 0;
    317             CCOUT(4) << className << " destroyed." << std::endl;
     317            orxout(internal_info, context::input) << className << " destroyed." << endl;
    318318        }
    319319        devices_.resize(InputDeviceEnumerator::FirstJoyStick);
     
    326326        catch (const OIS::Exception& ex)
    327327        {
    328             COUT(1) << "OIS::InputManager destruction failed" << ex.eText << std::endl
    329                     << "    Potential resource leak!" << std::endl;
     328            orxout(internal_error, context::input) << "OIS::InputManager destruction failed" << ex.eText << '\n'
     329                                                   << "Potential resource leak!" << endl;
    330330        }
    331331        oisInputManager_ = NULL;
    332332
    333333        internalState_ |= Bad;
    334         CCOUT(4) << "Destroyed devices." << std::endl;
     334        orxout(internal_info, context::input) << "Destroyed devices." << endl;
    335335    }
    336336
     
    343343    {
    344344        if (internalState_ & Calibrating)
    345             CCOUT(2) << "Warning: Cannot reload input system. Joy sticks are currently being calibrated." << std::endl;
     345            orxout(internal_warning, context::input) << "Cannot reload input system. Joy sticks are currently being calibrated." << endl;
    346346        else
    347347            reloadInternal();
     
    351351    void InputManager::reloadInternal()
    352352    {
    353         CCOUT(4) << "Reloading ..." << std::endl;
     353        orxout(internal_info, context::input) << "InputManager: Reloading ..." << endl;
    354354
    355355        this->destroyDevices();
     
    357357
    358358        internalState_ &= ~Bad;
    359         CCOUT(4) << "Reloading complete." << std::endl;
     359        orxout(internal_info, context::input) << "InputManager: Reloading complete." << endl;
    360360    }
    361361
     
    471471    void InputManager::calibrate()
    472472    {
    473         COUT(0) << "Move all joy stick axes fully in all directions." << std::endl
    474                 << "When done, put the axex in the middle position and press enter." << std::endl;
     473        orxout(message) << "Move all joy stick axes fully in all directions." << '\n'
     474                        << "When done, put the axex in the middle position and press enter." << endl;
    475475
    476476        BOOST_FOREACH(InputDevice* device, devices_)
     
    495495        this->clearBuffers();
    496496
    497         COUT(0) << "Calibration has been stored." << std::endl;
     497        orxout(message) << "Calibration has been stored." << endl;
    498498    }
    499499
     
    535535                    if (it->second->getPriority() == priority)
    536536                    {
    537                         COUT(2) << "Warning: Could not add an InputState with the same priority '"
    538                             << static_cast<int>(priority) << "' != 0." << std::endl;
     537                        orxout(internal_warning, context::input) << "Could not add an InputState with the same priority '"
     538                            << static_cast<int>(priority) << "' != 0." << endl;
    539539                        return 0;
    540540                    }
     
    548548        else
    549549        {
    550             COUT(2) << "Warning: Could not add an InputState with the same name '" << name << "'." << std::endl;
     550            orxout(internal_warning, context::input) << "Could not add an InputState with the same name '" << name << "'." << endl;
    551551            return 0;
    552552        }
     
    598598        if (name == "empty")
    599599        {
    600             COUT(2) << "InputManager: Leaving the empty state is not allowed!" << std::endl;
     600            orxout(internal_warning, context::input) << "InputManager: Leaving the empty state is not allowed!" << endl;
    601601            return false;
    602602        }
     
    623623        if (name == "empty")
    624624        {
    625             COUT(2) << "InputManager: Removing the empty state is not allowed!" << std::endl;
     625            orxout(internal_warning, context::input) << "InputManager: Removing the empty state is not allowed!" << endl;
    626626            return false;
    627627        }
     
    649649        if (name == "empty")
    650650        {
    651             COUT(2) << "InputManager: Changing the empty state is not allowed!" << std::endl;
     651            orxout(internal_warning, context::input) << "InputManager: Changing the empty state is not allowed!" << endl;
    652652            return false;
    653653        }
  • code/branches/output/src/libraries/core/input/JoyStick.cc

    r6536 r8806  
    8080        }
    8181
    82         COUT(4) << "Created OIS joy stick with ID " << deviceName_ << std::endl;
     82        orxout(verbose, context::input) << "Created OIS joy stick with ID " << deviceName_ << endl;
    8383
    8484        // Load calibration
  • code/branches/output/src/libraries/core/input/KeyBinder.cc

    r8788 r8806  
    251251    void KeyBinder::loadBindings()
    252252    {
    253         COUT(3) << "KeyBinder: Loading key bindings..." << std::endl;
     253        orxout(internal_info, context::input) << "KeyBinder: Loading key bindings..." << endl;
    254254
    255255        this->configFile_ = new ConfigFile(this->filename_, !PathConfig::buildDirectoryRun());
     
    277277        }
    278278
    279         COUT(3) << "KeyBinder: Loading key bindings done." << std::endl;
     279        orxout(internal_info, context::input) << "KeyBinder: Loading key bindings done." << endl;
    280280    }
    281281
     
    294294        else
    295295        {
    296             COUT(2) << "Could not find key/button/axis with name '" << name << "'." << std::endl;
     296            orxout(internal_warning, context::input) << "Could not find key/button/axis with name '" << name << "'." << endl;
    297297            return false;
    298298        }
  • code/branches/output/src/libraries/core/input/KeyBinderManager.cc

    r8788 r8806  
    168168        if (!this->bBinding_)
    169169        {
    170             COUT(0) << "Press any button/key or move a mouse/joystick axis" << std::endl;
     170            orxout(message) << "Press any button/key or move a mouse/joystick axis" << endl;
    171171            KeyDetector::getInstance().setCallback(createFunctor(&KeyBinderManager::keybindKeyPressed, this));
    172172            InputManager::getInstance().enterState("detector");
     
    185185            if (keyName == "Keys.KeyEscape")
    186186            {
    187                 COUT(0) << "Keybinding aborted." << std::endl;
     187                orxout(message) << "Keybinding aborted." << endl;
    188188            }
    189189            else
    190190            {
    191                 COUT(0) << "Binding string \"" << command_ << "\" on key '" << keyName << "'" << std::endl;
     191                orxout(message) << "Binding string \"" << command_ << "\" on key '" << keyName << "'" << endl;
    192192                this->currentBinder_->setBinding(command_, keyName, bTemporary_);
    193193            }
  • code/branches/output/src/libraries/util/Sleep.cc

    r8804 r8806  
    4949    {
    5050        //if (microseconds < 1000)
    51         //    orxout(internal_warning) << "Warning: Windows cannot sleep less than 1ms, ignoring" << endl;
     51        //    orxout(internal_warning) << "Windows cannot sleep less than 1ms, ignoring" << endl;
    5252        Sleep(microseconds / 1000);
    5353    }
  • code/branches/output/src/libraries/util/SubString.cc

    r8804 r8806  
    513513    void SubString::debug() const
    514514    {
    515         orxout() << "Substring-information::count=" << this->tokens_.size() << " ::";
     515        orxout(debug_output) << "Substring-information::count=" << this->tokens_.size() << " ::";
    516516        for (unsigned int i = 0; i < this->tokens_.size(); ++i)
    517             orxout() << "s" << i << "='" << this->tokens_[i].c_str() << "'::";
    518         orxout() << endl;
     517            orxout(debug_output) << "s" << i << "='" << this->tokens_[i].c_str() << "'::";
     518        orxout(debug_output) << endl;
    519519    }
    520520}
  • code/branches/output/src/libraries/util/output/OutputDefinitions.h

    r8805 r8806  
    8888            REGISTER_OUTPUT_CONTEXT(events);
    8989            REGISTER_OUTPUT_CONTEXT(config);
     90            REGISTER_OUTPUT_CONTEXT(templates);
     91            REGISTER_OUTPUT_CONTEXT(loader);
     92            REGISTER_OUTPUT_CONTEXT(xml);
    9093        }
    9194    }
Note: See TracChangeset for help on using the changeset viewer.