Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 31, 2011, 5:15:13 PM (14 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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        }
Note: See TracChangeset for help on using the changeset viewer.