Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 13, 2009, 4:30:37 PM (15 years ago)
Author:
rgrieder
Message:

Tried to reduce dependencies in the core. There wasn't much to achieve though…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pch/src/core/XMLPort.h

    r3149 r3154  
    4444
    4545#include <cassert>
     46#include <string>
    4647#include <tinyxml/ticpp.h>
     48
    4749#include "util/Debug.h"
    4850#include "util/Exception.h"
     51#include "util/MultiType.h"
    4952#include "util/OrxAssert.h"
    50 #include "util/MultiType.h"
     53#include "Identifier.h"
     54#include "Executor.h"
     55#include "BaseObject.h"
    5156#include "XMLIncludes.h"
    52 #include "Executor.h"
    53 #include "CoreIncludes.h"
    54 #include "BaseObject.h"
    5557
    5658// ------------
     
    177179*/
    178180#define XMLPortParamGeneric(containername, classname, objectclass, object, paramname, loadexecutor, saveexecutor, xmlelement, mode) \
    179     orxonox::XMLPortClassParamContainer<objectclass>* containername = (orxonox::XMLPortClassParamContainer<objectclass>*)(ClassIdentifier<classname>::getIdentifier()->getXMLPortParamContainer(paramname)); \
     181    orxonox::XMLPortClassParamContainer<objectclass>* containername = static_cast<orxonox::XMLPortClassParamContainer<objectclass>*>(ClassIdentifier<classname>::getIdentifier()->getXMLPortParamContainer(paramname)); \
    180182    if (!containername) \
    181183    { \
     
    546548                            for (ticpp::Iterator<ticpp::Element> child = xmlsubelement->FirstChildElement(false); child != child.end(); child++)
    547549                            {
    548                                 Identifier* identifier = ClassByString(child->Value());
     550                                Identifier* identifier = Factory::getIdentifier(child->Value());
    549551                                if (identifier)
    550552                                {
    551                                     if (identifier->isA(Class(O)))
     553                                    if (identifier->isA(ClassIdentifier<O>::getIdentifier()))
    552554                                    {
    553555                                        if (identifier->isLoadable())
     
    607609                                    else
    608610                                    {
    609                                         COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << Class(O)->getName() << "'." << std::endl;
     611                                        COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << ClassIdentifier<O>::getIdentifier()->getName() << "'." << std::endl;
    610612                                    }
    611613                                }
     
    627629                    {
    628630                        COUT(1) << std::endl;
    629                         COUT(1) << "An error occurred in XMLPort.h while loading a '" << Class(O)->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << object->getName() << ") in " << object->getFilename() << ":" << std::endl;
     631                        COUT(1) << "An error occurred in XMLPort.h while loading a '" << ClassIdentifier<O>::getIdentifier()->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << object->getName() << ") in " << object->getFilename() << ":" << std::endl;
    630632                        COUT(1) << ex.what() << std::endl;
    631633                    }
Note: See TracChangeset for help on using the changeset viewer.