Index: sandbox_qt/src/libraries/core/BaseObject.cc
===================================================================
--- sandbox_qt/src/libraries/core/BaseObject.cc	(revision 7418)
+++ 	(revision )
@@ -1,491 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Implementation of the BaseObject class.
-*/
-
-#include "BaseObject.h"
-
-#include <tinyxml/tinyxml.h>
-
-#include "CoreIncludes.h"
-#include "Event.h"
-#include "EventIncludes.h"
-#include "Iterator.h"
-#include "Template.h"
-#include "XMLFile.h"
-#include "XMLNameListener.h"
-#include "XMLPort.h"
-#include "command/Functor.h"
-
-namespace orxonox
-{
-    CreateFactory(BaseObject);
-
-    /**
-        @brief Constructor: Registers the object in the BaseObject-list.
-    */
-    BaseObject::BaseObject(BaseObject* creator) : bInitialized_(false)
-    {
-        RegisterRootObject(BaseObject);
-
-        this->bInitialized_ = true;
-
-        this->bActive_ = true;
-        this->bVisible_ = true;
-        this->oldGametype_ = 0;
-        this->bRegisteredEventStates_ = false;
-
-        this->lastLoadedXMLElement_ = 0;
-
-        this->mainStateFunctor_ = 0;
-
-        this->setCreator(creator);
-        if (this->creator_)
-        {
-            this->setFile(this->creator_->getFile());
-            this->setNamespace(this->creator_->getNamespace());
-            this->setScene(this->creator_->getScene(), this->creator_->getSceneID());
-            this->setGametype(this->creator_->getGametype());
-            this->setLevel(this->creator_->getLevel());
-        }
-        else
-        {
-            this->file_ = 0;
-            this->namespace_ = 0;
-            this->scene_ = 0;
-            this->sceneID_ = OBJECTID_UNKNOWN;
-            this->gametype_ = 0;
-            this->level_ = 0;
-        }
-    }
-
-    /**
-        @brief Destructor
-    */
-    BaseObject::~BaseObject()
-    {
-        if (this->isInitialized())
-        {
-            for (std::map<BaseObject*, std::string>::const_iterator it = this->eventSources_.begin(); it != this->eventSources_.end(); )
-                this->removeEventSource((it++)->first);
-
-            for (std::set<BaseObject*>::const_iterator it = this->eventListeners_.begin(); it != this->eventListeners_.end(); )
-                (*(it++))->removeEventSource(this);
-
-            for (std::map<std::string, EventState*>::const_iterator it = this->eventStates_.begin(); it != this->eventStates_.end(); ++it)
-                delete it->second;
-        }
-    }
-
-    /** @brief Adds an object which listens to the events of this object. */
-    void BaseObject::registerEventListener(BaseObject* object)
-    {
-        COUT(4) << "New EventListener: " << object->getIdentifier()->getName() << " &(" << object << ")." << std::endl;
-        this->eventListeners_.insert(object);
-    }
-
-    /**
-        @brief XML loading and saving.
-        @param xmlelement The XML-element
-        @param mode The mode defines the operation that is being executed: loading or saving the object (from or to XML respectively)
-    */
-    void BaseObject::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        XMLPortParam(BaseObject, "name", setXMLName, getName, xmlelement, mode);
-        XMLPortParam(BaseObject, "visible", setVisible, isVisible, xmlelement, mode);
-        XMLPortParam(BaseObject, "active", setActive, isActive, xmlelement, mode);
-        XMLPortParam(BaseObject, "mainstate", setMainStateName, getMainStateName, xmlelement, mode);
-        XMLPortParamTemplate(BaseObject, "template", addTemplate, getSingleTemplate, xmlelement, mode, const std::string&);
-
-        XMLPortObjectTemplate(BaseObject, Template, "templates", addTemplate, getTemplate, xmlelement, mode, Template*);
-        XMLPortObject(BaseObject, BaseObject, "eventlisteners", addEventListener, getEventListener, xmlelement, mode);
-
-        Element* events = 0;
-        if (mode == XMLPort::LoadObject || mode == XMLPort::ExpandObject)
-            events = xmlelement.FirstChildElement("events", false);
-        else if (mode == XMLPort::SaveObject)
-            {}
-        if (events)
-            this->XMLEventPort(*events, mode);
-    }
-
-    /**
-        @brief Defines the possible event states of this object and parses eventsources from an XML file.
-        @param xmlelement The XML-element
-        @param mode The mode defines the operation that is being executed: loading or saving the object (from or to XML respectively)
-    */
-    void BaseObject::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        XMLPortEventState(BaseObject, BaseObject, "activity", setActive, xmlelement, mode);
-        XMLPortEventState(BaseObject, BaseObject, "visibility", setVisible, xmlelement, mode);
-        XMLPortEventState(BaseObject, BaseObject, "mainstate", setMainState, xmlelement, mode);
-
-        this->bRegisteredEventStates_ = true;
-    }
-
-    /**
-        @brief Loads the name of the object through XML and calls all XMLNameListener.
-        @param name The name of the object
-    */
-    void BaseObject::setXMLName(const std::string& name)
-    {
-        this->setName(name);
-
-        for (ObjectList<XMLNameListener>::iterator it = ObjectList<XMLNameListener>::begin(); it != ObjectList<XMLNameListener>::end(); ++it)
-            it->loadedNewXMLName(this);
-    }
-
-    /**
-        @brief Returns the levelfile that loaded this object.
-        @return The levelfile
-    */
-    const std::string& BaseObject::getFilename() const
-    {
-        if (this->file_)
-            return this->file_->getFilename();
-        else
-            return BLANKSTRING;
-    }
-
-    /**
-        @brief Adds a Template to the object.
-        @param name The name of the Template
-    */
-    void BaseObject::addTemplate(const std::string& name)
-    {
-        Template* temp = Template::getTemplate(name);
-        if (temp)
-            this->addTemplate(temp);
-        else
-            COUT(1) << "Error: \"" << name << "\" is not a valid Template name (in class: " << this->getIdentifier()->getName() << ", name: " << this->getName() << ")." << std::endl;
-    }
-
-    /**
-        @brief Adds a Template to the object.
-        @param temp The Template
-    */
-    void BaseObject::addTemplate(Template* temp)
-    {
-        this->templates_.insert(temp);
-        if( temp->isLink() )
-        {
-          this->networkTemplateNames_.insert(temp->getLink());
-          assert( !Template::getTemplate(temp->getLink())->isLink() );
-        }
-        else
-          this->networkTemplateNames_.insert(temp->getName());
-        temp->applyOn(this);
-    }
-
-    /**
-        @brief Returns the name of the first Template.
-        @return The name as string.
-    */
-    const std::string& BaseObject::getSingleTemplate(void) const
-    {
-        if(this->templates_.empty())
-            return BLANKSTRING;
-
-        return (*this->templates_.begin())->getName();
-    }
-
-    /**
-        @brief Returns the Template with the given index.
-        @param index The index
-    */
-    Template* BaseObject::getTemplate(unsigned int index) const
-    {
-        unsigned int i = 0;
-        for (std::set<Template*>::const_iterator it = this->templates_.begin(); it != this->templates_.end(); ++it)
-        {
-            if (i == index)
-                return (*it);
-            i++;
-        }
-        return 0;
-    }
-
-    /**
-        @brief Adds a new event source for a specific state.
-        @param source The object which sends events to this object
-        @param state The state of this object which will be affected by the events
-    */
-    void BaseObject::addEventSource(BaseObject* source, const std::string& state)
-    {
-        this->eventSources_[source] = state;
-        source->registerEventListener(this);
-    }
-
-    /**
-        @brief Removes an eventsource (but doesn't unregister itself at the source).
-    */
-    void BaseObject::removeEventSource(BaseObject* source)
-    {
-        this->eventSources_.erase(source);
-        source->unregisterEventListener(this);
-    }
-
-    /**
-        @brief Returns an eventsource with a given index.
-    */
-    BaseObject* BaseObject::getEventSource(unsigned int index, const std::string& state) const
-    {
-        unsigned int i = 0;
-        for (std::map<BaseObject*, std::string>::const_iterator it = this->eventSources_.begin(); it != this->eventSources_.end(); ++it)
-        {
-            if (it->second != state)
-                continue;
-
-            if (i == index)
-                return it->first;
-            ++i;
-        }
-        return 0;
-    }
-
-    /**
-        @brief Adds an object which listens to the events of this object. The events are sent to the other objects mainstate.
-    */
-    void BaseObject::addEventListener(BaseObject* listener)
-    {
-        this->eventListenersXML_.insert(listener);
-        listener->addEventSource(this, "mainstate");
-    }
-
-    /**
-        @brief Returns an event listener with a given index.
-    */
-    BaseObject* BaseObject::getEventListener(unsigned int index) const
-    {
-        unsigned int i = 0;
-        for (std::set<BaseObject*>::const_iterator it = this->eventListenersXML_.begin(); it != this->eventListenersXML_.end(); ++it)
-        {
-            if (i == index)
-                return *it;
-            ++i;
-        }
-        return 0;
-    }
-
-    /**
-        @brief Adds a new event-state to the object. Event-states are states which can be changed by events.
-        @param name  The name of the event
-        @param state The object containing information about the event-state
-    */
-    void BaseObject::addEventState(const std::string& name, EventState* state)
-    {
-        std::map<std::string, EventState*>::const_iterator it = this->eventStates_.find(name);
-        if (it != this->eventStates_.end())
-        {
-            COUT(2) << "Warning: Overwriting EventState in class " << this->getIdentifier()->getName() << '.' << std::endl;
-            delete (it->second);
-        }
-
-        this->eventStates_[name] = state;
-    }
-
-    /**
-        @brief Returns the event-state with the given name.
-    */
-    EventState* BaseObject::getEventState(const std::string& name) const
-    {
-        std::map<std::string, EventState*>::const_iterator it = this->eventStates_.find(name);
-        if (it != this->eventStates_.end())
-            return (it->second);
-        else
-            return 0;
-    }
-
-    /**
-        @brief Fires an event (without a state).
-    */
-    void BaseObject::fireEvent(const std::string& name)
-    {
-        this->fireEvent(true, name);
-        this->fireEvent(false, name);
-    }
-
-    /**
-        @brief Fires an event which activates or deactivates a state.
-    */
-    void BaseObject::fireEvent(bool activate, const std::string& name)
-    {
-        this->fireEvent(activate, this, name);
-    }
-
-    /**
-        @brief Fires an event which activates or deactivates a state with agiven originator (the object which triggered the event).
-    */
-    void BaseObject::fireEvent(bool activate, BaseObject* originator, const std::string& name)
-    {
-        Event event(activate, originator, name);
-
-        for (std::set<BaseObject*>::iterator it = this->eventListeners_.begin(); it != this->eventListeners_.end(); ++it)
-        {
-            event.statename_ = (*it)->eventSources_[this];
-            (*it)->processEvent(event);
-        }
-    }
-
-    /**
-        @brief Fires an event, using the Event struct.
-    */
-    void BaseObject::fireEvent(Event& event)
-    {
-        for (std::set<BaseObject*>::iterator it = this->eventListeners_.begin(); it != this->eventListeners_.end(); ++it)
-            (*it)->processEvent(event);
-    }
-
-    /**
-        @brief Processing an event by calling the right main state.
-        @param event The event struct which contains the information about the event
-    */
-    void BaseObject::processEvent(Event& event)
-    {
-        this->registerEventStates();
-
-        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;
-
-        std::map<std::string, EventState*>::const_iterator it = this->eventStates_.find(event.statename_);
-        if (it != this->eventStates_.end())
-            it->second->process(event, this);
-        else if (!event.statename_.empty())
-            COUT(2) << "Warning: \"" << event.statename_ << "\" is not a valid state in object \"" << this->getName() << "\" of class " << this->getIdentifier()->getName() << "." << std::endl;
-        else
-            COUT(2) << "Warning: Event with invalid source sent to object \"" << this->getName() << "\" of class " << this->getIdentifier()->getName() << "." << std::endl;
-    }
-
-    /**
-        @brief Sets the main state of the object to a given boolean value.
-
-        Note: The main state of an object can be set with the @ref setMainStateName function.
-        It's part of the eventsystem and used for event forwarding (when the target object can't specify a specific state,
-        the main state is used by default).
-    */
-    void BaseObject::setMainState(bool state)
-    {
-        if (this->mainStateFunctor_)
-        {
-            if (this->mainStateFunctor_->getParamCount() == 0)
-            {
-                if (state)
-                    (*this->mainStateFunctor_)();
-            }
-            else
-            {
-                (*this->mainStateFunctor_)(state);
-            }
-        }
-        else
-            COUT(2) << "Warning: No MainState defined in object \"" << this->getName() << "\" (" << this->getIdentifier()->getName() << ")" << std::endl;
-    }
-
-    /**
-        @brief This function gets called if the main state name of the object changes.
-    */
-    void BaseObject::changedMainStateName()
-    {
-        this->mainStateFunctor_ = 0;
-
-        if (!this->mainStateName_.empty())
-        {
-            this->registerEventStates();
-
-            std::map<std::string, EventState*>::const_iterator it = this->eventStates_.find(this->mainStateName_);
-            if (it != this->eventStates_.end() && it->second->getFunctor())
-            {
-                if (it->second->getFunctor()->getParamCount() <= 1)
-                    this->mainStateFunctor_ = it->second->getFunctor();
-                else
-                    COUT(2) << "Warning: Can't use \"" << this->mainStateName_ << "\" as MainState because it needs a second argument." << std::endl;
-            }
-            else
-                COUT(2) << "Warning: \"" << this->mainStateName_ << "\" is not a valid MainState." << std::endl;
-        }
-    }
-
-    /**
-        @brief Calls XMLEventPort with an empty XML-element to register the event states if necessary.
-    */
-    void BaseObject::registerEventStates()
-    {
-        if (!this->bRegisteredEventStates_)
-        {
-            Element xmlelement;
-            this->XMLEventPort(xmlelement, XMLPort::NOP);
-        }
-    }
-
-    /**
-        @brief Manually loads all event states, even if the class doesn't officially support them. This is needed by some classes like @ref EventDispatcher or @ref EventTarget.
-    */
-    void BaseObject::loadAllEventStates(Element& xmlelement, XMLPort::Mode mode, BaseObject* object, Identifier* identifier)
-    {
-        Element* events = xmlelement.FirstChildElement("events", false);
-        if (events)
-        {
-            // get the list of all states present
-            std::list<std::string> eventnames;
-            if (mode == XMLPort::LoadObject || mode == XMLPort::ExpandObject)
-            {
-                for (ticpp::Iterator<ticpp::Element> child = events->FirstChildElement(false); child != child.end(); child++)
-                    eventnames.push_back(child->Value());
-            }
-            else if (mode == XMLPort::SaveObject)
-            {
-            }
-
-            // iterate through all states and get the event sources
-            for (std::list<std::string>::iterator it = eventnames.begin(); it != eventnames.end(); ++it)
-            {
-                const std::string& statename = (*it);
-
-                // if the event state is already known, continue with the next state
-                orxonox::EventState* eventstate = object->getEventState(statename);
-                if (eventstate)
-                    continue;
-
-                XMLPortClassObjectContainer<BaseObject, BaseObject>* container = (XMLPortClassObjectContainer<BaseObject, BaseObject>*)(identifier->getXMLPortObjectContainer(statename));
-                if (!container)
-                {
-                    const ExecutorMemberPtr<BaseObject>& setfunctor = createExecutor(createFunctor(&BaseObject::addEventSource), std::string( "BaseObject" ) + "::" + "addEventSource" + '(' + statename + ')');
-                    const ExecutorMemberPtr<BaseObject>& getfunctor = createExecutor(createFunctor(&BaseObject::getEventSource), std::string( "BaseObject" ) + "::" + "getEventSource" + '(' + statename + ')');
-                    setfunctor->setDefaultValue(1, statename);
-                    getfunctor->setDefaultValue(1, statename);
-
-                    container = new XMLPortClassObjectContainer<BaseObject, BaseObject>(statename, identifier, setfunctor, getfunctor, false, true);
-                    identifier->addXMLPortObjectContainer(statename, container);
-                }
-                container->port(object, *events, mode);
-            }
-        }
-    }
-}
Index: sandbox_qt/src/libraries/core/BaseObject.h
===================================================================
--- sandbox_qt/src/libraries/core/BaseObject.h	(revision 7418)
+++ 	(revision )
@@ -1,248 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @defgroup BaseObject BaseObject
-    @ingroup Core
-*/
-
-/**
-    @file
-    @ingroup BaseObject
-    @brief Declaration of BaseObject, the base class of all objects in Orxonox.
-
-    The BaseObject is the parent of all classes representing an instance in the game.
-*/
-
-#ifndef _BaseObject_H__
-#define _BaseObject_H__
-
-#include "CorePrereqs.h"
-
-#include <map>
-#include <list>
-
-#include "util/mbool.h"
-#include "OrxonoxClass.h"
-#include "Super.h"
-#include "SmartPtr.h"
-
-namespace orxonox
-{
-    class Scene;
-    class Gametype;
-    class Level;
-
-    /// The BaseObject is the parent of all classes representing an instance in the game.
-    class _CoreExport BaseObject : virtual public OrxonoxClass
-    {
-        template <class T> friend class XMLPortClassParamContainer;
-
-        public:
-            BaseObject(BaseObject* creator);
-            virtual ~BaseObject();
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
-
-            /** @brief Returns if the object was initialized (passed the object registration). @return True was the object is initialized */
-            inline bool isInitialized() const { return this->bInitialized_; }
-
-            /** @brief Sets the name of the object. @param name The name */
-            inline void setName(const std::string& name) { this->oldName_ = this->name_; this->name_ = name; this->changedName(); }
-            /** @brief Returns the name of the object. */
-            inline const std::string& getName() const { return this->name_; }
-            /** @brief Returns the old name of the object. */
-            inline const std::string& getOldName() const { return this->oldName_; }
-            /** @brief This function gets called if the name of the object changes. */
-            virtual void changedName() {}
-
-            /** @brief Sets the state of the objects activity. @param bActive True = active */
-            inline void setActive(bool bActive)
-            {
-                if (this->bActive_ != bActive)
-                {
-                    this->bActive_ = bActive;
-                    this->changedActivity();
-                }
-            }
-            /** @brief Returns the state of the objects activity. @return The state of the activity */
-            inline const mbool& isActive() const { return this->bActive_; }
-            /** @brief This function gets called if the activity of the object changes. */
-            virtual void changedActivity() {}
-
-            /** @brief Sets the state of the objects visibility. @param bVisible True = visible */
-            inline void setVisible(bool bVisible)
-            {
-                if (this->bVisible_ != bVisible)
-                {
-                    this->bVisible_ = bVisible;
-                    this->changedVisibility();
-                }
-            }
-            /** @brief Returns the state of the objects visibility. @return The state of the visibility */
-            inline const mbool& isVisible() const { return this->bVisible_; }
-            /** @brief This function gets called if the visibility of the object changes. */
-            virtual void changedVisibility() {}
-
-            void setMainState(bool state);
-
-            /** @brief Sets the name of the main state (used for event reactions). */
-            void setMainStateName(const std::string& name)
-            {
-                if (this->mainStateName_ != name)
-                {
-                    this->mainStateName_ = name;
-                    this->changedMainStateName();
-                }
-            }
-            /** @brief Returns the name of the main state. */
-            inline const std::string& getMainStateName() const { return this->mainStateName_; }
-            /** @brief This function gets called if the main state name of the object changes. */
-            virtual void changedMainStateName();
-
-            /** @brief Sets a pointer to the xml file that loaded this object. @param file The pointer to the XMLFile */
-            inline void setFile(const XMLFile* file) { this->file_ = file; }
-            /** @brief Returns a pointer to the XMLFile that loaded this object. @return The XMLFile */
-            inline const XMLFile* getFile() const { return this->file_; }
-            const std::string& getFilename() const;
-
-            void addTemplate(const std::string& name);
-            void addTemplate(Template* temp);
-            /** @brief Returns the set of all aplied templates. */
-            inline const std::set<Template*>& getTemplates() const
-                { return this->templates_; }
-
-            virtual inline void setNamespace(Namespace* ns) { this->namespace_ = ns; }
-            inline Namespace* getNamespace() const { return this->namespace_; }
-
-            inline void setCreator(BaseObject* creator) { this->creator_ = creator; }
-            inline BaseObject* getCreator() const { return this->creator_; }
-
-            inline void setScene(const SmartPtr<Scene>& scene, uint32_t sceneID) { this->scene_ = scene; this->sceneID_=sceneID; }
-            inline const SmartPtr<Scene>& getScene() const { return this->scene_; }
-            inline virtual uint32_t getSceneID() const { return this->sceneID_; }
-
-            inline void setGametype(const SmartPtr<Gametype>& gametype)
-            {
-                if (gametype != this->gametype_)
-                {
-                    this->oldGametype_ = this->gametype_;
-                    this->gametype_ = gametype;
-                    this->changedGametype();
-                }
-            }
-            inline const SmartPtr<Gametype>& getGametype() const { return this->gametype_; }
-            inline Gametype* getOldGametype() const { return this->oldGametype_; }
-            virtual void changedGametype() {}
-
-            inline void setLevel(const SmartPtr<Level>& level)
-            {
-                if (level != this->level_)
-                {
-                    this->level_ = level;
-                    this->changedLevel();
-                }
-            }
-            inline const SmartPtr<Level>& getLevel() const { return this->level_; }
-            virtual void changedLevel() {}
-
-            void addEventSource(BaseObject* source, const std::string& state);
-            void removeEventSource(BaseObject* source);
-            BaseObject* getEventSource(unsigned int index, const std::string& state) const;
-
-            void addEventListener(BaseObject* listener);
-            BaseObject* getEventListener(unsigned int index) const;
-
-            void fireEvent(const std::string& name = "");
-            void fireEvent(bool activate, const std::string& name = "");
-            void fireEvent(bool activate, BaseObject* originator, const std::string& name = "");
-            void fireEvent(Event& event);
-
-            virtual void processEvent(Event& event);
-
-            /** @brief Sets the indentation of the debug output in the Loader. @param indentation The indentation */
-            inline void setLoaderIndentation(const std::string& indentation) { this->loaderIndentation_ = indentation; }
-            /** @brief Returns the indentation of the debug output in the Loader. @return The indentation */
-            inline const std::string& getLoaderIndentation() const { return this->loaderIndentation_; }
-
-            static void loadAllEventStates(Element& xmlelement, XMLPort::Mode mode, BaseObject* object, Identifier* identifier);
-
-        protected:
-            void addEventState(const std::string& name, EventState* container);
-            EventState* getEventState(const std::string& name) const;
-
-            std::string             name_;                     //!< The name of the object
-            std::string             oldName_;                  //!< The old name of the object
-            mbool                   bActive_;                  //!< True = the object is active
-            mbool                   bVisible_;                 //!< True = the object is visible
-            std::string             mainStateName_;
-            FunctorPtr              mainStateFunctor_;
-            std::set<std::string>   networkTemplateNames_;
-
-        private:
-            /** @brief Adds an object which listens to the events of this object. */
-            void registerEventListener(BaseObject* object);
-            /** @brief Removes an event listener from this object. */
-            inline void unregisterEventListener(BaseObject* object)
-                { this->eventListeners_.erase(object); }
-
-            void setXMLName(const std::string& name);
-            const std::string& getSingleTemplate(void) const;
-            Template* getTemplate(unsigned int index) const;
-            void registerEventStates();
-
-            bool                   bInitialized_;              //!< True if the object was initialized (passed the object registration)
-            const XMLFile*         file_;                      //!< The XMLFile that loaded this object
-            Element*               lastLoadedXMLElement_;      //!< Non 0 if the TinyXML attributes have already been copied to our own lowercase map
-            std::map<std::string, std::string> xmlAttributes_; //!< Lowercase XML attributes
-            std::string            loaderIndentation_;         //!< Indentation of the debug output in the Loader
-            Namespace*             namespace_;
-            BaseObject*            creator_;
-            SmartPtr<Scene>        scene_;
-            uint32_t               sceneID_;
-            SmartPtr<Gametype>     gametype_;
-            Gametype*              oldGametype_;
-            SmartPtr<Level>        level_;
-            std::set<Template*>    templates_;
-
-            std::map<BaseObject*, std::string>  eventSources_;           //!< List of objects which send events to this object, mapped to the state which they affect
-            std::set<BaseObject*>               eventListeners_;         //!< List of objects which listen to the events of this object
-            std::set<BaseObject*>               eventListenersXML_;      //!< List of objects which listen to the events of this object through the "eventlisteners" subsection in XML
-            std::map<std::string, EventState*>  eventStates_;            //!< Maps the name of the event states to their helper objects
-            bool                                bRegisteredEventStates_; //!< Becomes true after the object registered its event states (with XMLEventPort)
-    };
-
-    SUPER_FUNCTION(0, BaseObject, XMLPort, false);
-    SUPER_FUNCTION(2, BaseObject, changedActivity, false);
-    SUPER_FUNCTION(3, BaseObject, changedVisibility, false);
-    SUPER_FUNCTION(4, BaseObject, XMLEventPort, false);
-    SUPER_FUNCTION(8, BaseObject, changedName, false);
-    SUPER_FUNCTION(9, BaseObject, changedGametype, false);
-}
-
-#endif /* _BaseObject_H__ */
Index: sandbox_qt/src/libraries/core/ClassFactory.h
===================================================================
--- sandbox_qt/src/libraries/core/ClassFactory.h	(revision 7418)
+++ 	(revision )
@@ -1,91 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup Object Factory
-    @brief Definition and implementation of the ClassFactory class
-
-    The ClassFactory is able to create new objects of a specific class which creates objects.
-*/
-
-#ifndef _ClassFactory_H__
-#define _ClassFactory_H__
-
-#include "CorePrereqs.h"
-
-#include <string>
-
-#include "util/Debug.h"
-#include "Identifier.h"
-
-namespace orxonox
-{
-    // ###########################
-    // ###       Factory       ###
-    // ###########################
-    /// Base-class of ClassFactory.
-    class _CoreExport Factory
-    {
-        public:
-            virtual ~Factory() {};
-            virtual BaseObject* fabricate(BaseObject* creator) = 0;
-    };
-
-    // ###############################
-    // ###      ClassFactory       ###
-    // ###############################
-    /// The ClassFactory is able to create new objects of a specific class.
-    template <class T>
-    class ClassFactory : public Factory
-    {
-        public:
-            /**
-                @brief Constructor: Adds the ClassFactory to the Identifier of the same type.
-                @param name The name of the class
-                @param bLoadable True if the class can be loaded through XML
-            */
-            ClassFactory(const std::string& name, bool bLoadable = true)
-            {
-                COUT(4) << "*** ClassFactory: Create entry for " << name << " in Factory." << std::endl;
-                ClassIdentifier<T>::getIdentifier(name)->addFactory(this);
-                ClassIdentifier<T>::getIdentifier()->setLoadable(bLoadable);
-            }
-
-            /**
-                @brief Creates and returns a new object of class T.
-                @return The new object
-            */
-            inline BaseObject* fabricate(BaseObject* creator)
-            {
-                return static_cast<BaseObject*>(new T(creator));
-            }
-    };
-}
-
-#endif /* _ClassFactory_H__ */
Index: sandbox_qt/src/libraries/core/ClassTreeMask.cc
===================================================================
--- sandbox_qt/src/libraries/core/ClassTreeMask.cc	(revision 7418)
+++ 	(revision )
@@ -1,963 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Implementation of the ClassTreeMask, ClassTreeMaskNode, and ClassTreeMaskIterator classes.
-*/
-
-#include "ClassTreeMask.h"
-#include "Identifier.h"
-
-namespace orxonox
-{
-    // ###############################
-    // ###    ClassTreeMaskNode    ###
-    // ###############################
-    /**
-        @brief Constructor: Creates the node, sets the subclass and the rule.
-        @param subclass The subclass the rule refers to
-        @param bIncluded The rule: included (true) or excluded (false)
-    */
-    ClassTreeMaskNode::ClassTreeMaskNode(const Identifier* subclass, bool bIncluded)
-    {
-        this->subclass_ = subclass;
-        this->bIncluded_ = bIncluded;
-    }
-
-    /**
-        @brief Destructor: Deletes all subnodes.
-    */
-    ClassTreeMaskNode::~ClassTreeMaskNode()
-    {
-        // Go through the list of all subnodes and delete them
-        this->deleteAllSubnodes();
-    }
-
-    /**
-        @brief Sets the rule for the node to "included".
-        @param overwrite True = overwrite previously added rules for inheriting classes
-    */
-    void ClassTreeMaskNode::include(bool overwrite)
-    {
-        this->setIncluded(true, overwrite);
-    }
-
-    /**
-        @brief Sets the rule for the node to "excluded".
-        @param overwrite True = overwrite previously added rules for inheriting classes
-    */
-    void ClassTreeMaskNode::exclude(bool overwrite)
-    {
-        this->setIncluded(false, overwrite);
-    }
-
-    /**
-        @brief Sets the rule for the node to a given value and erases all following rules.
-        @param bIncluded The rule: included (true) or excluded (false)
-        @param overwrite True = overwrite previously added rules for inheriting classes
-    */
-    void ClassTreeMaskNode::setIncluded(bool bIncluded, bool overwrite)
-    {
-        if (overwrite)
-            this->deleteAllSubnodes();
-
-        this->bIncluded_ = bIncluded;
-    }
-
-    /**
-        @brief Adds a new subnode to the list of subnodes.
-    */
-    void ClassTreeMaskNode::addSubnode(ClassTreeMaskNode* subnode)
-    {
-        this->subnodes_.insert(this->subnodes_.end(), subnode);
-    }
-
-    /**
-        @brief Deletes all subnodes of this node.
-    */
-    void ClassTreeMaskNode::deleteAllSubnodes()
-    {
-        // Go through the list of all subnodes and delete them
-        for (std::list<ClassTreeMaskNode*>::iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); )
-            delete (*(it++));
-
-        // Clear the list
-        this->subnodes_.clear();
-    }
-
-
-    // ###############################
-    // ###  ClassTreeMaskIterator  ###
-    // ###############################
-    /**
-        @brief Constructor: Initializes the iterator by creating a helper-list with the root-node and putting it to the stack.
-        @param node The root-node
-    */
-    ClassTreeMaskIterator::ClassTreeMaskIterator(ClassTreeMaskNode* node)
-    {
-        // Create a list and put the root-note into it
-        std::list<ClassTreeMaskNode*>::iterator it = this->rootlist_.insert(this->rootlist_.end(), node);
-
-        // Put the iterator to the only element of the list and the corresponding end()-iterator on the stack
-        this->nodes_.push(std::pair<std::list<ClassTreeMaskNode*>::iterator, std::list<ClassTreeMaskNode*>::iterator>(it, this->rootlist_.end()));
-    }
-
-    /**
-        @brief Destructor: Does nothing.
-    */
-    ClassTreeMaskIterator::~ClassTreeMaskIterator()
-    {
-    }
-
-    /**
-        @brief Iterates through the rule-tree.
-        @return A reference to the iterator itself
-    */
-    const ClassTreeMaskIterator& ClassTreeMaskIterator::operator++()
-    {
-        // Check if the actual node has subnodes
-        if ((*this->nodes_.top().first)->subnodes_.begin() != (*this->nodes_.top().first)->subnodes_.end())
-        {
-            // Yes it has: Push an iterator, pointing at the first subnode, on the stack
-            this->nodes_.push(std::pair<std::list<ClassTreeMaskNode*>::iterator, std::list<ClassTreeMaskNode*>::iterator>((*this->nodes_.top().first)->subnodes_.begin(), (*this->nodes_.top().first)->subnodes_.end()));
-        }
-        else
-        {
-            // No subnodes, meaning we reached a leaf: Go to the next node
-            do
-            {
-                // Iterate one step in the current list
-                ++this->nodes_.top().first;
-
-                // Check if we reached the end of the list (the second item in the stored pair always represents the end)
-                if (this->nodes_.top().first == this->nodes_.top().second)
-                {
-                    // Yes we've reached the end: Pop the list-iterator from the stack
-                    this->nodes_.pop();
-
-                    // Continue with the loop, meaning: Try to iterate through the previous list
-                    continue;
-                }
-
-                // If we reached this point, we aren't yet at the end of the list: Leave the loop
-                break;
-            } while (!this->nodes_.empty()); // Stop looping if the stack is empty, meaning: We've iterated to the end
-        }
-
-        // Finally return a reference to the iterator itself
-        return *this;
-    }
-
-    /**
-        @brief Returns a pointer to the ClassTreeMaskNode whereon the iterator points.
-    */
-    ClassTreeMaskNode* ClassTreeMaskIterator::operator*() const
-    {
-        return (*this->nodes_.top().first);
-    }
-
-    /**
-        @brief Returns a pointer to the ClassTreeMaskNode whereon the iterator points.
-    */
-    ClassTreeMaskNode* ClassTreeMaskIterator::operator->() const
-    {
-        return (*this->nodes_.top().first);
-    }
-
-    /**
-        @brief Returns true if the stack is empty, meaning we've reached the end of the tree.
-    */
-    ClassTreeMaskIterator::operator bool() const
-    {
-        return (!this->nodes_.empty());
-    }
-
-    /**
-        @brief Compares the current node with the given one and returns true if they match.
-    */
-    bool ClassTreeMaskIterator::operator==(ClassTreeMaskNode* compare) const
-    {
-        if (!this->nodes_.empty())
-            return ((*this->nodes_.top().first) == compare);
-        else
-            return (compare == 0);
-    }
-
-    /**
-        @brief Compares the current node with the given one and returns true if they don't match.
-    */
-    bool ClassTreeMaskIterator::operator!=(ClassTreeMaskNode* compare) const
-    {
-        if (!this->nodes_.empty())
-            return ((*this->nodes_.top().first) != compare);
-        else
-            return (compare != 0);
-    }
-
-
-    // ###############################
-    // ###      ClassTreeMask      ###
-    // ###############################
-    /**
-        @brief Constructor: Adds the root-node of the tree with the first rule ("include everything").
-    */
-    ClassTreeMask::ClassTreeMask()
-    {
-        this->root_ = new ClassTreeMaskNode(ClassIdentifier<BaseObject>::getIdentifier(), true);
-    }
-
-    /**
-        @brief Copy-constructor: Adds the root-node of the tree with the first rule ("include everything") and adds all rules from the other mask.
-    */
-    ClassTreeMask::ClassTreeMask(const ClassTreeMask& other)
-    {
-        this->root_ = new ClassTreeMaskNode(ClassIdentifier<BaseObject>::getIdentifier(), true);
-        for (ClassTreeMaskIterator it = other.root_; it; ++it)
-            this->add(it->getClass(), it->isIncluded(), false);
-    }
-
-    /**
-        @brief Destructor: Deletes the root node (which will delete all subnodes too).
-    */
-    ClassTreeMask::~ClassTreeMask()
-    {
-        delete this->root_;
-    }
-
-    /**
-        @brief Adds a new "include" rule for a given subclass to the mask.
-        @param subclass The subclass
-        @param overwrite True = overwrite previously added rules for inheriting classes
-        @param clean True = clean the tree after adding the new rule
-    */
-    void ClassTreeMask::include(const Identifier* subclass, bool overwrite, bool clean)
-    {
-        this->add(subclass, true, overwrite, clean);
-    }
-
-    /**
-        @brief Adds a new "exclude" rule for a given subclass to the mask.
-        @param subclass The subclass
-        @param overwrite True = overwrite previously added rules for inheriting classes
-        @param clean True = clean the tree after adding the new rule
-    */
-    void ClassTreeMask::exclude(const Identifier* subclass, bool overwrite, bool clean)
-    {
-        this->add(subclass, false, overwrite, clean);
-    }
-
-    /**
-        @brief Adds a new rule for a given subclass to the mask.
-        @param subclass The subclass
-        @param bInclude The rule: include (true) or exclude (false)
-        @param overwrite True = overwrite previously added rules for inheriting classes
-        @param clean True = clean the tree after adding the new rule
-    */
-    void ClassTreeMask::add(const Identifier* subclass, bool bInclude, bool overwrite, bool clean)
-    {
-        if (!subclass)
-            return;
-        // Check if the given subclass is a child of our root-class
-        if (subclass->isA(this->root_->getClass()))
-        {
-            // Yes it is: Just add the rule to the three
-            this->add(this->root_, subclass, bInclude, overwrite);
-        }
-        else
-        {
-            // No it's not: Search for classes inheriting from the given class and add the rules for them
-            for (std::set<const Identifier*>::const_iterator it = subclass->getDirectChildrenBegin(); it != subclass->getDirectChildrenEnd(); ++it)
-                if ((*it)->isA(this->root_->getClass()))
-                    if (overwrite || (!this->nodeExists(*it))) // If we don't want to overwrite, only add nodes that don't already exist
-                        this->add(this->root_, *it, bInclude, overwrite);
-        }
-
-        // Clean the rule-tree
-        if (clean)
-            this->clean();
-    }
-
-    /**
-        @brief Adds a new rule for a given subclass to a node of the internal rule-tree (recursive function).
-        @param node The node
-        @param subclass The subclass
-        @param bInclude The rule: include (true) or exclude (false)
-        @param overwrite True = overwrite previously added rules for inheriting classes
-    */
-    void ClassTreeMask::add(ClassTreeMaskNode* node, const Identifier* subclass, bool bInclude, bool overwrite)
-    {
-        if (!subclass)
-            return;
-        // Check if the current node contains exactly the subclass we want to add
-        if (subclass == node->getClass())
-        {
-            // We're at the right place, just change the mask and return
-            node->setIncluded(bInclude, overwrite);
-            return;
-        }
-        else if (subclass->isA(node->getClass()))
-        {
-            // Search for an already existing node, containing the subclass we want to add
-            for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); ++it)
-            {
-                if (subclass->isA((*it)->getClass()))
-                {
-                    // We've found an existing node -> delegate the work with a recursive function-call and return
-                    this->add(*it, subclass, bInclude, overwrite);
-                    return;
-                }
-            }
-
-            // There is no existing node satisfying our needs -> we create a new node
-            ClassTreeMaskNode* newnode = new ClassTreeMaskNode(subclass, bInclude);
-
-            // Search for nodes that should actually be subnodes of our new node and erase them
-            for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); )
-            {
-                if ((*it)->getClass()->isChildOf(subclass))
-                {
-                    // We've found a subnode: add it to the new node and erase it from the current node
-                    if (!overwrite)
-                        newnode->addSubnode(*it);
-                    else
-                        delete (*it);
-
-                    node->subnodes_.erase(it++);
-                }
-                else
-                {
-                    ++it;
-                }
-            }
-
-            // Finally add the new node as a subnode to the current node
-            node->addSubnode(newnode);
-        }
-    }
-
-    /**
-        @brief Adds a new "include" rule for a single subclass. The new rule doesn't change the mask for inheriting classes.
-        @param subclass The subclass
-        @param clean True = clean the tree after adding the new rule
-    */
-    void ClassTreeMask::includeSingle(const Identifier* subclass, bool clean)
-    {
-        this->addSingle(subclass, true, clean);
-    }
-
-    /**
-        @brief Adds a new "exclude" rule for a single subclass. The new rule doesn't change the mask for inheriting classes.
-        @param subclass The subclass
-        @param clean True = clean the tree after adding the new rule
-    */
-    void ClassTreeMask::excludeSingle(const Identifier* subclass, bool clean)
-    {
-        this->addSingle(subclass, false, clean);
-    }
-
-    /**
-        @brief Adds a new rule for a single subclass. The new rule doesn't change the mask for inheriting classes.
-        @param bInclude The rule: include (true) or exclude (false)
-        @param subclass The subclass
-        @param clean True = clean the tree after adding the new rule
-    */
-    void ClassTreeMask::addSingle(const Identifier* subclass, bool bInclude, bool clean)
-    {
-        if (!subclass)
-            return;
-        for (std::set<const Identifier*>::const_iterator it = subclass->getDirectChildrenBegin(); it != subclass->getDirectChildrenEnd(); ++it)
-            this->add(*it, this->isIncluded(*it), false, false);
-
-        this->add(subclass, bInclude, false, clean);
-    }
-
-    /**
-        @brief Resets the mask to "include everything".
-    */
-    void ClassTreeMask::reset()
-    {
-        delete this->root_;
-        this->root_ = new ClassTreeMaskNode(ClassIdentifier<BaseObject>::getIdentifier(), true);
-    }
-
-    /**
-        @brief Tells if a given subclass is included or not.
-        @param subclass The subclass
-        @return Included (true) or excluded (false)
-    */
-    bool ClassTreeMask::isIncluded(const Identifier* subclass) const
-    {
-        return this->isIncluded(this->root_, subclass);
-    }
-
-    /**
-        @brief Tells if a given subclass of a node in the rule-tree is included or not (recursive function).
-        @param node The node
-        @param subclass The subclass
-        @return Included (true) or excluded (false)
-    */
-    bool ClassTreeMask::isIncluded(ClassTreeMaskNode* node, const Identifier* subclass) const
-    {
-        if (!subclass)
-            return false;
-        // Check if the searched subclass is of the same type as the class in the current node or a derivative
-        if (subclass->isA(node->getClass()))
-        {
-            // Check for the special case
-            if (subclass == node->getClass())
-                return node->isIncluded();
-
-            // Go through the list of subnodes and look for a node containing the searched subclass and delegate the request by a recursive function-call.
-            for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); ++it)
-                if (subclass->isA((*it)->getClass()))
-                    return isIncluded(*it, subclass);
-
-            // There is no subnode containing our class -> the rule of the current node takes in effect
-            return node->isIncluded();
-        }
-        else
-        {
-            // The class is not included in the mask: return false
-            return false;
-        }
-    }
-
-    /**
-        @brief Tells if a given subclass is excluded or not.
-        @param subclass The subclass
-        @return The inverted rule: Excluded (true) or included (false)
-    */
-    bool ClassTreeMask::isExcluded(const Identifier* subclass) const
-    {
-        return (!this->isIncluded(subclass));
-    }
-
-    /**
-        @brief Removes all unneeded rules that don't change the information of the mask.
-    */
-    void ClassTreeMask::clean()
-    {
-        this->clean(this->root_);
-    }
-
-    /**
-        @brief Removes all unneded rules that don't change the information of a node of a mask (recursive function).
-        @param node The node
-    */
-    void ClassTreeMask::clean(ClassTreeMaskNode* node)
-    {
-        // Iterate through all subnodes of the given node
-        for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); )
-        {
-            // Recursive function-call: Clean the subnode
-            this->clean(*it);
-
-            // Now check if the subnode contains the same rule as the current node
-            if ((*it)->isIncluded() == node->isIncluded())
-            {
-                // It does: Move all subnodes of the redundant subnode to the current node
-                node->subnodes_.insert(node->subnodes_.end(), (*it)->subnodes_.begin(), (*it)->subnodes_.end());
-                (*it)->subnodes_.clear();
-
-                // Remove the redundant subnode from the current node
-                delete (*it);
-                node->subnodes_.erase(it++);
-            }
-            else
-            {
-                // The subnode is necessary: Move on to the next subnode
-                ++it;
-            }
-        }
-    }
-
-    /**
-        @brief Checks if a node for the given subclass exists.
-        @param subclass The Identifier of the subclass
-        @return True = the node exists
-    */
-    bool ClassTreeMask::nodeExists(const Identifier* subclass)
-    {
-        for (ClassTreeMaskIterator it = this->root_; it; ++it)
-            if ((*it)->getClass() == subclass)
-                return true;
-
-        return false;
-    }
-
-    /**
-        @brief Assignment operator: Adds all rules of the other mask.
-        @param other The other mask
-        @return A reference to the mask itself
-    */
-    ClassTreeMask& ClassTreeMask::operator=(const ClassTreeMask& other)
-    {
-        // Make a copy to avoid troubles with self-assignments (like A = A).
-        ClassTreeMask temp(other);
-
-        // Removes all current rules
-        this->reset();
-
-        // Copy all rules from the other mask
-        for (ClassTreeMaskIterator it = temp.root_; it; ++it)
-            this->add(it->getClass(), it->isIncluded(), false, false);
-
-        // Return a reference to the mask itself
-        return (*this);
-    }
-
-    /**
-        @brief Compares the mask with another mask and returns true if they represent the same logic.
-        @param other The other mask
-        @return True if both masks represent the same logic
-    */
-    bool ClassTreeMask::operator==(const ClassTreeMask& other) const
-    {
-        ClassTreeMask temp1 = other;
-        ClassTreeMask temp2 = (*this);
-
-        temp1.clean();
-        temp2.clean();
-
-        ClassTreeMaskIterator it1 = temp1.root_;
-        ClassTreeMaskIterator it2 = temp2.root_;
-
-        for ( ; it1 && it2; ++it1, ++it2)
-            if (it1->getClass() != it2->getClass())
-                return false;
-
-        return true;
-    }
-
-    /**
-        @brief Compares the mask with another mask and returns true if they represent different logics.
-        @param other The other mask
-        @return True if the masks represent different logics
-    */
-    bool ClassTreeMask::operator!=(const ClassTreeMask& other) const
-    {
-        return (!((*this) == other));
-    }
-
-    /**
-        @brief Prefix operator + does nothing.
-        @return A reference to the mask itself
-    */
-    const ClassTreeMask& ClassTreeMask::operator+() const
-    {
-        return (*this);
-    }
-
-    /**
-        @brief Prefix operator - inverts the mask.
-        @return The inverted mask
-    */
-    ClassTreeMask ClassTreeMask::operator-() const
-    {
-        return (!(*this));
-    }
-
-    /**
-        @brief Adds two masks in the sense of a union (all classes that are included in at least one of the masks will be included in the resulting mask too).
-        @param other The mask to unite with
-        @return The union
-    */
-    ClassTreeMask ClassTreeMask::operator+(const ClassTreeMask& other) const
-    {
-        // Create a new mask
-        ClassTreeMask newmask;
-
-        // Add all nodes from the first mask, calculate the rule with the or-operation
-        for (ClassTreeMaskIterator it = this->root_; it; ++it)
-        {
-            const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) or other.isIncluded(subclass), false, false);
-        }
-
-        // Add all nodes from the second mask, calculate the rule with the or-operation
-        for (ClassTreeMaskIterator it = other.root_; it; ++it)
-        {
-            const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) or other.isIncluded(subclass), false, false);
-        }
-
-        // Drop all redundant rules
-        newmask.clean();
-
-        // Return the new mask
-        return newmask;
-    }
-
-    /**
-        @brief Intersects two masks (only classes that are included in both masks will be included in the resulting mask too).
-        @param other The mask to intersect with
-        @return The intersection
-    */
-    ClassTreeMask ClassTreeMask::operator*(const ClassTreeMask& other) const
-    {
-        // Create a new mask
-        ClassTreeMask newmask;
-
-        // Add all nodes from the first mask, calculate the rule with the and-operation
-        for (ClassTreeMaskIterator it = this->root_; it; ++it)
-        {
-            const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) and other.isIncluded(subclass), false, false);
-        }
-
-        // Add all nodes from the second mask, calculate the rule with the and-operation
-        for (ClassTreeMaskIterator it = other.root_; it; ++it)
-        {
-            const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) and other.isIncluded(subclass), false, false);
-        }
-
-        // Drop all redundant rules
-        newmask.clean();
-
-        // Return the new mask
-        return newmask;
-    }
-
-    /**
-        @brief Removes all elements of the second mask from the first mask (all classes that are included in the first mask stay included, except those that are included in the second mask too).
-        @param other The mask to subtract.
-        @return The difference
-    */
-    ClassTreeMask ClassTreeMask::operator-(const ClassTreeMask& other) const
-    {
-        return ((*this) * (!other));
-    }
-
-    /**
-        @brief Inverts the mask (all included classes are now excluded and vice versa).
-        @return The complement
-    */
-    ClassTreeMask ClassTreeMask::operator!() const
-    {
-        // Create a new mask
-        ClassTreeMask newmask;
-
-        // Add all nodes from the other mask, inverting the rules
-        for (ClassTreeMaskIterator it = this->root_; it; ++it)
-        {
-            const Identifier* subclass = it->getClass();
-            newmask.add(subclass, !this->isIncluded(subclass), false, false);
-        }
-
-        // Return the new mask
-        return newmask;
-    }
-
-    /**
-        @brief Unites this mask with another mask.
-        @param other The other mask
-        @return A reference to the mask itself
-    */
-    const ClassTreeMask& ClassTreeMask::operator+=(const ClassTreeMask& other)
-    {
-        (*this) = (*this) + other;
-        return (*this);
-    }
-
-    /**
-        @brief Intersects this mask with another mask.
-        @param other The other mask
-        @return A reference to the mask itself
-    */
-    const ClassTreeMask& ClassTreeMask::operator*=(const ClassTreeMask& other)
-    {
-        (*this) = (*this) * other;
-        return (*this);
-    }
-
-    /**
-        @brief Subtracts another mask from this mask.
-        @param other The other mask
-        @return A reference to the mask itself
-    */
-    const ClassTreeMask& ClassTreeMask::operator-=(const ClassTreeMask& other)
-    {
-        (*this) = (*this) - other;
-        return (*this);
-    }
-
-    /**
-        @brief Intersects two masks (only classes that are included in both masks will be included in the resulting mask too).
-        @param other The mask to intersect with
-        @return The intersection
-    */
-    ClassTreeMask ClassTreeMask::operator&(const ClassTreeMask& other) const
-    {
-        return ((*this) * other);
-    }
-
-    /**
-        @brief Adds two masks in the sense of a union (all classes that are included in at least one of the masks will be included in the resulting mask too).
-        @param other The mask to unite with
-        @return The union
-    */
-    ClassTreeMask ClassTreeMask::operator|(const ClassTreeMask& other) const
-    {
-        return ((*this) + other);
-    }
-
-    /**
-        @brief Joins two masks in the sense of a xor (exclusivity) operation (all classes that are included in exactly one of the masks, but not in both, will be included in the resulting mask too).
-        @param other The mask to join with
-        @return The result
-    */
-    ClassTreeMask ClassTreeMask::operator^(const ClassTreeMask& other) const
-    {
-        // Create a new mask
-        ClassTreeMask newmask;
-
-        // Add all nodes from the first mask, calculate the rule with the xor-operation
-        for (ClassTreeMaskIterator it = this->root_; it; ++it)
-        {
-            const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) xor other.isIncluded(subclass), false, false);
-        }
-
-        // Add all nodes from the second mask, calculate the rule with the xor-operation
-        for (ClassTreeMaskIterator it = other.root_; it; ++it)
-        {
-            const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) xor other.isIncluded(subclass), false, false);
-        }
-
-        // Drop all redundant rules
-        newmask.clean();
-
-        // Return the new mask
-        return newmask;
-    }
-
-    /**
-        @brief Inverts the mask (all included classes are now excluded and vice versa).
-        @return The complement
-    */
-    ClassTreeMask ClassTreeMask::operator~() const
-    {
-        return (!(*this));
-    }
-
-    /**
-        @brief Intersects this mask with another mask (and-operation)
-        @param other The other mask
-        @return A reference to the mask itself
-    */
-    const ClassTreeMask& ClassTreeMask::operator&=(const ClassTreeMask& other)
-    {
-        (*this) = (*this) & other;
-        return (*this);
-    }
-
-    /**
-        @brief Unites this mask with another mask (or-operation).
-        @param other The other mask
-        @return A reference to the mask itself
-    */
-    const ClassTreeMask& ClassTreeMask::operator|=(const ClassTreeMask& other)
-    {
-        (*this) = (*this) | other;
-        return (*this);
-    }
-
-    /**
-        @brief Joins this mask with another mask with a xor-operation.
-        @param other The other mask
-        @return A reference to the mask itself
-    */
-    const ClassTreeMask& ClassTreeMask::operator^=(const ClassTreeMask& other)
-    {
-        (*this) = (*this) ^ other;
-        return (*this);
-    }
-
-    /**
-        @brief Converts the content of a mask into a human readable string and puts it on the ostream.
-        @param out The ostream
-        @param mask The mask
-        @return A reference to the ostream
-    */
-    std::ostream& operator<<(std::ostream& out, const ClassTreeMask& mask)
-    {
-        // Iterate through all rules
-        for (ClassTreeMaskIterator it = mask.root_; it; ++it)
-        {
-            // Calculate the prefix: + means included, - means excluded
-            if (it->isIncluded())
-                out << '+';
-            else
-                out << '-';
-
-            // Put the name of the corresponding class on the stream
-            out << it->getClass()->getName() << ' ';
-        }
-
-        return out;
-    }
-
-
-    // ###################################
-    // ### ClassTreeMaskObjectIterator ###
-    // ###################################
-    /**
-        @brief Initializes the iterator from a given ClassTreeMask.
-        @param mask The mask
-    */
-    ClassTreeMaskObjectIterator& ClassTreeMaskObjectIterator::operator=(const ClassTreeMask& mask)
-    {
-        // Clear everything, use a cleaned copy of the mask
-        this->subclasses_.clear();
-        ClassTreeMask temp = mask;
-        temp.clean();
-
-        // Create the subclass-list by going through the mask-tree, starting with the root-node
-        this->create(temp.root_);
-
-        // Move the subclass-iterator to the beginning of the subclass-list
-        this->subclassIterator_ = this->subclasses_.begin();
-
-        // If there is a first subclass, move the object-iterator to the first object of this class. Else go to the end
-        if (this->subclassIterator_ != this->subclasses_.end())
-            this->objectIterator_ = this->subclassIterator_->first->getObjects()->begin();
-        else
-            this->objectIterator_ = ObjectList<BaseObject>::end();
-
-        // Check if the iterator points on a valid object. If not, go to the next object by calling ++
-        if (!this->objectIterator_ || (this->subclassIterator_->second && !this->objectIterator_->isExactlyA(this->subclassIterator_->first)))
-            this->operator++();
-
-        return (*this);
-    }
-
-    /**
-        @brief Iterate to the next object (if any).
-        @return The iterator itself
-    */
-    const ClassTreeMaskObjectIterator& ClassTreeMaskObjectIterator::operator++()
-    {
-        if (this->objectIterator_)
-        {
-            // The iterator points on a valid object, therefore we also have a valid subclass-iterator at the moment
-            do
-            {
-                // Go to the next object
-                ++this->objectIterator_;
-
-                while (!this->objectIterator_)
-                {
-                    // We reached the end of the current objectlist - go to the next class
-                    ++this->subclassIterator_;
-
-                    // Check if there really is a next class. If yes, move the object-iterator to the first object
-                    if (this->subclassIterator_ != this->subclasses_.end())
-                        this->objectIterator_ = this->subclassIterator_->first->getObjects()->begin();
-                    else
-                        return (*this);
-                }
-
-            // Repeat this until we reach a valid object or the end
-            } while (this->subclassIterator_->second && !this->objectIterator_->isExactlyA(this->subclassIterator_->first));
-        }
-        return (*this);
-    }
-
-    /**
-        @brief Recursive function to create the Iterators subclass-list by going through the node-tree of the mask.
-        @param node The current node
-    */
-    void ClassTreeMaskObjectIterator::create(ClassTreeMaskNode* node)
-    {
-        // Add the class of this node to the list, if the class is included
-        if (node->isIncluded())
-        {
-            // If there are some subnodes, the bool is "true", meaning we have to check for the exact clss when iterating
-            if (node->hasSubnodes())
-                this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(node->getClass(), true));
-            else
-                this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(node->getClass(), false));
-        }
-
-        // Now check if the node has subnodes
-        if (node->hasSubnodes())
-        {
-            // Get all _direct_ children of the nodes class
-            std::set<const Identifier*> directChildren = node->getClass()->getDirectChildren();
-
-            // Iterate through all subnodes
-            for (std::list<ClassTreeMaskNode*>::iterator it1 = node->subnodes_.begin(); it1 != node->subnodes_.end(); ++it1)
-            {
-                // Recursive call to this function with the subnode
-                this->create(*it1);
-
-                // Only execute the following code if the current node is included, meaning some of the subnodes might be included too
-                if (node->isIncluded())
-                {
-                    scanChildren: // This is a label for goto
-
-                    // Iterate through all direct children
-                    for (std::set<const Identifier*>::iterator it2 = directChildren.begin(); it2 != directChildren.end(); ++it2)
-                    {
-                        // Check if the subnode (it1) is a child of the directChild (it2)
-                        if ((*it1)->getClass()->isA(*it2))
-                        {
-                            // Yes it is - remove the directChild (it2) from the list, because it will already be handled by a recursive call to the create() function
-                            directChildren.erase(it2);
-
-                            // Check if the removed directChild was exactly the subnode
-                            if (!(*it1)->getClass()->isExactlyA(*it2))
-                            {
-                                // No, it wasn't exactly the subnode - therefore there are some classes between
-
-                                // Add the previously removed directChild (it2) to the subclass-list
-                                this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(*it2, true));
-
-                                // Insert all directChildren of the directChild
-                                directChildren.insert((*it2)->getDirectChildrenBegin(), (*it2)->getDirectChildrenEnd());
-
-                                // Restart the scan with the expanded set of directChildren
-                                goto scanChildren;
-                            }
-                            break;
-                        }
-                    }
-                }
-            }
-
-            // Now add all directChildren which don't have subnodes on their own to the subclass-list
-            // The bool is "false", meaning they have no subnodes and therefore need no further checks
-            if (node->isIncluded())
-                for (std::set<const Identifier*>::iterator it = directChildren.begin(); it != directChildren.end(); ++it)
-                    this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(*it, false));
-        }
-    }
-}
Index: sandbox_qt/src/libraries/core/ClassTreeMask.h
===================================================================
--- sandbox_qt/src/libraries/core/ClassTreeMask.h	(revision 7418)
+++ 	(revision )
@@ -1,305 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup Class
-    @brief Declaration of the ClassTreeMask, ClassTreeMaskNode, and ClassTreeMaskIterator classes.
-
-    ClassTreeMask is a class to define a mask of the class-tree beginning with orxonox::BaseObject.
-    You can include or exclude classes by calling the corresponding functions with the
-    orxonox::Identifier of the class. This mask can then be used to filter out objects that
-    are instances of classes which aren't included in the tree, for example when Loading a
-    level file or if a Trigger should be triggered by only a few classes.
-
-    See the description of orxonox::ClassTreeMask for a short example.
-
-    You can work with a ClassTreeMask in the sense of the set-theory, meaning that you can create
-    unions, intersections, complements and differences by using overloaded operators.
-
-    @par Tree structure
-
-    The ClassTreeMask is internally represented by a tree. The nodes in the tree are
-    ClassTreeMaskNodes, containing the rule (included or excluded) for this class and all
-    subclasses and a list of all subnodes. To minimize the size, the tree contains only
-    nodes changing the mask. By adding new rules, the tree gets reordered dynamically.
-
-    Adding a new rule overwrites all rules assigned to inherited classes. Use <tt>overwrite = false</tt>
-    if you don't like this feature. Useless rules that don't change the information of the mask
-    aren't saved in the internal tree. Use <tt>clean = false</tt> if you still want to save them.
-
-    With <tt>overwrite = false</tt> and <tt>clean = false</tt> it doesn't matter in which order
-    you create the mask. You can manually drop useless rules from the tree by calling
-    @ref orxonox::ClassTreeMask::clean() "clean()".
-
-    @par Objects
-
-    To iterate through all objects of the classes that were included by a ClassTreeMask,
-    use orxonox::ClassTreeMaskObjectIterator. The description of this class also contains
-    a short example of how to use it.
-*/
-
-#ifndef _ClassTreeMask_H__
-#define _ClassTreeMask_H__
-
-#include "CorePrereqs.h"
-
-#include <list>
-#include <stack>
-#include "BaseObject.h"
-#include "Iterator.h"
-
-namespace orxonox
-{
-    // ###################################
-    // ###      ClassTreeMaskNode      ###
-    // ###################################
-    /**
-        @brief The ClassTreeMaskNode is a node in the internal tree of the ClassTreeMask, containing the rules of the mask.
-
-        The ClassTreeMaskNode is used to store the rule (included or excluded) for a given
-        class (described by the corresponding Identifier). The nodes are used in the internal
-        tree of ClassTreeMask. To build a tree, they store a list of all subnodes.
-    */
-    class _CoreExport ClassTreeMaskNode
-    {
-        friend class ClassTreeMask;
-        friend class ClassTreeMaskIterator;
-        friend class ClassTreeMaskObjectIterator;
-
-        public:
-            ClassTreeMaskNode(const Identifier* subclass, bool bIncluded = true);
-            ~ClassTreeMaskNode();
-
-            void include(bool overwrite = true);
-            void exclude(bool overwrite = true);
-            void setIncluded(bool bIncluded, bool overwrite = true);
-
-            void addSubnode(ClassTreeMaskNode* subnode);
-
-            /// Tells if the rule is "included" or not.
-            inline bool isIncluded() const { return this->bIncluded_; }
-            /// Tells if the rule is "excluded" or not.
-            inline bool isExcluded() const { return (!this->bIncluded_); }
-
-            /// Returns the Identifier of the class the rule refers to.
-            inline const Identifier* getClass() const { return this->subclass_; }
-
-            /// Returns true if the node has some subnodes.
-            inline bool hasSubnodes() const { return !this->subnodes_.empty(); }
-
-        private:
-            void deleteAllSubnodes();
-
-            const Identifier* subclass_;                ///< The Identifier of the subclass the rule refers to
-            bool bIncluded_;                            ///< The rule: included or excluded
-            std::list<ClassTreeMaskNode*> subnodes_;    ///< A list containing all subnodes of this node
-    };
-
-
-    // ###################################
-    // ###    ClassTreeMaskIterator    ###
-    // ###################################
-    /**
-        @brief The ClassTreeMaskIterator moves through all ClassTreeMaskNodes of the internal tree of a ClassTreeMask which contains the rules.
-
-        Because of the complicated shape of the internal rule-tree of ClassTreeMask, an
-        iterator is used to move through all nodes of the tree. It starts with the BaseObject
-        and moves on to the first subclass until it reaches a leaf of the tree. Then the
-        iterator moves one step back and iterates to the second subclass. If there are no more
-        subclasses, it steps another step back, and so on.
-
-        Example: A and B are children of BaseObject, A1 and A2 are children of A, B1 and B2 are children of B.
-        The ClassTreeMaskIterator would move trough the tree in the following order:
-        BaseObject, A, A1, A2, B, B1, B2.
-
-        Note that the iterator doesn't move trough the whole class-tree, but only through the
-        internal tree of the mask, containing the minimal needed set of nodes to describe the mask.
-    */
-    class _CoreExport ClassTreeMaskIterator
-    {
-        public:
-            ClassTreeMaskIterator(ClassTreeMaskNode* node);
-            ~ClassTreeMaskIterator();
-
-            const ClassTreeMaskIterator& operator++();
-            ClassTreeMaskNode* operator*() const;
-            ClassTreeMaskNode* operator->() const;
-            operator bool() const;
-            bool operator==(ClassTreeMaskNode* compare) const;
-            bool operator!=(ClassTreeMaskNode* compare) const;
-
-        private:
-            std::stack<std::pair<std::list<ClassTreeMaskNode*>::iterator, std::list<ClassTreeMaskNode*>::iterator> > nodes_;    ///< A stack to store list-iterators
-            std::list<ClassTreeMaskNode*> rootlist_;                                                                            ///< A list for internal use (it only stores the root-node)
-    };
-
-
-    // ###################################
-    // ###        ClassTreeMask        ###
-    // ###################################
-    /**
-        @brief The ClassTreeMask is a set of rules, containing the information for each class whether it's included or not.
-
-        With a ClassTreeMask, you can include or exclude subtrees of the class-tree, starting
-        with a given subclass, described by the corresponding Identifier. To minimize the size
-        of the mask, the mask saves only relevant rules. But you can manually add rules that
-        don't change the information of the mask by using <tt>clean = false</tt>. If you want to drop
-        useless rules, call the clean() function.
-
-        Example:
-        @code
-        ClassTreeMask mymask;
-        mymask.exclude(Class(A));
-        mymask.exclude(Class(B));
-        mymask.include(Class(ChildOfA));
-        @endcode
-
-        In this example, the classes A and B are excluded from the mask, but one of the child
-        classes of A is included again.
-    */
-    class _CoreExport ClassTreeMask
-    {
-        friend class ClassTreeMaskObjectIterator;
-
-        public:
-            ClassTreeMask();
-            ClassTreeMask(const ClassTreeMask& other);
-            ~ClassTreeMask();
-
-            void include(const Identifier* subclass, bool overwrite = true, bool clean = true);
-            void exclude(const Identifier* subclass, bool overwrite = true, bool clean = true);
-            void add(const Identifier* subclass, bool bInclude, bool overwrite = true, bool clean = true);
-
-            void includeSingle(const Identifier* subclass, bool clean = true);
-            void excludeSingle(const Identifier* subclass, bool clean = true);
-            void addSingle(const Identifier* subclass, bool bInclude, bool clean = true);
-
-            void reset();
-            void clean();
-
-            bool isIncluded(const Identifier* subclass) const;
-            bool isExcluded(const Identifier* subclass) const;
-
-            /// Begin of the ClassTreeMaskObjectIterator.
-            inline const ClassTreeMask& begin() const { return (*this); }
-            /// End of the ClassTreeMaskObjectIterator.
-            inline BaseObject*          end()   const { return 0; }
-
-            ClassTreeMask& operator=(const ClassTreeMask& other);
-
-            bool operator==(const ClassTreeMask& other) const;
-            bool operator!=(const ClassTreeMask& other) const;
-
-            const ClassTreeMask& operator+() const;
-            ClassTreeMask operator-() const;
-
-            ClassTreeMask operator+(const ClassTreeMask& other) const;
-            ClassTreeMask operator*(const ClassTreeMask& other) const;
-            ClassTreeMask operator-(const ClassTreeMask& other) const;
-            ClassTreeMask operator!() const;
-
-            const ClassTreeMask& operator+=(const ClassTreeMask& other);
-            const ClassTreeMask& operator*=(const ClassTreeMask& other);
-            const ClassTreeMask& operator-=(const ClassTreeMask& other);
-
-            ClassTreeMask operator&(const ClassTreeMask& other) const;
-            ClassTreeMask operator|(const ClassTreeMask& other) const;
-            ClassTreeMask operator^(const ClassTreeMask& other) const;
-            ClassTreeMask operator~() const;
-
-            const ClassTreeMask& operator&=(const ClassTreeMask& other);
-            const ClassTreeMask& operator|=(const ClassTreeMask& other);
-            const ClassTreeMask& operator^=(const ClassTreeMask& other);
-
-            friend std::ostream& operator<<(std::ostream& out, const ClassTreeMask& mask);
-
-        private:
-            void add(ClassTreeMaskNode* node, const Identifier* subclass, bool bInclude, bool overwrite = true);
-            bool isIncluded(ClassTreeMaskNode* node, const Identifier* subclass) const;
-            void clean(ClassTreeMaskNode* node);
-            bool nodeExists(const Identifier* subclass);
-
-            ClassTreeMaskNode* root_;   ///< The root-node of the internal rule-tree, usually BaseObject
-    };
-
-
-    // ###################################
-    // ### ClassTreeMaskObjectIterator ###
-    // ###################################
-    /**
-        @brief The ClassTreeMaskObjectIterator iterates through all objects of the classes that were included by a ClassTreeMask.
-
-        This is done the following way:
-        @code
-        ClassTreeMask mask;
-        for (ClassTreeMaskObjectIterator it = mask.begin(); it != mask.end(); ++it)
-            it->doSomething();
-        @endcode
-
-        @note The ClassTreeMaskObjectIterator handles all objects as BaseObjects. If
-              you want to use another class, you should use a dynamic_cast.
-
-        The performance of ClassTreeMaskObjectIterator is good as long as you don't exclude
-        subclasses of included classes. Of course you can still exlucde subclasses, but
-        if this is done more often, we need a new implementation using a second ObjectList
-        in the Identifier, containing all objects of exactly one class.
-    */
-    class _CoreExport ClassTreeMaskObjectIterator
-    {
-        public:
-            /// Default-constructor: Does nothing.
-            inline ClassTreeMaskObjectIterator() {}
-            /// Copy-Constructor: Initializes the iterator from another ClassTreeMask.
-            inline ClassTreeMaskObjectIterator(const ClassTreeMask& mask) { (*this) = mask; }
-
-            ClassTreeMaskObjectIterator& operator=(const ClassTreeMask& mask);
-
-            const ClassTreeMaskObjectIterator& operator++();
-
-            /// Returns true if the ClassTreeMaskObjectIterator points at the given object.
-            inline bool operator==(BaseObject* pointer) const { return (this->objectIterator_ && (*this->objectIterator_) == pointer) || (!this->objectIterator_ && pointer == 0); }
-            /// Returns true if the ClassTreeMaskObjectIterator doesn't point at the given object.
-            inline bool operator!=(BaseObject* pointer) const { return (this->objectIterator_ && (*this->objectIterator_) != pointer) || (!this->objectIterator_ && pointer != 0); }
-            /// Returns true if the ClassTreeMaskObjectIterator hasn't already reached the end.
-            inline operator bool() const { return (this->objectIterator_); }
-            /// Returns the object the ClassTreeMaskObjectIterator currently points at.
-            inline BaseObject* operator*() const { return (*this->objectIterator_); }
-            /// Returns the object the ClassTreeMaskObjectIterator currently points at.
-            inline BaseObject* operator->() const { return (*this->objectIterator_); }
-
-        private:
-            void create(ClassTreeMaskNode* node);
-
-            std::list<std::pair<const Identifier*, bool> >           subclasses_;       ///< A list of all Identifiers through which objects the iterator should iterate
-            std::list<std::pair<const Identifier*, bool> >::iterator subclassIterator_; ///< The current class of the iterator
-            Iterator<BaseObject>                                     objectIterator_;   ///< The current object of the iterator
-    };
-}
-
-#endif /* _ClassTreeMask_H__ */
Index: sandbox_qt/src/libraries/core/CommandLineParser.cc
===================================================================
--- sandbox_qt/src/libraries/core/CommandLineParser.cc	(revision 7418)
+++ 	(revision )
@@ -1,392 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "CommandLineParser.h"
-
-#include <algorithm>
-#include <sstream>
-
-#include "util/Convert.h"
-#include "util/Debug.h"
-#include "util/Exception.h"
-#include "util/StringUtils.h"
-#include "util/SubString.h"
-#include "PathConfig.h"
-
-namespace orxonox
-{
-    SetCommandLineOnlyArgument(optionsFile, "start.ini").shortcut("o");
-
-    /**
-    @brief
-        Parses a value string for a command line argument.
-        It simply uses convertValue(Output, Input) to do that.
-        Bools are treated specially. That is necessary
-        so that you can have simple command line switches.
-    */
-    void CommandLineArgument::parse(const std::string& value, bool bParsingFile)
-    {
-        if (bParsingFile && this->bCommandLineOnly_)
-            ThrowException(Argument, "Command line argument '" + getName() + "' is not allowed in files.");
-        if (value_.getType() == MT_Type::Bool)
-        {
-            // simulate command line switch
-            bool temp;
-            if (convertValue(&temp, value))
-            {
-                this->bHasDefaultValue_ = false;
-                this->value_ = temp;
-            }
-            else if (value.empty())
-            {
-                this->bHasDefaultValue_ = false;
-                this->value_ = true;
-            }
-            else
-                ThrowException(Argument, "Could not read command line argument '" + getName() + "'.");
-        }
-        else
-        {
-            if (!value_.setValue(value))
-            {
-                value_.setValue(defaultValue_);
-                ThrowException(Argument, "Could not read command line argument '" + getName() + "'.");
-            }
-            else
-                this->bHasDefaultValue_ = false;
-        }
-    }
-
-
-    /**
-    @brief
-        Destructor destroys all CommandLineArguments with it.
-    */
-    CommandLineParser::~CommandLineParser()
-    {
-        CommandLineParser::destroyAllArguments();
-    }
-
-    /**
-    @brief
-        Returns a unique instance (Meyers Singleton).
-    */
-    CommandLineParser& CommandLineParser::_getInstance()
-    {
-        static CommandLineParser instance;
-        return instance;
-    }
-
-    /**
-    @brief
-        Destroys all command line arguments. This should be called at the end
-        of main. Do not use before that.
-    */
-    void CommandLineParser::destroyAllArguments()
-    {
-        for (std::map<std::string, CommandLineArgument*>::const_iterator it = _getInstance().cmdLineArgs_.begin();
-            it != _getInstance().cmdLineArgs_.end(); ++it)
-            delete it->second;
-        _getInstance().cmdLineArgs_.clear();
-    }
-
-    /**
-    @brief
-        Reads the command line parses the values of each argument.
-        It is then stored in the corresponding CommandLineArgument.
-    @note
-        The reason that you have to provide the string to be parsed as
-        space separted list is because of argc and argv. If you only have
-        a whole string, simply use getAllStrings() of SubString.
-    @param arguments
-        Vector of space separated strings.
-    @param bParsingFile
-        Parsing a file or the command line itself
-    */
-    void CommandLineParser::_parse(const std::vector<std::string>& arguments, bool bParsingFile)
-    {
-        try
-        {
-            // why this? See bFirstTimeParse_ declaration.
-            if (bFirstTimeParse_)
-            {
-                // first shove all the shortcuts in a map
-                for (std::map<std::string, CommandLineArgument*>::const_iterator it = cmdLineArgs_.begin();
-                    it != cmdLineArgs_.end(); ++it)
-                {
-                    OrxAssert(cmdLineArgsShortcut_.find(it->second->getShortcut()) == cmdLineArgsShortcut_.end(),
-                        "Cannot have two command line shortcut with the same name.");
-                    if (!it->second->getShortcut().empty())
-                        cmdLineArgsShortcut_[it->second->getShortcut()] = it->second;
-                }
-                bFirstTimeParse_ = false;
-            }
-
-            std::string name;
-            std::string shortcut;
-            std::string value;
-            for (unsigned int i = 0; i < arguments.size(); ++i)
-            {
-                if (arguments[i].size() != 0)
-                {
-                    // sure not ""
-                    if (arguments[i][0] == '-')
-                    {
-                        // start with "-"
-                        if (arguments[i].size() == 1)
-                        {
-                            // argument[i] is "-", probably a minus sign
-                            value += "- ";
-                        }
-                        else if (arguments[i][1] <= 57 && arguments[i][1] >= 48)
-                        {
-                            // negative number as a value
-                            value += arguments[i] + ' ';
-                        }
-                        else
-                        {
-                            // can be shortcut or full name argument
-
-                            // save old data first
-                            value = removeTrailingWhitespaces(value);
-                            if (!name.empty())
-                            {
-                                checkFullArgument(name, value, bParsingFile);
-                                name.clear();
-                                assert(shortcut.empty());
-                            }
-                            else if (!shortcut.empty())
-                            {
-                                checkShortcut(shortcut, value, bParsingFile);
-                                shortcut.clear();
-                                assert(name.empty());
-                            }
-
-                            if (arguments[i][1] == '-')
-                            {
-                                // full name argument with "--name"
-                                name = arguments[i].substr(2);
-                            }
-                            else
-                            {
-                                // shortcut with "-s"
-                                shortcut = arguments[i].substr(1);
-                            }
-
-                            // reset value string
-                            value.clear();
-                        }
-                    }
-                    else
-                    {
-                        // value string
-
-                        if (name.empty() && shortcut.empty())
-                        {
-                            ThrowException(Argument, "Expected \"-\" or \"-\" in command line arguments.\n");
-                        }
-
-                        // Concatenate strings as long as there's no new argument by "-" or "--"
-                        value += arguments[i] + ' ';
-                    }
-                }
-            }
-
-            // parse last argument
-            value = removeTrailingWhitespaces(value);
-            if (!name.empty())
-            {
-                checkFullArgument(name, value, bParsingFile);
-                assert(shortcut.empty());
-            }
-            else if (!shortcut.empty())
-            {
-                checkShortcut(shortcut, value, bParsingFile);
-                assert(name.empty());
-            }
-        }
-        catch (const ArgumentException& ex)
-        {
-            COUT(0) << "Could not parse command line (including additional files): " << ex.what() << std::endl;
-            COUT(0) << CommandLineParser::getUsageInformation() << std::endl;
-            throw GeneralException("");
-        }
-    }
-
-    /**
-    @brief
-        Parses an argument based on its full name.
-    @param name
-        Full name of the argument
-    @param value
-        String containing the value
-    @param bParsingFile
-        Parsing a file or the command line itself
-    */
-    void CommandLineParser::checkFullArgument(const std::string& name, const std::string& value, bool bParsingFile)
-    {
-        std::map<std::string, CommandLineArgument*>::const_iterator it = cmdLineArgs_.find(name);
-        if (it == cmdLineArgs_.end())
-            ThrowException(Argument, "Command line argument '" + name + "' does not exist.");
-
-        it->second->parse(value, bParsingFile);
-    }
-
-    /**
-    @brief
-        Parses an argument based on its shortcut.
-    @param shortcut
-        Shortcut to the argument
-    @param value
-        String containing the value
-    @param bParsingFile
-        Parsing a file or the command line itself
-    */
-    void CommandLineParser::checkShortcut(const std::string& shortcut, const std::string& value, bool bParsingFile)
-    {
-        std::map<std::string, CommandLineArgument*>::const_iterator it = cmdLineArgsShortcut_.find(shortcut);
-        if (it == cmdLineArgsShortcut_.end())
-            ThrowException(Argument, "Command line shortcut '" + shortcut + "' does not exist.");
-
-        it->second->parse(value, bParsingFile);
-    }
-
-    std::string CommandLineParser::getUsageInformation()
-    {
-        CommandLineParser& inst = _getInstance();
-        std::ostringstream infoStr;
-
-        // determine maximum name size
-        size_t maxNameSize = 0;
-        for (std::map<std::string, CommandLineArgument*>::const_iterator it = inst.cmdLineArgs_.begin();
-            it != inst.cmdLineArgs_.end(); ++it)
-        {
-            maxNameSize = std::max(it->second->getName().size(), maxNameSize);
-        }
-
-        infoStr << std::endl;
-        infoStr << "Usage: orxonox [options]" << std::endl;
-        infoStr << "Available options:" << std::endl;
-
-        for (std::map<std::string, CommandLineArgument*>::const_iterator it = inst.cmdLineArgs_.begin();
-            it != inst.cmdLineArgs_.end(); ++it)
-        {
-            if (!it->second->getShortcut().empty())
-                infoStr << " [-" << it->second->getShortcut() << "] ";
-            else
-                infoStr << "      ";
-            infoStr << "--" << it->second->getName() << ' ';
-            if (it->second->getValue().getType() != MT_Type::Bool)
-                infoStr << "ARG ";
-            else
-                infoStr << "    ";
-            // fill with the necessary amount of blanks
-            infoStr << std::string(maxNameSize - it->second->getName().size(), ' ');
-            infoStr << ": " << it->second->getInformation();
-            infoStr << std::endl;
-        }
-        return infoStr.str();
-    }
-
-    void CommandLineParser::generateDoc(std::ofstream& file)
-    {
-        file << "/** @page cmdargspage Command Line Arguments Reference" << endl;
-        file << "    @verbatim"; /*no endl*/
-        file << getUsageInformation(); /*no endl*/
-        file << "    @endverbatim" << endl;
-        file << "*/" << endl;
-    }
-
-    /**
-    @brief
-        Retrieves a CommandLineArgument.
-        The method throws an exception if 'name' was not found or the value could not be converted.
-    @note
-        You should of course not call this method before the command line has been parsed.
-    */
-    const CommandLineArgument* CommandLineParser::getArgument(const std::string& name)
-    {
-        std::map<std::string, CommandLineArgument*>::const_iterator it = _getInstance().cmdLineArgs_.find(name);
-        if (it == _getInstance().cmdLineArgs_.end())
-        {
-            ThrowException(Argument, "Could find command line argument '" + name + "'.");
-        }
-        else
-        {
-            return it->second;
-        }
-    }
-
-    /**
-    @brief
-        Parses only the command line for CommandLineArguments.
-    */
-    void CommandLineParser::_parseCommandLine(const std::string& cmdLine)
-    {
-        std::vector<std::string> args;
-        SubString tokens(cmdLine, " ", " ", false, '\\', true, '"', true, '\0', '\0', false);
-        for (unsigned i = 0; i < tokens.size(); ++i)
-            args.push_back(tokens[i]);
-        this->_parse(args, false);
-    }
-
-    /**
-    @brief
-        Parses start.ini (or the file specified with --optionsFile) for CommandLineArguments.
-    */
-    void CommandLineParser::_parseFile()
-    {
-        const std::string& filename = CommandLineParser::getValue("optionsFile").getString();
-
-        // look for additional arguments in given file or start.ini as default
-        // They will not overwrite the arguments given directly
-        std::ifstream file;
-        file.open((PathConfig::getConfigPathString() + filename).c_str());
-        std::vector<std::string> args;
-        if (file)
-        {
-            while (!file.eof())
-            {
-                std::string line;
-                std::getline(file, line);
-                line = removeTrailingWhitespaces(line);
-                //if (!(line[0] == '#' || line[0] == '%'))
-                //{
-                SubString tokens(line, " ", " ", false, '\\', true, '"', true, '\0', '\0', false, '#');
-                for (unsigned i = 0; i < tokens.size(); ++i)
-                    if (tokens[i][0] != '#')
-                        args.push_back(tokens[i]);
-                //args.insert(args.end(), tokens.getAllStrings().begin(), tokens.getAllStrings().end());
-                //}
-            }
-            file.close();
-        }
-
-        _parse(args, true);
-    }
-}
Index: sandbox_qt/src/libraries/core/CommandLineParser.h
===================================================================
--- sandbox_qt/src/libraries/core/CommandLineParser.h	(revision 7418)
+++ 	(revision )
@@ -1,240 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @defgroup CmdArgs Commandline arguments
-    @ingroup Config
-    @brief For a reference of all commandline arguments see @ref cmdargspage
-*/
-
-/**
-    @file
-    @ingroup Config CmdArgs
-    @brief Declaration of CommandLineParser and CommandLineArgument, definition of the SetCommandLineArgument() macros.
-*/
-
-#ifndef _CommandLine_H__
-#define _CommandLine_H__
-
-#include "CorePrereqs.h"
-
-#include <fstream>
-#include <map>
-#include "util/OrxAssert.h"
-#include "util/MultiType.h"
-
-#define SetCommandLineArgument(name, defaultValue) \
-    orxonox::CommandLineArgument& CmdArgumentDummyBoolVar##name \
-    = orxonox::CommandLineParser::addArgument(#name, defaultValue, false)
-#define SetCommandLineOnlyArgument(name, defaultValue) \
-    orxonox::CommandLineArgument& CmdArgumentDummyBoolVar##name \
-    = orxonox::CommandLineParser::addArgument(#name, defaultValue, true)
-#define SetCommandLineSwitch(name) \
-    orxonox::CommandLineArgument& CmdArgumentDummyBoolVar##name \
-    = orxonox::CommandLineParser::addArgument(#name, false, false)
-#define SetCommandLineOnlySwitch(name) \
-    orxonox::CommandLineArgument& CmdArgumentDummyBoolVar##name \
-    = orxonox::CommandLineParser::addArgument(#name, false, true)
-
-
-namespace orxonox
-{
-    /**
-    @brief
-        Container class for a command line argument of any type supported by MultiType.
-
-        Whenever you want to have an option specified by a command line switch,
-        you need to first define it with SetCommandLineArgument(name, defaultValue).
-        It is then added to a map and possibly changed when the command line is being parsed.
-        If the option was not given, you can detect this by asking hasDefaultValue().
-
-        There is a possibility to define a short cut so you can write "-p 20" instead of "--port 20".
-        Note the difference between "-" and "--"!
-        Also, there is no restriction to the number of strings you add after --name.
-        So "--startVector {2, 4, 5}" is perfectly legal.
-
-        Retrieving an argument is possible with the getCommandLineArgument function of the
-        CommandLineParser class. It is a Singleton, but the public interface is static.
-    */
-    class _CoreExport CommandLineArgument
-    {
-        friend class CommandLineParser;
-
-    public:
-        //! Tells whether the value has been changed by the command line.
-        bool hasDefaultValue() const { return bHasDefaultValue_; }
-        //! Returns the name of the argument.
-        const std::string& getName() const { return name_; }
-
-        //! Returns the shortcut (example: "-p 22" for "--port 22") of the argument.
-        //! Evaluates to "" if there is none.
-        const std::string& getShortcut() const { return shortcut_; }
-        //! Sets the shortcut for the argument
-        CommandLineArgument& shortcut(const std::string& shortcut)
-        { this->shortcut_ = shortcut; return *this; }
-
-        //! Returns the usage information
-        const std::string& getInformation() const { return this->usageInformation_; }
-        //! Sets the option information when displaying orxonox usage.
-        CommandLineArgument& information(const std::string& usage)
-        { this->usageInformation_ = usage; return *this; }
-
-        //! Returns the actual value of the argument. Can be equal to default value.
-        MultiType getValue() const { return value_; }
-        //! Returns the given default value as type T.
-        MultiType getDefaultValue() const { return defaultValue_; }
-
-    private:
-        //! Constructor initialises both value_ and defaultValue_ with defaultValue.
-        CommandLineArgument(const std::string& name, const MultiType& defaultValue, bool bCommandLineOnly)
-            : bHasDefaultValue_(true)
-            , name_(name)
-            , value_(defaultValue)
-            , defaultValue_(defaultValue)
-            , bCommandLineOnly_(bCommandLineOnly)
-        { }
-
-        //! Undefined copy constructor
-        CommandLineArgument(const CommandLineArgument& instance);
-        ~CommandLineArgument() { }
-
-        //! Parses the value string of a command line argument.
-        void parse(const std::string& value, bool bParsingFile);
-
-        //! Tells whether the value has been changed by the command line.
-        bool bHasDefaultValue_;
-
-    private:
-        std::string name_;             //!< Name of the argument
-        std::string shortcut_;         //!< Shortcut of the argument. @see getShortcut().
-        std::string usageInformation_; //!< Tells about the usage of this parameter
-
-        MultiType   value_;            //!< The actual value
-        MultiType   defaultValue_;     //!< Default value. Should not be changed.
-        bool        bCommandLineOnly_; //!< Whether you cannot specify the value in a text file
-    };
-
-
-    /**
-    @brief
-        Global interface to command line options.
-        Allows to add and retrieve command line arguments. Also does the parsing.
-    @note
-        Internally it is a Singleton, but the public interface is static.
-    @see
-        CommandLineArgument
-    */
-    class _CoreExport CommandLineParser
-    {
-    public:
-
-        //! Parse redirection to internal member method.
-        static void parseCommandLine(const std::string& cmdLine) { _getInstance()._parseCommandLine(cmdLine); }
-        static void parseFile() { _getInstance()._parseFile(); }
-
-        static std::string getUsageInformation();
-
-        static const CommandLineArgument* getArgument(const std::string& name);
-        //! Writes the argument value in the given parameter.
-        template <class T>
-        static void getValue(const std::string& name, T* value)
-        { *value = (T)(getArgument(name)->getValue()); }
-        static MultiType getValue(const std::string& name)
-        { return getArgument(name)->getValue(); }
-        template <class T>
-        static CommandLineArgument& addArgument(const std::string& name, T defaultValue, bool bCommandLineOnly);
-
-        static bool existsArgument(const std::string& name)
-        {
-            std::map<std::string, CommandLineArgument*>::const_iterator it = _getInstance().cmdLineArgs_.find(name);
-            return !(it == _getInstance().cmdLineArgs_.end());
-        }
-
-        static void destroyAllArguments();
-
-        static void generateDoc(std::ofstream& file);
-
-    private:
-        //! Constructor initialises bFirstTimeParse_ with true.
-        CommandLineParser() : bFirstTimeParse_(true) { }
-        //! Undefined copy constructor
-        CommandLineParser(const CommandLineParser& instance);
-        ~CommandLineParser();
-
-        static CommandLineParser& _getInstance();
-
-        void _parseCommandLine(const std::string& cmdLine);
-        void _parseFile();
-        void _parse(const std::vector<std::string>& arguments, bool bParsingFile);
-        void checkFullArgument(const std::string& name, const std::string& value, bool bParsingFile);
-        void checkShortcut(const std::string& shortcut, const std::string& value, bool bParsingFile);
-
-        /**
-            Tells whether we parsed for the first time. The CommmandLineArguments are added before main().
-            So when we call parse() the first time, we need to create a map with all shortcuts since these
-            get added after addCommandLineArgument().
-        */
-        bool bFirstTimeParse_;
-
-        //! Holds all pointers to the arguments and serves as a search map by name.
-        std::map<std::string, CommandLineArgument*> cmdLineArgs_;
-        //! Search map by shortcut for the arguments.
-        std::map<std::string, CommandLineArgument*> cmdLineArgsShortcut_;
-    };
-
-    template <>
-    inline void CommandLineParser::getValue<std::string>(const std::string& name, std::string* value)
-    {
-        *value = getArgument(name)->getValue().getString();
-    }
-
-    /**
-    @brief
-        Adds a new CommandLineArgument to the internal map.
-        Note that only such arguments are actually valid.
-    @param name
-        Name of the argument. Shortcut can be added later.
-    @param defaultValue
-        Default value that is used when argument was not given.
-    @param bCommandLineOnly
-        Parsing a file or the command line itself
-    */
-    template <class T>
-    CommandLineArgument& CommandLineParser::addArgument(const std::string& name, T defaultValue, bool bCommandLineOnly)
-    {
-        OrxAssert(!_getInstance().existsArgument(name),
-            "Cannot add a command line argument with name '" + name + "' twice.");
-        OrxAssert(MultiType(defaultValue).getType() != MT_Type::Bool || MultiType(defaultValue).getBool() != true,
-               "Boolean command line arguments with positive default values are not supported." << std::endl
-            << "Please use SetCommandLineSwitch and adjust your argument: " << name);
-
-        return *(_getInstance().cmdLineArgs_[name] = new CommandLineArgument(name, defaultValue, bCommandLineOnly));
-    }
-}
-
-#endif /* _CommandLine_H__ */
Index: sandbox_qt/src/libraries/core/ConfigFileManager.cc
===================================================================
--- sandbox_qt/src/libraries/core/ConfigFileManager.cc	(revision 7418)
+++ 	(revision )
@@ -1,774 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Implementation of ConfigFileManager and its helper classes.
-*/
-
-#include "ConfigFileManager.h"
-
-#include <boost/filesystem.hpp>
-
-#include "util/Convert.h"
-#include "util/Math.h"
-#include "util/StringUtils.h"
-#include "ConfigValueContainer.h"
-#include "PathConfig.h"
-#include "command/ConsoleCommand.h"
-
-namespace orxonox
-{
-    //////////////////////////
-    // ConfigFileEntryValue //
-    //////////////////////////
-    /**
-        @brief Updates the string that will be stored in the file after one of it's components (name, value, comment) has changed.
-    */
-    void ConfigFileEntryValue::update()
-    {
-        // Make sure we remove the quotes when bString changes
-        if (this->bString_)
-            this->value_ = stripEnclosingQuotes(this->value_);
-        // Assemble the entry line
-        this->fileEntry_ = this->getKeyString() + " = ";
-        if (this->bString_ && !this->value_.empty())
-            this->fileEntry_ += '"' + addSlashes(this->value_) + '"';
-        else
-            this->fileEntry_ += this->value_;
-        if (!this->additionalComment_.empty())
-            this->fileEntry_ += ' ' + this->additionalComment_;
-    }
-
-
-    ////////////////////////////////
-    // ConfigFileEntryVectorValue //
-    ////////////////////////////////
-    /**
-        @brief Updates the string that will be stored in the file after one of it's components (name, value, index, comment) has changed.
-    */
-    void ConfigFileEntryVectorValue::update()
-    {
-        this->keyString_ = this->name_ + '[' + multi_cast<std::string>(this->index_) + ']';
-        ConfigFileEntryValue::update();
-    }
-
-
-    ///////////////////////
-    // ConfigFileSection //
-    ///////////////////////
-    /**
-        @brief Destructor: Deletes all entries.
-    */
-    ConfigFileSection::~ConfigFileSection()
-    {
-        for (std::list<ConfigFileEntry*>::iterator it = this->entries_.begin(); it != this->entries_.end(); )
-            delete (*(it++));
-    }
-
-    /**
-        @brief Deletes all elements of a config vector if their index is greater or equal to @a startindex.
-
-        @param name         The name of the vector
-        @param startindex   The index of the first element that will be deleted
-    */
-    void ConfigFileSection::deleteVectorEntries(const std::string& name, unsigned int startindex)
-    {
-        for (std::list<ConfigFileEntry*>::iterator it = this->entries_.begin(); it != this->entries_.end(); )
-        {
-            if (((*it)->getName() == name) && ((*it)->getIndex() >= startindex))
-            {
-                delete (*it);
-                this->entries_.erase(it++);
-            }
-            else
-            {
-                ++it;
-            }
-        }
-    }
-
-    /**
-        @brief Returns the size of a config vector.
-        @param name     The name of the vector
-    */
-    unsigned int ConfigFileSection::getVectorSize(const std::string& name) const
-    {
-        unsigned int size = 0;
-        for (std::list<ConfigFileEntry*>::const_iterator it = this->entries_.begin(); it != this->entries_.end(); ++it)
-            if ((*it)->getName() == name)
-                if ((*it)->getIndex() > size)
-                    size = (*it)->getIndex();
-        if (size == 0)
-            return 0;
-        else
-            return (size + 1);
-    }
-
-    /**
-        @brief Returns the title and comment of the section as it will be stored in the file.
-    */
-    std::string ConfigFileSection::getFileEntry() const
-    {
-        if (this->additionalComment_.empty())
-            return ('[' + this->name_ + ']');
-        else
-            return ('[' + this->name_ + "] " + this->additionalComment_);
-    }
-
-    /**
-        @brief Returns the entry with given name (or NULL if it doesn't exist).
-
-        @param name     The name of the entry
-    */
-    ConfigFileEntry* ConfigFileSection::getEntry(const std::string& name) const
-    {
-        for (std::list<ConfigFileEntry*>::const_iterator it = this->entries_.begin(); it != this->entries_.end(); ++it)
-        {
-            if ((*it)->getName() == name)
-                return *it;
-        }
-        return NULL;
-    }
-
-    /**
-        @brief Returns the entry of a vector element with given name and index (or NULL if it doesn't exist).
-
-        @param name     The name of the vector
-        @param index    The index of the element in the vector
-    */
-    ConfigFileEntry* ConfigFileSection::getEntry(const std::string& name, unsigned int index) const
-    {
-        for (std::list<ConfigFileEntry*>::const_iterator it = this->entries_.begin(); it != this->entries_.end(); ++it)
-        {
-            if (((*it)->getName() == name) && ((*it)->getIndex() == index))
-                return *it;
-        }
-        return NULL;
-    }
-
-    /**
-        @brief Returns the iterator to the entry with given name. If the entry doesn't exist, it is created using the fallback value.
-
-        @param name     The name of the entry
-        @param fallback The value that will be used if the entry doesn't exist
-        @param bString  If true, the value is treated as string which means some special treatment of special characters.
-    */
-    std::list<ConfigFileEntry*>::iterator ConfigFileSection::getOrCreateEntryIterator(const std::string& name, const std::string& fallback, bool bString)
-    {
-        for (std::list<ConfigFileEntry*>::iterator it = this->entries_.begin(); it != this->entries_.end(); ++it)
-        {
-            if ((*it)->getName() == name)
-            {
-                (*it)->setString(bString);
-                return it;
-            }
-        }
-
-        this->bUpdated_ = true;
-
-        return this->entries_.insert(this->entries_.end(), new ConfigFileEntryValue(name, fallback, bString));
-    }
-
-    /**
-        @brief Returns the iterator to the entry of a vector element with given name and index. If the entry doesn't exist, it is created using the fallback value.
-
-        @param name     The name of the vector
-        @param index    The index of the element in the vector
-        @param fallback The value that will be used if the entry doesn't exist
-        @param bString  If true, the value is treated as string which means some special treatment of special characters.
-    */
-    std::list<ConfigFileEntry*>::iterator ConfigFileSection::getOrCreateEntryIterator(const std::string& name, unsigned int index, const std::string& fallback, bool bString)
-    {
-        for (std::list<ConfigFileEntry*>::iterator it = this->entries_.begin(); it != this->entries_.end(); ++it)
-        {
-            if (((*it)->getName() == name) && ((*it)->getIndex() == index))
-            {
-                (*it)->setString(bString);
-                return it;
-            }
-        }
-
-        this->bUpdated_ = true;
-
-        if (index == 0)
-            return this->entries_.insert(this->entries_.end(), new ConfigFileEntryVectorValue(name, index, fallback, bString));
-        else
-            return this->entries_.insert(++this->getOrCreateEntryIterator(name, index - 1, "", bString), new ConfigFileEntryVectorValue(name, index, fallback, bString));
-    }
-
-
-    ////////////////
-    // ConfigFile //
-    ////////////////
-
-    const char* ConfigFile::DEFAULT_CONFIG_FOLDER = "defaultConfig";
-
-    /**
-        @brief Constructor: Initializes the config file.
-        @param filename The file-name of this config file
-        @param bCopyFallbackFile If true, the default config file is copied into the config-directory before loading the file
-    */
-    ConfigFile::ConfigFile(const std::string& filename, bool bCopyFallbackFile)
-        : filename_(filename)
-        , bCopyFallbackFile_(bCopyFallbackFile)
-        , bUpdated_(false)
-    {
-    }
-
-    /**
-        @brief Destructor: Deletes all sections and entries.
-    */
-    ConfigFile::~ConfigFile()
-    {
-        this->clear();
-    }
-
-    /**
-        @brief Loads the config file from the hard-disk and reads the sections and their values.
-    */
-    void ConfigFile::load()
-    {
-        // Be sure we start from new in the memory
-        this->clear();
-
-        boost::filesystem::path filepath(this->filename_);
-        if (!filepath.is_complete())
-        {
-            filepath = PathConfig::getConfigPath() / filepath;
-            if (this->bCopyFallbackFile_)
-            {
-                // Look for default file in the data folder
-                if (!boost::filesystem::exists(filepath))
-                {
-                    boost::filesystem::path defaultFilepath(PathConfig::getDataPath() / DEFAULT_CONFIG_FOLDER / this->filename_);
-                    if (boost::filesystem::exists(defaultFilepath))
-                    {
-                        // Try to copy default file from the data folder
-                        try
-                        {
-                            boost::filesystem::copy_file(defaultFilepath, filepath);
-                            COUT(3) << "Copied " << this->filename_ << " from the default config folder." << std::endl;
-                        }
-                        catch (const boost::filesystem::filesystem_error& ex)
-                        { COUT(1) << "Error in ConfigFile: " << ex.what() << std::endl; }
-                    }
-                }
-            }
-        }
-
-        // Open the file
-        std::ifstream file;
-        file.open(filepath.string().c_str(), std::fstream::in);
-        if (file.is_open())
-        {
-            ConfigFileSection* newsection = 0;
-
-            while (file.good() && !file.eof())
-            {
-                std::string line;
-                std::getline(file, line);
-
-                const std::string& temp = getStripped(line);
-                if (!isEmpty(temp) && !isComment(temp))
-                {
-                    size_t   pos1 = temp.find('[');
-                    if (pos1 == 0) pos1 = line.find('['); else pos1 = std::string::npos;
-                    size_t   pos2 = line.find(']');
-
-                    if (pos1 != std::string::npos && pos2 != std::string::npos && pos2 > pos1 + 1)
-                    {
-                        // New section
-                        const std::string& comment = line.substr(pos2 + 1);
-                        if (isComment(comment))
-                            newsection = new ConfigFileSection(line.substr(pos1 + 1, pos2 - pos1 - 1), comment);
-                        else
-                            newsection = new ConfigFileSection(line.substr(pos1 + 1, pos2 - pos1 - 1));
-                        this->sections_.insert(this->sections_.end(), newsection);
-                        continue;
-                    }
-                }
-
-                if (newsection != 0)
-                {
-                    if (isComment(line))
-                    {
-                        // New comment
-                        newsection->getEntries().insert(newsection->getEntries().end(), new ConfigFileEntryComment(removeTrailingWhitespaces(line)));
-                        continue;
-                    }
-                    else
-                    {
-                        size_t pos1 = line.find('=');
-
-                        if (pos1 != std::string::npos && pos1 > 0)
-                        {
-                            // New entry
-                            size_t pos2 = line.find('[');
-                            size_t pos3 = line.find(']');
-                            size_t commentposition = getNextCommentPosition(line, pos1 + 1);
-                            while (isBetweenQuotes(line, commentposition))
-                            {
-                                commentposition = getNextCommentPosition(line, commentposition + 1);
-                            }
-                            std::string value, comment;
-                            if (commentposition == std::string::npos)
-                            {
-                                value = line.substr(pos1 + 1);
-                            }
-                            else
-                            {
-                                value = line.substr(pos1 + 1, commentposition - pos1 - 1);
-                                comment = removeTrailingWhitespaces(line.substr(commentposition));
-                            }
-
-                            value = removeTrailingWhitespaces(value);
-                            value = removeSlashes(value);
-
-                            if (pos2 != std::string::npos && pos3 != std::string::npos && pos3 > pos2 + 1)
-                            {
-                                // There might be an array index
-                                unsigned int index = 0;
-                                if (convertValue(&index, line.substr(pos2 + 1, pos3 - pos2 - 1)))
-                                {
-                                    // New array
-                                    std::list<ConfigFileEntry*>::iterator it = newsection->getOrCreateEntryIterator(getStripped(line.substr(0, pos2)), index, value, false);
-                                    (*it)->setValue(value);
-                                    (*it)->setComment(comment);
-                                    continue;
-                                }
-                            }
-
-                            // New value
-                            newsection->getEntries().insert(newsection->getEntries().end(), new ConfigFileEntryValue(getStripped(line.substr(0, pos1)), value, false, comment));
-                            continue;
-                        }
-                    }
-                }
-            }
-
-            file.close();
-
-            COUT(3) << "Loaded config file \"" << this->filename_ << "\"." << std::endl;
-
-            // DO NOT save the file --> we can open supposedly read only config files
-        } // end file.is_open()
-    }
-
-    /**
-        @brief Writes the sections and values to the hard-disk.
-    */
-    void ConfigFile::save() const
-    {
-        this->saveAs(this->filename_);
-    }
-
-    /**
-        @brief Writes the sections and values to a given file on the hard-disk.
-    */
-    void ConfigFile::saveAs(const std::string& filename) const
-    {
-        boost::filesystem::path filepath(filename);
-        if (!filepath.is_complete())
-            filepath = PathConfig::getConfigPath() / filename;
-        std::ofstream file;
-        file.open(filepath.string().c_str(), std::fstream::out);
-        file.setf(std::ios::fixed, std::ios::floatfield);
-        file.precision(6);
-
-        if (!file.is_open())
-        {
-            COUT(1) << "Error: Couldn't open config-file \"" << filename << "\"." << std::endl;
-            return;
-        }
-
-        for (std::list<ConfigFileSection*>::const_iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
-        {
-            file << (*it)->getFileEntry() << std::endl;
-
-            for (std::list<ConfigFileEntry*>::const_iterator it_entries = (*it)->getEntriesBegin(); it_entries != (*it)->getEntriesEnd(); ++it_entries)
-                file << (*it_entries)->getFileEntry() << std::endl;
-
-            file << std::endl;
-        }
-
-        file.close();
-
-        COUT(4) << "Saved config file \"" << filename << "\"." << std::endl;
-    }
-
-    /**
-        @brief Deletes all sections (which again delete all their values) and clears the list of sections.
-    */
-    void ConfigFile::clear()
-    {
-        for (std::list<ConfigFileSection*>::iterator it = this->sections_.begin(); it != this->sections_.end(); )
-            delete (*(it++));
-        this->sections_.clear();
-    }
-
-    /**
-        @brief Deletes all elements of a config vector if their index is greater or equal to @a startindex.
-
-        @param section      The name of the section
-        @param name         The name of the vector
-        @param startindex   The index of the first element that will be deleted
-    */
-    void ConfigFile::deleteVectorEntries(const std::string& section, const std::string& name, unsigned int startindex)
-    {
-        if (ConfigFileSection* sectionPtr = this->getSection(section))
-        {
-            sectionPtr->deleteVectorEntries(name, startindex);
-            this->save();
-        }
-    }
-
-    /**
-        @brief Returns a pointer to the section with given name (or NULL if the section doesn't exist).
-    */
-    ConfigFileSection* ConfigFile::getSection(const std::string& section) const
-    {
-        for (std::list<ConfigFileSection*>::const_iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
-            if ((*it)->getName() == section)
-                return (*it);
-        return NULL;
-    }
-
-    /**
-        @brief Returns a pointer to the section with given name. If it doesn't exist, the section is created.
-    */
-    ConfigFileSection* ConfigFile::getOrCreateSection(const std::string& section)
-    {
-        for (std::list<ConfigFileSection*>::iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
-            if ((*it)->getName() == section)
-                return (*it);
-
-        this->bUpdated_ = true;
-
-        return (*this->sections_.insert(this->sections_.end(), new ConfigFileSection(section)));
-    }
-
-    /**
-        @brief Saves the config file if it was updated (or if any of its sections were updated).
-    */
-    void ConfigFile::saveIfUpdated()
-    {
-        bool sectionsUpdated = false;
-
-        for (std::list<ConfigFileSection*>::iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
-        {
-            if ((*it)->bUpdated_)
-            {
-                sectionsUpdated = true;
-                (*it)->bUpdated_ = false;
-            }
-        }
-
-        if (this->bUpdated_ || sectionsUpdated)
-        {
-            this->bUpdated_ = false;
-            this->save();
-        }
-    }
-
-
-    ////////////////////////
-    // SettingsConfigFile //
-    ////////////////////////
-
-    static const std::string __CC_load_name = "reloadSettings";
-    static const std::string __CC_setFilename_name = "setSettingsFile";
-    static const std::string __CC_config_name = "config";
-    static const std::string __CC_tconfig_name = "tconfig";
-    static const std::string __CC_getConfig_name = "getConfig";
-
-    SetConsoleCommand(__CC_load_name,            &ConfigFile::load);
-    SetConsoleCommand(__CC_setFilename_name,     &SettingsConfigFile::setFilename);
-    SetConsoleCommand(__CC_config_name,          &SettingsConfigFile::config).argumentCompleter(0, autocompletion::settingssections()).argumentCompleter(1, autocompletion::settingsentries()).argumentCompleter(2, autocompletion::settingsvalue());
-    SetConsoleCommand(__CC_tconfig_name,         &SettingsConfigFile::tconfig).argumentCompleter(0, autocompletion::settingssections()).argumentCompleter(1, autocompletion::settingsentries()).argumentCompleter(2, autocompletion::settingsvalue());
-    SetConsoleCommand(__CC_getConfig_name,       &SettingsConfigFile::getConfig).argumentCompleter(0, autocompletion::settingssections()).argumentCompleter(1, autocompletion::settingsentries());
-
-    SettingsConfigFile* SettingsConfigFile::singletonPtr_s = 0;
-
-    /**
-        @brief Constructor: Activates the console commands.
-    */
-    SettingsConfigFile::SettingsConfigFile(const std::string& filename)
-        : ConfigFile(filename)
-    {
-        ModifyConsoleCommand(__CC_load_name).setObject(this);
-        ModifyConsoleCommand(__CC_setFilename_name).setObject(this);
-        ModifyConsoleCommand(__CC_config_name).setObject(this);
-        ModifyConsoleCommand(__CC_tconfig_name).setObject(this);
-        ModifyConsoleCommand(__CC_getConfig_name).setObject(this);
-    }
-
-    /**
-        @brief Destructor: Deactivates the console commands.
-    */
-    SettingsConfigFile::~SettingsConfigFile()
-    {
-        ModifyConsoleCommand(__CC_load_name).setObject(0);
-        ModifyConsoleCommand(__CC_setFilename_name).setObject(0);
-        ModifyConsoleCommand(__CC_config_name).setObject(0);
-        ModifyConsoleCommand(__CC_tconfig_name).setObject(0);
-        ModifyConsoleCommand(__CC_getConfig_name).setObject(0);
-    }
-
-    /**
-        @brief Loads the config file and updates the @ref ConfigValueContainer "config value containers".
-    */
-    void SettingsConfigFile::load()
-    {
-        ConfigFile::load();
-        this->updateConfigValues();
-    }
-
-    /**
-        @brief Changes the file-name.
-    */
-    void SettingsConfigFile::setFilename(const std::string& filename)
-    {
-        ConfigFileManager::getInstance().setFilename(ConfigFileType::Settings, filename);
-    }
-
-    /**
-        @brief Registers a new @ref ConfigValueContainer "config value container".
-    */
-    void SettingsConfigFile::addConfigValueContainer(ConfigValueContainer* container)
-    {
-        if (container == NULL)
-            return;
-        std::pair<std::string, ConfigValueContainer*> second(getLowercase(container->getName()), container);
-        this->containers_.insert(std::make_pair(getLowercase(container->getSectionName()), second));
-        this->sectionNames_.insert(container->getSectionName());
-    }
-
-    /**
-        @brief Unregisters a @ref ConfigValueContainer "config value container".
-    */
-    void SettingsConfigFile::removeConfigValueContainer(ConfigValueContainer* container)
-    {
-        if (container == NULL)
-            return;
-        const std::string& sectionLC = getLowercase(container->getSectionName());
-        ContainerMap::iterator upper = this->containers_.upper_bound(sectionLC);
-        for (ContainerMap::iterator it = this->containers_.lower_bound(sectionLC); it != upper; ++it)
-        {
-            if (it->second.second == container)
-            {
-                // Remove entry from section name set this was the last container for that section
-                if (upper == this->containers_.lower_bound(sectionLC))
-                    this->sectionNames_.erase(container->getSectionName());
-                this->containers_.erase(it);
-                break;
-            }
-        }
-    }
-
-    /**
-        @brief Updates all @ref ConfigValueContainer "config value containers".
-    */
-    void SettingsConfigFile::updateConfigValues()
-    {
-        // todo: can this be done more efficiently? looks like some identifiers will be updated multiple times.
-
-        for (ContainerMap::const_iterator it = this->containers_.begin(); it != this->containers_.end(); ++it)
-        {
-            it->second.second->update();
-            it->second.second->getIdentifier()->updateConfigValues();
-        }
-    }
-
-    /**
-        @brief Removes entries and sections from the file that don't exist anymore (i.e. if there's no corresponding @ref ConfigValueContainer "config value container").
-        @param bCleanComments If true, comments are also removed from the file
-    */
-    void SettingsConfigFile::clean(bool bCleanComments)
-    {
-        for (std::list<ConfigFileSection*>::iterator itSection = this->sections_.begin(); itSection != this->sections_.end(); )
-        {
-            const std::string& sectionLC = getLowercase((*itSection)->getName());
-            ContainerMap::const_iterator lower = this->containers_.lower_bound(sectionLC);
-            ContainerMap::const_iterator upper = this->containers_.upper_bound(sectionLC);
-            if (lower != upper)
-            {
-                // The section exists, delete comment
-                if (bCleanComments)
-                    (*itSection)->setComment("");
-                for (std::list<ConfigFileEntry*>::iterator itEntry = (*itSection)->entries_.begin(); itEntry != (*itSection)->entries_.end(); )
-                {
-                    const std::string& entryLC = getLowercase((*itEntry)->getName());
-                    bool bFound = false;
-                    for (ContainerMap::const_iterator itContainer = lower; itContainer != upper; ++itContainer)
-                    {
-                        if (itContainer->second.first == entryLC)
-                        {
-                            // The config-value exists, delete comment
-                            if (bCleanComments)
-                                (*itEntry)->setComment("");
-                            ++itEntry;
-                            bFound = true;
-                            break;
-                        }
-                    }
-                    if (!bFound)
-                    {
-                        // The config-value doesn't exist
-                        delete (*itEntry);
-                        (*itSection)->entries_.erase(itEntry++);
-                    }
-                }
-                ++itSection;
-            }
-            else
-            {
-                // The section doesn't exist
-                delete (*itSection);
-                this->sections_.erase(itSection++);
-            }
-        }
-
-        // Save the file
-        this->save();
-    }
-
-    /**
-        @brief Console-command: Changes the value of an entry and stores it the file.
-
-        @param section  The section of the config value
-        @param entry    The name of the config value
-        @param value    The new value
-    */
-    void SettingsConfigFile::config(const std::string& section, const std::string& entry, const std::string& value)
-    {
-        if (!this->configImpl(section, entry, value, &ConfigValueContainer::set))
-            COUT(1) << "Error: Config value \"" << entry << "\" in section \"" << section << "\" doesn't exist." << std::endl;
-    }
-
-    /**
-        @brief Console-command: Changes the value of an entry, but doesn't store it in the file (it's only a temporary change).
-
-        @param section  The section of the config value
-        @param entry    The name of the config value
-        @param value    The new value
-    */
-    void SettingsConfigFile::tconfig(const std::string& section, const std::string& entry, const std::string& value)
-    {
-        if (!this->configImpl(section, entry, value, &ConfigValueContainer::tset))
-            COUT(1) << "Error: Config value \"" << entry << "\" in section \"" << section << "\" doesn't exist." << std::endl;
-    }
-
-    /**
-        @brief Changes the value of an entry, depending on @a function, either by using "set" or "tset"
-
-        @param section  The section of the config value
-        @param entry    The name of the config value
-        @param value    The new value
-        @param function The function ("set" or "tset") that will be used to change the value.
-    */
-    bool SettingsConfigFile::configImpl(const std::string& section, const std::string& entry, const std::string& value, bool (ConfigValueContainer::*function)(const MultiType&))
-    {
-        const std::string& sectionLC = getLowercase(section);
-        const std::string& entryLC = getLowercase(entry);
-        ContainerMap::iterator upper = this->containers_.upper_bound(sectionLC);
-        for (ContainerMap::iterator it = this->containers_.lower_bound(sectionLC); it != upper; ++it)
-        {
-            // Note: Config value vectors cannot be supported
-            if (it->second.first == entryLC && !it->second.second->isVector())
-            {
-                return (it->second.second->*function)(value);
-            }
-        }
-        return false;
-    }
-
-    /**
-        @brief Console-command: Returns the value of a given entry.
-
-        @param section  The section of the config value
-        @param entry    The name of the config value
-    */
-    std::string SettingsConfigFile::getConfig(const std::string& section, const std::string& entry)
-    {
-        const std::string& sectionLC = getLowercase(section);
-        const std::string& entryLC = getLowercase(entry);
-        ContainerMap::iterator upper = this->containers_.upper_bound(sectionLC);
-        for (ContainerMap::iterator it = this->containers_.lower_bound(sectionLC); it != upper; ++it)
-        {
-            // Note: Config value vectors cannot be supported
-            if (it->second.first == entryLC && ! it->second.second->isVector())
-            {
-                std::string value;
-                it->second.second->getValue<std::string, OrxonoxClass>(&value, NULL);
-                return value;
-            }
-        }
-        return "";
-    }
-
-
-    ///////////////////////
-    // ConfigFileManager //
-    ///////////////////////
-
-    ConfigFileManager* ConfigFileManager::singletonPtr_s = 0;
-
-    /// Constructor: Initializes the array of config files with NULL.
-    ConfigFileManager::ConfigFileManager()
-    {
-        this->configFiles_.assign(NULL);
-    }
-
-    /// Destructor: Deletes the config files.
-    ConfigFileManager::~ConfigFileManager()
-    {
-        for (boost::array<ConfigFile*, 3>::const_iterator it = this->configFiles_.begin(); it != this->configFiles_.end(); ++it)
-            if (*it)
-                delete (*it);
-    }
-
-    /// Defines the file-name for the config file of a given type (settings, calibration, etc.).
-    void ConfigFileManager::setFilename(ConfigFileType::Value type, const std::string& filename)
-    {
-        if (this->getConfigFile(type))
-            delete this->configFiles_[type];
-        // Create and load config file
-        switch (type)
-        {
-        case ConfigFileType::Settings:
-            this->configFiles_[type] = new SettingsConfigFile(filename);
-            break;
-        case ConfigFileType::JoyStickCalibration:
-        case ConfigFileType::CommandHistory:
-            this->configFiles_[type] = new ConfigFile(filename);
-            break;
-        }
-        this->configFiles_[type]->load();
-    }
-}
Index: sandbox_qt/src/libraries/core/ConfigFileManager.h
===================================================================
--- sandbox_qt/src/libraries/core/ConfigFileManager.h	(revision 7418)
+++ 	(revision )
@@ -1,602 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup Config ConfigFile
-    @brief Declaration of ConfigFileManager and its helper classes, used to load and save config files.
-*/
-
-#ifndef _ConfigFileManager_H__
-#define _ConfigFileManager_H__
-
-#include "CorePrereqs.h"
-
-#include <list>
-#include <map>
-#include <set>
-#include <string>
-#include <boost/array.hpp>
-
-#include "util/Singleton.h"
-
-namespace orxonox // tolua_export
-{ // tolua_export
-
-    /////////////////////
-    // ConfigFileEntry //
-    /////////////////////
-    /**
-        @brief This class represents an entry in the config file.
-
-        This class is pure virtual. Use one of the derived classes to define the type of the entry.
-    */
-    class _CoreExport ConfigFileEntry
-    {
-        public:
-            /// Destructor
-            virtual ~ConfigFileEntry() {};
-
-            /// Changes the value of the entry.
-            virtual void setValue(const std::string& value) = 0;
-            /// Returns the value of the entry.
-            virtual const std::string& getValue() const = 0;
-
-            /// Returns the name of the entry
-            virtual const std::string& getName() const = 0;
-
-            /// Changes the comment of the entry (will be placed after the value)
-            virtual void setComment(const std::string& comment) = 0;
-
-            /// Returns the index of the entry in a vector (used only if it is a vector)
-            virtual unsigned int getIndex() const { return 0; }
-
-            /// Defines if this entry is treated as string which means some special treatment of special characters.
-            virtual void setString(bool bString) = 0;
-
-            /// Returns the line as it will be stored in the config file.
-            virtual const std::string& getFileEntry() const = 0;
-    };
-
-
-    //////////////////////////
-    // ConfigFileEntryValue //
-    //////////////////////////
-    /**
-        @brief This class represents a normal value in the config file.
-    */
-    class _CoreExport ConfigFileEntryValue : public ConfigFileEntry
-    {
-        public:
-            /**
-                @brief Constructor: Initializes the entry.
-
-                @param name                 The name of the entry
-                @param value                The value of the entry
-                @param bString              If true, the value is treated as string which means some special treatment of special characters.
-                @param additionalComment    An optional comment that will be placed behind the value in the config file
-            */
-            inline ConfigFileEntryValue(const std::string& name, const std::string& value = "", bool bString = false, const std::string& additionalComment = "")
-                : name_(name)
-                , value_(value)
-                , additionalComment_(additionalComment)
-                , bString_(bString)
-                { this->update(); }
-
-            /// Destructor
-            inline virtual ~ConfigFileEntryValue() {}
-
-            inline virtual const std::string& getName() const
-                { return this->name_; }
-
-            inline virtual void setComment(const std::string& comment)
-                { this->additionalComment_ = comment; this->update(); }
-
-            inline virtual void setValue(const std::string& value)
-                { this->value_ = value; this->update(); }
-            inline virtual const std::string& getValue() const
-                { return this->value_; }
-
-            inline void virtual setString(bool bString)
-                { this->bString_ = bString; this->update(); }
-
-            inline virtual const std::string& getFileEntry() const
-                { return this->fileEntry_; }
-
-            /// Returns the "key" of the value (in this case it's just the name of the entry, but for vectors it's different)
-            inline virtual const std::string& getKeyString() const
-                { return this->name_; }
-
-        protected:
-            virtual void update();
-
-            const std::string name_;            ///< The name of the value
-            std::string value_;                 ///< The value
-            std::string additionalComment_;     ///< The additional comment
-            std::string fileEntry_;             ///< The string as it will be stored in the config file
-            bool bString_;                      ///< If true, the value is treated as string which means some special treatment of special characters.
-    };
-
-
-    ////////////////////////////////
-    // ConfigFileEntryVectorValue //
-    ////////////////////////////////
-    /**
-        @brief Subclass of ConfigFileEntryValue, represents an element of a vector.
-    */
-    class _CoreExport ConfigFileEntryVectorValue : public ConfigFileEntryValue
-    {
-        public:
-            /**
-                @brief Constructor: Initializes the entry.
-
-                @param name                 The name of the vector
-                @param index                The index of the element in the vector
-                @param value                The value of the element
-                @param bString              If true, the value is treated as string which means some special treatment of special characters.
-                @param additionalComment    An optional comment that will be placed behind the value in the config file
-            */
-            inline ConfigFileEntryVectorValue(const std::string& name, unsigned int index, const std::string& value = "", bool bString = false, const std::string& additionalComment = "")
-                : ConfigFileEntryValue(name, value, bString, additionalComment)
-                , index_(index)
-                { this->update(); /*No virtual calls in base class ctor*/ }
-
-            /// Destructor
-            inline ~ConfigFileEntryVectorValue() {}
-
-            inline unsigned int getIndex() const
-                { return this->index_; }
-
-            /// Returns the "key" of the value (the name of the vector plus the index of the element)
-            inline const std::string& getKeyString() const
-                { return this->keyString_; }
-
-        private:
-            void update();
-
-            unsigned int index_;        ///< The index of the element in the vector
-            std::string keyString_;     ///< The full name of the entry (the name of the vector plus the index of the element)
-    };
-
-
-    ////////////////////////////
-    // ConfigFileEntryComment //
-    ////////////////////////////
-    /**
-        @brief This class represents a line in the config file which contains only a comment.
-    */
-    class _CoreExport ConfigFileEntryComment : public ConfigFileEntry
-    {
-        public:
-            /// Constructor: Initializes the object.
-            inline ConfigFileEntryComment(const std::string& comment) : comment_(comment) {}
-
-            /// Destructor
-            inline virtual ~ConfigFileEntryComment() {}
-
-            inline virtual const std::string& getName() const
-                { return this->comment_; }
-
-            inline virtual void setComment(const std::string& comment)
-                { this->comment_ = comment; }
-
-            inline virtual void setValue(const std::string& value)
-                {}
-            inline virtual const std::string& getValue() const
-                { return BLANKSTRING; }
-
-            inline void setString(bool bString)
-                {}
-
-            inline virtual const std::string& getFileEntry() const
-                { return this->comment_; }
-
-        private:
-            std::string comment_;   ///< The comment
-    };
-
-
-    ///////////////////////
-    // ConfigFileSection //
-    ///////////////////////
-    /**
-        @brief Represents a section in a config file.
-
-        A section has a name and a list of config values.
-    */
-    class _CoreExport ConfigFileSection
-    {
-        friend class ConfigFile;
-        friend class SettingsConfigFile;
-
-        public:
-            /**
-                @brief Constructor: Initializes the section.
-
-                @param name The name of the section
-                @param additionalComment An additional comment placed after the title of the section in the config file
-            */
-            inline ConfigFileSection(const std::string& name, const std::string& additionalComment = "")
-                : name_(name)
-                , additionalComment_(additionalComment)
-                , bUpdated_(false)
-                {}
-            ~ConfigFileSection();
-
-            /// Returns the name of the section.
-            inline const std::string& getName() const
-                { return this->name_; }
-
-            /// Changes the comment which is placed after the title of the section in the config file.
-            inline void setComment(const std::string& comment)
-                { this->additionalComment_ = comment; }
-
-            /**
-                @brief Stores a value in the section. If the entry doesn't exist, it's created.
-
-                @param name     The name of the entry
-                @param value    The new value
-                @param bString  If true, the value is treated as string which means some special treatment of special characters.
-            */
-            inline void setValue(const std::string& name, const std::string& value, bool bString)
-                { this->getOrCreateEntry(name, value, bString)->setValue(value); }
-            /**
-                @brief Returns the value of a given entry in the section. Returns a blank string if the value doesn't exist.
-
-                @param name     The name of the entry
-                @param bString  If true, the value is treated as string which means some special treatment of special characters.
-            */
-            inline const std::string& getValue(const std::string& name, bool bString)
-            {
-                ConfigFileEntry* entry = this->getEntry(name);
-                if (entry)
-                {
-                    entry->setString(bString);  // if the entry was loaded from the config file, we have to tell it if it's a string
-                    return entry->getValue();
-                }
-                return BLANKSTRING;
-            }
-            /**
-                @brief Returns the value of a given entry in the section. If it doesn't exist, the entry is created using the fallback value.
-
-                @param name     The name of the entry
-                @param fallback The value that will be used if the entry doesn't exist
-                @param bString  If true, the value is treated as string which means some special treatment of special characters.
-            */
-            inline const std::string& getOrCreateValue(const std::string& name, const std::string& fallback, bool bString)
-                { return this->getOrCreateEntry(name, fallback, bString)->getValue(); }
-
-            /**
-                @brief Stores the value of an element of a vector in the section. If the entry doesn't exist, it's created.
-
-                @param name     The name of the vector
-                @param index    The index of the element in the vector
-                @param value    The new value
-                @param bString  If true, the value is treated as string which means some special treatment of special characters.
-            */
-            inline void setValue(const std::string& name, unsigned int index, const std::string& value, bool bString)
-                { this->getOrCreateEntry(name, index, value, bString)->setValue(value); }
-            /**
-                @brief Returns the value of a given element of a vector in the section. Returns a blank string if the value doesn't exist.
-
-                @param name     The name of the vector
-                @param index    The index of the element in the vector
-                @param bString  If true, the value is treated as string which means some special treatment of special characters.
-            */
-            inline const std::string& getValue(const std::string& name, unsigned int index, bool bString)
-            {
-                ConfigFileEntry* entry = this->getEntry(name, index);
-                if (entry)
-                {
-                    entry->setString(bString);  // if the entry was loaded from the config file, we have to tell it if it's a string
-                    return entry->getValue();
-                }
-                return BLANKSTRING;
-            }
-            /**
-                @brief Returns the value of a given element of a vector in the section. If it doesn't exist, the entry is created using the fallback value.
-
-                @param name     The name of the vector
-                @param index    The index of the element in the vector
-                @param fallback The value that will be used if the entry doesn't exist
-                @param bString  If true, the value is treated as string which means some special treatment of special characters.
-            */
-            inline const std::string& getOrCreateValue(const std::string& name, unsigned int index, const std::string& fallback, bool bString)
-                { return this->getOrCreateEntry(name, index, fallback, bString)->getValue(); }
-
-            void deleteVectorEntries(const std::string& name, unsigned int startindex = 0);
-            unsigned int getVectorSize(const std::string& name) const;
-
-            std::string getFileEntry() const;
-
-        private:
-            /// Returns the list of entries in this section.
-            std::list<ConfigFileEntry*>& getEntries()
-                { return this->entries_; }
-            /// Returns the begin-iterator of the list of entries in this section.
-            std::list<ConfigFileEntry*>::const_iterator getEntriesBegin() const
-                { return this->entries_.begin(); }
-            /// Returns the end-iterator of the list of entries in this section.
-            std::list<ConfigFileEntry*>::const_iterator getEntriesEnd() const
-                { return this->entries_.end(); }
-
-            std::list<ConfigFileEntry*>::iterator getOrCreateEntryIterator(const std::string& name, const std::string& fallback, bool bString);
-            std::list<ConfigFileEntry*>::iterator getOrCreateEntryIterator(const std::string& name, unsigned int index, const std::string& fallback, bool bString);
-
-            ConfigFileEntry* getEntry(const std::string& name) const;
-            /**
-                @brief Returns the entry with given name. If it doesn't exist, the entry is created using the fallback value.
-
-                @param name     The name of the entry
-                @param fallback The value that will be used if the entry doesn't exist
-                @param bString  If true, the value is treated as string which means some special treatment of special characters.
-            */
-            inline ConfigFileEntry* getOrCreateEntry(const std::string& name, const std::string& fallback, bool bString)
-                { return (*this->getOrCreateEntryIterator(name, fallback, bString)); }
-
-            ConfigFileEntry* getEntry(const std::string& name, unsigned int index) const;
-            /**
-                @brief Returns the entry that contains an element of a vector with given name. If it doesn't exist, the entry is created using the fallback value.
-
-                @param name     The name of the entry
-                @param index    The index of the element in the vector
-                @param fallback The value that will be used if the entry doesn't exist
-                @param bString  If true, the value is treated as string which means some special treatment of special characters.
-            */
-            inline ConfigFileEntry* getOrCreateEntry(const std::string& name, unsigned int index, const std::string& fallback, bool bString)
-                { return (*this->getOrCreateEntryIterator(name, index, fallback, bString)); }
-
-            std::string name_;                      ///< The name of the section
-            std::string additionalComment_;         ///< The additional comment which is placed after the title of the section in the config file
-            std::list<ConfigFileEntry*> entries_;   ///< The list of entries in this section
-            bool bUpdated_;                         ///< True if an entry is created
-    };
-
-
-    ////////////////
-    // ConfigFile //
-    ////////////////
-    /**
-        @brief This class represents a config file, which is stored on the hard-disk and contains config values in different sections.
-
-        It provides an interface to manipulate the sections and values.
-    */
-    class _CoreExport ConfigFile
-    {
-        public:
-            ConfigFile(const std::string& filename, bool bCopyFallbackFile = true);
-            virtual ~ConfigFile();
-
-            virtual void load();
-            virtual void save() const;
-            virtual void saveAs(const std::string& filename) const;
-            virtual void clear();
-
-            /// Returns the file-name of this config file
-            inline const std::string& getFilename()
-                { return this->filename_; }
-
-            /**
-                @brief Stores a value in the config file. If the entry or its section doesn't exist, it's created.
-
-                @param section  The name of the section
-                @param name     The name of the entry
-                @param value    The new value
-                @param bString  If true, the value is treated as string which means some special treatment of special characters.
-            */
-            inline void setValue(const std::string& section, const std::string& name, const std::string& value, bool bString)
-            {
-                this->getOrCreateSection(section)->setValue(name, value, bString);
-                this->save();
-            }
-            /**
-                @brief Returns the value of a given entry in the config file. Returns a blank string if the value doesn't exist.
-
-                @param section  The name of the section
-                @param name     The name of the entry
-                @param bString  If true, the value is treated as string which means some special treatment of special characters.
-            */
-            inline const std::string& getValue(const std::string& section, const std::string& name, bool bString)
-            {
-                ConfigFileSection* sectionPtr = this->getSection(section);
-                return (sectionPtr ? sectionPtr->getValue(name, bString) : BLANKSTRING);
-            }
-            /**
-                @brief Returns the value of a given entry in the config file. If it doesn't exist, the entry is created using the fallback value.
-
-                @param section  The name of the section
-                @param name     The name of the entry
-                @param fallback The value that will be used if the entry doesn't exist
-                @param bString  If true, the value is treated as string which means some special treatment of special characters.
-            */
-            inline const std::string& getOrCreateValue(const std::string& section, const std::string& name, const std::string& fallback, bool bString)
-            {
-                const std::string& output = this->getOrCreateSection(section)->getOrCreateValue(name, fallback, bString);
-                this->saveIfUpdated();
-                return output;
-            }
-
-            /**
-                @brief Stores the value of an element of a vector in the config file. If the entry or its section doesn't exist, it's created.
-
-                @param section  The name of the section
-                @param name     The name of the vector
-                @param index    The index of the element in the vector
-                @param value    The new value
-                @param bString  If true, the value is treated as string which means some special treatment of special characters.
-            */
-            inline void setValue(const std::string& section, const std::string& name, unsigned int index, const std::string& value, bool bString)
-            {
-                this->getOrCreateSection(section)->setValue(name, index, value, bString);
-                this->save();
-            }
-            /**
-                @brief Returns the value of a given element of a vector in the config file. Returns a blank string if the value doesn't exist.
-
-                @param section  The name of the section
-                @param name     The name of the vector
-                @param index    The index of the element in the vector
-                @param bString  If true, the value is treated as string which means some special treatment of special characters.
-            */
-            inline const std::string& getValue(const std::string& section, const std::string& name, unsigned int index, bool bString)
-            {
-                ConfigFileSection* sectionPtr = this->getSection(section);
-                return (sectionPtr ? sectionPtr->getValue(name, index, bString) : BLANKSTRING);
-            }
-            /**
-                @brief Returns the value of a given element of a vector in the config file. If it doesn't exist, the entry is created using the fallback value.
-
-                @param section  The name of the section
-                @param name     The name of the vector
-                @param index    The index of the element in the vector
-                @param fallback The value that will be used if the entry doesn't exist
-                @param bString  If true, the value is treated as string which means some special treatment of special characters.
-            */
-            const std::string& getOrCreateValue(const std::string& section, const std::string& name, unsigned int index, const std::string& fallback, bool bString)
-            {
-                const std::string& output = this->getOrCreateSection(section)->getOrCreateValue(name, index, fallback, bString);
-                this->saveIfUpdated();
-                return output;
-            }
-
-            void deleteVectorEntries(const std::string& section, const std::string& name, unsigned int startindex = 0);
-            /**
-                @brief Returns the size of a config vector.
-                @param section  The section of the vector
-                @param name     The name of the vector
-            */
-            inline unsigned int getVectorSize(const std::string& section, const std::string& name) const
-            {
-                ConfigFileSection* sectionPtr = this->getSection(section);
-                return (sectionPtr ? sectionPtr->getVectorSize(name) : 0);
-            }
-
-            static const char* DEFAULT_CONFIG_FOLDER;   ///< The folder where the default config files will be stored
-
-        protected:
-            ConfigFileSection* getSection(const std::string& section) const;
-            ConfigFileSection* getOrCreateSection(const std::string& section);
-
-            std::list<ConfigFileSection*> sections_;    ///< A list of sections in this config file
-
-        private:
-            void saveIfUpdated();
-
-            const std::string filename_;                ///< The filename of this config file
-            const bool bCopyFallbackFile_;              ///< If true, the default config file is copied into the config-directory before loading the file
-            bool bUpdated_;                             ///< Becomes true if a section is added
-    };
-
-
-    ////////////////////////
-    // SettingsConfigFile //
-    ////////////////////////
-    /**
-        @brief Child class of ConfigFile, used to store the settings of the game.
-
-        In addition to ConfigFile, this class provides an interface to manipulate the settings
-        with console commands and to cache entries in instances of ConfigValueContainer.
-
-        SettingsConfigFile is a Singleton, meaning there's only one instance of this class
-        (and thus only one config file that stores settings).
-    */
-    class _CoreExport SettingsConfigFile // tolua_export
-        : public ConfigFile, public Singleton<SettingsConfigFile>
-    { // tolua_export
-        friend class Singleton<SettingsConfigFile>;
-
-        public:
-            typedef std::multimap<std::string, std::pair<std::string, ConfigValueContainer*> > ContainerMap;
-
-            SettingsConfigFile(const std::string& filename);
-            ~SettingsConfigFile();
-
-            void load(); // tolua_export
-            void setFilename(const std::string& filename); // tolua_export
-            void clean(bool bCleanComments = false); // tolua_export
-
-            void config(const std::string& section, const std::string& entry, const std::string& value); // tolua_export
-            void tconfig(const std::string& section, const std::string& entry, const std::string& value); // tolua_export
-            std::string getConfig(const std::string& section, const std::string& entry); // tolua_export
-
-            void addConfigValueContainer(ConfigValueContainer* container);
-            void removeConfigValueContainer(ConfigValueContainer* container);
-
-            /// Returns a set containing the names of all sections in this config file.
-            inline const std::set<std::string>& getSectionNames()
-                { return this->sectionNames_; }
-            /// Returns the lower-bound-iterator of the @ref ConfigValueContainer "config value containers" for the given section.
-            inline ContainerMap::const_iterator getContainerLowerBound(const std::string section)
-                { return this->containers_.lower_bound(section); }
-            /// Returns the upper-bound-iterator of the @ref ConfigValueContainer "config value containers" for the given section.
-            inline ContainerMap::const_iterator getContainerUpperBound(const std::string section)
-                { return this->containers_.upper_bound(section); }
-
-            static SettingsConfigFile& getInstance() { return Singleton<SettingsConfigFile>::getInstance(); } // tolua_export
-
-        private:
-            void updateConfigValues();
-            bool configImpl(const std::string& section, const std::string& entry, const std::string& value, bool (ConfigValueContainer::*function)(const MultiType&));
-
-            ContainerMap containers_;                   ///< Stores all @ref ConfigValueContainer "config value containers"
-            std::set<std::string> sectionNames_;        ///< Stores all section names
-            static SettingsConfigFile* singletonPtr_s;  ///< The singleton pointer
-    }; // tolua_export
-
-
-    ///////////////////////
-    // ConfigFileManager //
-    ///////////////////////
-    /**
-        @brief Manages the different config files (settings, calibration, etc). Implemented as Singleton.
-    */
-    class _CoreExport ConfigFileManager : public Singleton<ConfigFileManager>
-    {
-        friend class Singleton<ConfigFileManager>;
-        public:
-            ConfigFileManager();
-            ~ConfigFileManager();
-
-            void setFilename(ConfigFileType::Value type, const std::string& filename);
-
-            /// Returns the config file of a given type (settings, calibration, etc.)
-            inline ConfigFile* getConfigFile(ConfigFileType::Value type)
-            {
-                // Check array bounds
-                return configFiles_.at(type);
-            }
-
-        private:
-            ConfigFileManager(const ConfigFileManager&);    ///< Copy-constructor: not implemented
-
-            boost::array<ConfigFile*, 3> configFiles_;      ///< Stores the config files for each type in an array (must have the same size like ConfigFileType::Value)
-            static ConfigFileManager* singletonPtr_s;       ///< Stores the singleton-pointer
-    };
-} // tolua_export
-
-#endif /* _ConfigFileManager_H__ */
Index: sandbox_qt/src/libraries/core/ConfigValueContainer.cc
===================================================================
--- sandbox_qt/src/libraries/core/ConfigValueContainer.cc	(revision 7418)
+++ 	(revision )
@@ -1,353 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Implementation of the ConfigValueContainer class.
-*/
-
-#include "ConfigValueContainer.h"
-
-#include "util/Convert.h"
-#include "util/SubString.h"
-#include "ConfigFileManager.h"
-#include "Language.h"
-
-namespace orxonox
-{
-    const unsigned int MAX_VECTOR_INDEX  = 255; // to avoid up to 4*10^9 vector entries in the config file after accidentally using a wrong argument
-
-    /**
-        @brief Initializes the ConfigValueContainer with default values.
-    */
-    void ConfigValueContainer::init(ConfigFileType::Value type, Identifier* identifier, const std::string& sectionname, const std::string& varname)
-    {
-        this->type_ = type;
-        this->identifier_ = identifier;
-        this->sectionname_ = sectionname;
-        this->varname_ = varname;
-        this->callback_ = 0;
-        this->bContainerIsNew_ = true;
-        this->bDoInitialCallback_ = false;
-        this->bAddedDescription_ = false;
-
-        // Register containers for general settings
-        if (this->type_ == ConfigFileType::Settings)
-            SettingsConfigFile::getInstance().addConfigValueContainer(this);
-    }
-
-    /**
-        @brief Does some special initialization for single config-values.
-    */
-    void ConfigValueContainer::initValue(const MultiType& defvalue)
-    {
-        this->value_ = defvalue;
-        this->bIsVector_ = false;
-
-        this->defvalueString_ = this->value_.getString();
-        this->update();
-    }
-
-    /**
-        @brief Does some special initialization for vector config-values.
-    */
-    void ConfigValueContainer::initVector()
-    {
-        this->bIsVector_ = true;
-
-        for (unsigned int i = 0; i < this->valueVector_.size(); i++)
-        {
-            ConfigFileManager::getInstance().getConfigFile(this->type_)->getOrCreateValue(this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType(MT_Type::String));
-            this->defvalueStringVector_.push_back(this->valueVector_[i]);
-        }
-
-        this->update();
-    }
-
-    /**
-        @brief Destructor: Deletes the callback object if necessary.
-    */
-    ConfigValueContainer::~ConfigValueContainer()
-    {
-        if (this->callback_)
-            delete this->callback_;
-
-        // Unregister general settings containers
-        if (this->type_ == ConfigFileType::Settings && SettingsConfigFile::exists())
-            SettingsConfigFile::getInstance().removeConfigValueContainer(this);
-    }
-
-    /**
-        @brief Assigns a new value to the config-value of all objects and writes the change into the config-file.
-        @param input The new value
-        @return True if the new value was successfully assigned
-    */
-    bool ConfigValueContainer::set(const MultiType& input)
-    {
-        if (this->bIsVector_)
-        {
-            return this->callFunctionWithIndex(&ConfigValueContainer::set, input);
-        }
-        else
-        {
-            if (this->tset(input))
-            {
-                ConfigFileManager::getInstance().getConfigFile(this->type_)->setValue(this->sectionname_, this->varname_, input, this->value_.isType(MT_Type::String));
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-        @brief Assigns a new value to the config-value of all objects and writes the change into the config-file.
-        @param index The index in the vector
-        @param input The new value
-        @return True if the new value was successfully assigned
-    */
-    bool ConfigValueContainer::set(unsigned int index, const MultiType& input)
-    {
-        if (this->bIsVector_)
-        {
-            if (this->tset(index, input))
-            {
-                ConfigFileManager::getInstance().getConfigFile(this->type_)->setValue(this->sectionname_, this->varname_, index, input, this->value_.isType(MT_Type::String));
-                return true;
-            }
-        }
-        else
-        {
-            COUT(1) << "Error: Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is not a vector." << std::endl;
-        }
-        return false;
-    }
-
-    /**
-        @brief Assigns a new value to the config-value of all objects, but doesn't change the config-file (t stands for temporary).
-        @param input The new value. If bIsVector_ then write "index value"
-        @return True if the new value was successfully assigned
-    */
-    bool ConfigValueContainer::tset(const MultiType& input)
-    {
-        if (this->bIsVector_)
-        {
-            return this->callFunctionWithIndex(&ConfigValueContainer::tset, input);
-            return false;
-        }
-        else
-        {
-            this->value_ = input;
-
-            if (this->identifier_)
-                this->identifier_->updateConfigValues();
-
-            return true;
-        }
-    }
-
-    /**
-        @brief Assigns a new value to the config-value of all objects, but doesn't change the config-file (t stands for temporary).
-        @param index The index in the vector
-        @param input The new value
-        @return True if the new value was successfully assigned
-    */
-    bool ConfigValueContainer::tset(unsigned int index, const MultiType& input)
-    {
-        if (this->bIsVector_)
-        {
-            if (index > MAX_VECTOR_INDEX)
-            {
-                COUT(1) << "Error: Index " << index << " is too large." << std::endl;
-                return false;
-            }
-
-            if (index >= this->valueVector_.size())
-            {
-                for (unsigned int i = this->valueVector_.size(); i <= index; i++)
-                {
-                    this->valueVector_.push_back(MultiType());
-                }
-            }
-
-            this->valueVector_[index] = input;
-
-            if (this->identifier_)
-                this->identifier_->updateConfigValues();
-
-            return true;
-        }
-        else
-        {
-            COUT(1) << "Error: Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is not a vector." << std::endl;
-            return false;
-        }
-    }
-
-    /**
-        @brief Adds a new entry to the end of the vector.
-        @param input The new entry
-        @return True if the new entry was successfully added
-    */
-    bool ConfigValueContainer::add(const MultiType& input)
-    {
-        if (this->bIsVector_)
-            return this->set(this->valueVector_.size(), input);
-
-        COUT(1) << "Error: Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is not a vector." << std::endl;
-        return false;
-    }
-
-    /**
-        @brief Removes an existing entry from the vector.
-        @param index The index of the entry
-        @return True if the entry was removed
-    */
-    bool ConfigValueContainer::remove(unsigned int index)
-    {
-        if (this->bIsVector_)
-        {
-            if (index < this->valueVector_.size())
-            {
-                // Erase the entry from the vector, change (shift) all entries beginning with index in the config file, remove the last entry from the file
-                this->valueVector_.erase(this->valueVector_.begin() + index);
-                for (unsigned int i = index; i < this->valueVector_.size(); i++)
-                    ConfigFileManager::getInstance().getConfigFile(this->type_)->setValue(this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType(MT_Type::String));
-                ConfigFileManager::getInstance().getConfigFile(this->type_)->deleteVectorEntries(this->sectionname_, this->varname_, this->valueVector_.size());
-
-                return true;
-            }
-            COUT(1) << "Error: Invalid vector-index." << std::endl;
-        }
-
-        COUT(1) << "Error: Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is not a vector." << std::endl;
-        return false;
-    }
-
-    /**
-        @brief Sets the value of the variable back to the default value and resets the config-file entry.
-    */
-    bool ConfigValueContainer::reset()
-    {
-        if (!this->bIsVector_)
-            return this->set(this->defvalueString_);
-        else
-        {
-            bool success = true;
-            for (unsigned int i = 0; i < this->defvalueStringVector_.size(); i++)
-                if (!this->set(i, this->defvalueStringVector_[i]))
-                    success = false;
-            ConfigFileManager::getInstance().getConfigFile(this->type_)->deleteVectorEntries(this->sectionname_, this->varname_, this->defvalueStringVector_.size());
-            return success;
-        }
-    }
-
-    /**
-        @brief Retrieves the configured value from the currently loaded config-file.
-    */
-    void ConfigValueContainer::update()
-    {
-        if (!this->bIsVector_)
-            this->value_ = ConfigFileManager::getInstance().getConfigFile(this->type_)->getOrCreateValue(this->sectionname_, this->varname_, this->defvalueString_, this->value_.isType(MT_Type::String));
-        else
-        {
-            this->valueVector_.clear();
-            unsigned int vectorSize = ConfigFileManager::getInstance().getConfigFile(this->type_)->getVectorSize(this->sectionname_, this->varname_);
-            for (unsigned int i = 0; i < vectorSize; i++)
-            {
-                if (i < this->defvalueStringVector_.size())
-                {
-                    this->value_ = ConfigFileManager::getInstance().getConfigFile(this->type_)->getOrCreateValue(this->sectionname_, this->varname_, i, this->defvalueStringVector_[i], this->value_.isType(MT_Type::String));
-                }
-                else
-                {
-                    this->value_ = ConfigFileManager::getInstance().getConfigFile(this->type_)->getOrCreateValue(this->sectionname_, this->varname_, i, MultiType(), this->value_.isType(MT_Type::String));
-                }
-
-                this->valueVector_.push_back(this->value_);
-            }
-        }
-    }
-
-    /**
-        @brief Calls the given function with parsed index and the parsed argument from the input string.
-        @param function The function to call
-        @param input The input string
-        @return The returnvalue of the functioncall
-    */
-    bool ConfigValueContainer::callFunctionWithIndex(bool (ConfigValueContainer::* function) (unsigned int, const MultiType&), const std::string& input)
-    {
-        SubString token(input, " ", SubString::WhiteSpaces, true, '\\', false, '"', false, '\0', '\0', false, '\0');
-        int index = -1;
-        bool success = false;
-
-        if (token.size() > 0)
-            success = convertValue(&index, token[0]);
-
-        if (!success || index < 0 || index > (signed int)MAX_VECTOR_INDEX)
-        {
-            if (!success)
-            {
-                COUT(1) << "Error: Config-value '" << this->varname_ << "' in " << this->sectionname_ << " is a vector." << std::endl;
-            }
-            else
-            {
-                COUT(1) << "Error: Invalid vector-index." << std::endl;
-            }
-            return false;
-        }
-
-        if (token.size() >= 2)
-            return (this->*function)(index, token.subSet(1).join());
-        else
-            return (this->*function)(index, "");
-    }
-
-    /**
-        @brief Adds a description to the config-value.
-        @param description The description
-    */
-    ConfigValueContainer& ConfigValueContainer::description(const std::string& description)
-    {
-        if (!this->bAddedDescription_)
-        {
-            this->description_ = std::string("ConfigValueDescription::" + this->sectionname_ + "::" + this->varname_);
-            AddLanguageEntry(this->description_, description);
-            this->bAddedDescription_ = true;
-        }
-        return (*this);
-    }
-
-    /**
-        @brief Returns the description of the config-value.
-        @return The description
-    */
-    const std::string& ConfigValueContainer::getDescription() const
-    {
-        return GetLocalisation(this->description_);
-    }
-}
Index: sandbox_qt/src/libraries/core/ConfigValueContainer.h
===================================================================
--- sandbox_qt/src/libraries/core/ConfigValueContainer.h	(revision 7418)
+++ 	(revision )
@@ -1,305 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup Config ConfigFile
-    @brief Declaration of the ConfigValueContainer class, caches a config-value.
-
-    The ConfigValueContainer class contains all needed information about a configurable variable:
-     - the name of the variable
-     - the name of the class the variable belongs to
-     - the default value
-     - the user-specified value
-     - a pointer to the entry in the config-file
-
-    This is needed to assign the configured values to all newly created objects.
-*/
-
-#ifndef _ConfigValueContainer_H__
-#define _ConfigValueContainer_H__
-
-#include "CorePrereqs.h"
-
-#include <string>
-#include <vector>
-
-#include "util/MultiType.h"
-#include "Identifier.h"
-
-namespace orxonox
-{
-    class ConfigValueCallbackBase
-    {
-        public:
-            virtual void call(void* object) = 0;
-            inline virtual ~ConfigValueCallbackBase() {}
-    };
-
-    template <class T>
-    class ConfigValueCallback: public ConfigValueCallbackBase
-    {
-        public:
-            inline ConfigValueCallback(void (T::*function) (void)) : function_(function) {}
-            inline virtual ~ConfigValueCallback() {}
-            inline virtual void call(void* object)
-            {
-                if (!Identifier::isCreatingHierarchy())
-                    (static_cast<T*>(object)->*this->function_)();
-            }
-
-        private:
-            void (T::*function_) (void);
-    };
-
-
-    /**
-        @brief The ConfigValuecontainer contains all needed information about a configurable variable.
-
-        The ConfigValueContainer class contains all needed information about a configurable variable:
-         - the name of the variable
-         - the name of the class the variable belongs to
-         - the default value
-         - the user-specified value
-         - a pointer to the entry in the config-file
-
-        This is needed to assign the configured values to all newly created objects.
-
-        The container searches for the entry in the config file.
-        If there is an entry, it parses the specified value and assigns it to the variable of the right type.
-        If there is no entry, it adds the entry with the default-value to the section of the variables class.
-        If there is no section, the section and the entry are added to the end of the config-file.
-    */
-    class _CoreExport ConfigValueContainer
-    {
-        public:
-            /**
-                @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
-                @param type The type of the corresponding config-file
-                @param identifier The identifier of the class the variable belongs to
-                @param sectionname Name of the section the configValue should be put in.
-                @param varname The name of the variable
-                @param defvalue The default-value
-                @param value Only needed do determine the right type.
-            */
-            template <class D, class V>
-            ConfigValueContainer(ConfigFileType::Value type, Identifier* identifier, const std::string& sectionname, const std::string& varname, const D& defvalue, const V& value)
-            {
-                this->init(type, identifier, sectionname, varname);
-                this->initValue(static_cast<V>(defvalue));
-            }
-
-            /**
-                @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
-                @param type The type of the corresponding config-file
-                @param identifier The identifier of the class the variable belongs to
-                @param sectionname Name of the section the configValue should be put in.
-                @param varname The name of the variable
-                @param defvalue The default-value
-                @param value Only needed do determine the right type.
-            */
-            template <class D, class V>
-            ConfigValueContainer(ConfigFileType::Value type, Identifier* identifier, const std::string& sectionname, const std::string& varname, const std::vector<D>& defvalue, const std::vector<V>& value)
-            {
-                this->init(type, identifier, sectionname, varname);
-
-                this->value_ = V();
-                for (unsigned int i = 0; i < defvalue.size(); i++)
-                    this->valueVector_.push_back(MultiType(defvalue[i]));
-
-                this->initVector();
-            }
-
-            ~ConfigValueContainer();
-
-            /**
-                @brief Returns the configured value.
-                @param value A pointer to the variable to store the value.
-                @param object The object calling this function
-                @return The ConfigValueContainer
-            */
-            template <typename T, class C>
-            ConfigValueContainer& getValue(T* value, C* object)
-            {
-                if ((this->callback_ && object) || this->bContainerIsNew_)
-                {
-                    T temp = *value;
-                    this->value_.getValue(value);
-                    if (this->bContainerIsNew_ || (*value) != temp)
-                    {
-                        this->bContainerIsNew_ = false;
-                        if (this->callback_ && object)
-                            this->callback_->call(object);
-                        else
-                            this->bDoInitialCallback_ = true;
-                    }
-                }
-                else
-                {
-                    this->value_.getValue(value);
-                }
-                return *this;
-            }
-
-            /**
-                @brief Returns the configured vector.
-                @param value A pointer to the vector to store the values.
-                @param object The object calling this function
-                @return The ConfigValueContainer
-            */
-            template <typename T, class C>
-            ConfigValueContainer& getValue(std::vector<T>* value, C* object)
-            {
-                if ((this->callback_ && object) || this->bContainerIsNew_)
-                {
-                    if (this->bContainerIsNew_)
-                        this->bContainerIsNew_ = false;
-
-                    std::vector<T> temp = *value;
-                    value->clear();
-                    for (unsigned int i = 0; i < this->valueVector_.size(); ++i)
-                        value->push_back(this->valueVector_[i]);
-
-                    if (value->size() != temp.size())
-                    {
-                        if (this->callback_ && object)
-                            this->callback_->call(object);
-                        else
-                            this->bDoInitialCallback_ = true;
-                    }
-                    else
-                    {
-                        for (unsigned int i = 0; i < value->size(); ++i)
-                        {
-                            if ((*value)[i] != temp[i])
-                            {
-                                if (this->callback_ && object)
-                                    this->callback_->call(object);
-                                else
-                                    this->bDoInitialCallback_ = true;
-                                break;
-                            }
-                        }
-                    }
-                }
-                else
-                {
-                    value->clear();
-                    for (unsigned int i = 0; i < this->valueVector_.size(); ++i)
-                        value->push_back(this->valueVector_[i]);
-                }
-                return *this;
-            }
-
-            /// Returns the name of this container.
-            inline const std::string& getName() const
-                { return this->varname_; }
-            /// Returns the name of the section this config value is in.
-            inline const std::string& getSectionName() const
-                { return this->sectionname_; }
-            /// Returns the associated identifier (can be NULL).
-            inline Identifier* getIdentifier() const
-                { return this->identifier_; }
-            /// Returns true if this config-value is a vector.
-            inline bool isVector() const
-                { return this->bIsVector_; }
-            /// Returns the vectors size (or zero if it's not a vector).
-            inline unsigned int getVectorSize() const
-                { return this->valueVector_.size(); }
-
-            ConfigValueContainer& description(const std::string& description);
-            const std::string& getDescription() const;
-
-            /**
-                @brief Adds a callback function, that gets called after getValue() if the newly assigned value differs from the old value of the variable.
-                @param object The object to call the function
-                @param function The callback function
-            */
-            template <class T>
-            inline ConfigValueContainer& callback(T* object, void (T::*function) (void))
-            {
-                if (!this->callback_)
-                {
-                    this->callback_ = new ConfigValueCallback<T>(function);
-
-                    if (this->bDoInitialCallback_)
-                    {
-                        this->bDoInitialCallback_ = false;
-                        this->callback_->call(object);
-                    }
-                }
-
-                return (*this);
-            }
-
-            bool set(const MultiType& input);
-            bool tset(const MultiType& input);
-
-            bool set(unsigned int index, const MultiType& input);
-            bool tset(unsigned int index, const MultiType& input);
-            bool add(const MultiType& input);
-            bool remove(unsigned int index);
-
-            bool reset();
-            void update();
-
-            /// Converts the config-value to a string.
-            inline std::string toString() const
-                { return this->value_; }
-            /// Returns the typename of the assigned config-value.
-            inline std::string getTypename() const
-                { return this->value_.getTypename(); }
-
-        private:
-            void init(ConfigFileType::Value type, Identifier* identifier, const std::string& sectionname, const std::string& varname);
-            void initValue(const MultiType& defvalue);
-            void initVector();
-            bool callFunctionWithIndex(bool (ConfigValueContainer::* function) (unsigned int, const MultiType&), const std::string& input);
-
-            bool                       bIsVector_;                  //!< True if the container contains a std::vector
-
-            ConfigFileType::Value      type_;                       //!< The type of the corresponding config-file
-            Identifier*                identifier_;                 //!< The identifier of the class
-            std::string                sectionname_;                //!< The name of the class the variable belongs to
-            std::string                varname_;                    //!< The name of the variable
-            std::string                defvalueString_;             //!< The string of the default-value
-            std::vector<std::string>   defvalueStringVector_;       //!< A vector, containg the strings of the default-values in case we're storing a vector
-
-            MultiType                  value_;                      //!< The value
-            std::vector<MultiType>     valueVector_;                //!< A vector, containg the values in case we're storing a vector
-
-            bool                       bAddedDescription_;          //!< True if a description was added
-            LanguageEntryLabel         description_;                //!< The description
-            ConfigValueCallbackBase*   callback_;                   //!< A callback function to call after getValue if the value changed
-
-            bool                       bContainerIsNew_;            //!< True if it's the first time getValue() gets called
-            bool                       bDoInitialCallback_;         //!< True if the callback should be called as soon as it gets created
-    };
-}
-
-#endif /* _ConfigValueContainer_H__ */
Index: sandbox_qt/src/libraries/core/ConfigValueIncludes.h
===================================================================
--- sandbox_qt/src/libraries/core/ConfigValueIncludes.h	(revision 7418)
+++ 	(revision )
@@ -1,257 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      Reto Grieder (functions)
- *
- */
-
-/**
-    @defgroup ConfigFile Config file
-    @ingroup Config
-*/
-
-/**
-    @file
-    @ingroup Config ConfigFile
-    @brief Definition of macros and functions for config-values.
-
-    An example of how to use SetConfigValue():
-
-    Definition of a class in the header-file:
-    @code
-    class MyClass : public BaseObject
-    {
-        public:
-            MyClass();              // Constructor
-            void setConfigValues(); // Inherited function
-
-            const std::string& getName()
-                { return this->name_; }
-
-            float getVersion()
-                { return this->version_; }
-
-        private:
-            std::string name_;
-            float version_;
-    };
-    @endcode
-
-    Implementation of the class source-file:
-    @code
-    MyClass::MyClass()
-    {
-        // Macro-call to create an Identifier
-        RegisterObject(MyClass);
-
-        // Function-call to assign the config-values to the new object
-        this->setConfigValues();
-    }
-
-    void MyClass::setConfigValues()
-    {
-        SetConfigValue(name_, "Orxonox").description("The name of the game");
-        SetConfigValue(version_, "1.0").description("The version-number");
-    }
-    @endcode
-
-    Extract of orxonox.ini:
-    @code
-    [MyClass]
-    name_ = "Orxonox"
-    version_ = 1.1 // We have changed this value from 1.0 to 1.1
-    @endcode
-
-    Some other code:
-    @code
-    MyObject orxonoxobject;
-    std::cout << "Name:    " << orxonoxobject.getName() << std::endl;
-    std::cout << "Version: " << orxonoxobject.getVersion() << std::endl;
-    @endcode
-
-    Output:
-    @code
-    Name:    Orxonox
-    Version: 1.1
-    @endcode
-*/
-
-#ifndef _ConfigValueIncludes_H__
-#define _ConfigValueIncludes_H__
-
-#include "CorePrereqs.h"
-
-#include "Identifier.h"
-#include "ConfigValueContainer.h"
-
-namespace orxonox
-{
-    /** Sets a runtime configurable value.
-        If the container for the value doesn't yet exist, a new one is created.
-        Also, the @a variable argument will be modified and set to the new value (default or from ini file).
-    @param object
-        Class instance that the config value should belong to (usually just 'this')
-    @param variable
-        Pointer to the variable where the value should be written to
-    @param type
-        Type of the config file, usually ConfigFileType::Settings
-    @param sectionName
-        Name of the section in the ini file (e.g. [MySection])
-    @param entryName
-        Name of the entry in the ini file (e.g. [MySection] myValue)
-    @param defaultValue
-        Value to be used if it cannot be read from the ini file
-    */
-    template <class T, class D, class V>
-    inline ConfigValueContainer& setConfigValueGeneric(T* object, V* variable, ConfigFileType::Value type, const std::string& sectionName, const std::string& entryName, const D& defaultValue)
-    {
-        ConfigValueContainer* container = ClassIdentifier<T>::getIdentifier()->getConfigValueContainer(entryName);
-        if (!container)
-        {
-            container = new ConfigValueContainer(type, ClassIdentifier<T>::getIdentifier(), sectionName, entryName, defaultValue, *variable);
-            ClassIdentifier<T>::getIdentifier()->addConfigValueContainer(entryName, container);
-        }
-        return container->getValue(variable, object);
-    }
-}
-
-/** Sets a runtime configurable value (simplified macro version of setConfigValueGeneric)
-    If the container for the value doesn't yet exist, a new one is created.
-    Also, the @a varname argument will be modified and set to the new value (default or from ini file).
-@param varname
-    Variable name as C++ identifier. It will be used as entry name and as variable pointer
-@param defaultValue
-    Value to be used if it cannot be read from the ini file
-*/
-#define SetConfigValue(varname, defaultValue) \
-    orxonox::setConfigValueGeneric(this, &varname, ConfigFileType::Settings, this->getIdentifier()->getName(), #varname, defaultValue)
-
-/** Sets a runtime configurable value (simplified macro version of setConfigValueGeneric)
-    If the container for the value doesn't yet exist, a new one is created.
-    Also, the @a varname argument will be modified and set to the new value (default or from ini file).
-@param variable
-    Variable name as C++ identifier.
-@param entryName
-    Name of the entry in the ini file (e.g. [MySection] myValue)
-@param defaultValue
-    Value to be used if it cannot be read from the ini file
-*/
-#define SetConfigValueAlias(variable, entryName, defaultValue) \
-    orxonox::setConfigValueGeneric(this, &variable, ConfigFileType::Settings, this->getIdentifier()->getName(), entryName, defaultValue)
-
-/** Sets a runtime configurable value (simplified macro version of setConfigValueGeneric)
-    If the container for the value doesn't yet exist, a new one is created.
-    Also, the @a varname argument will be modified and set to the new value (default or from ini file).
-@param variable
-    Variable name as C++ identifier.
-@param sectionName
-    Name of the section in the ini file (e.g. [MySection])
-@param entryName
-    Name of the entry in the ini file (e.g. [MySection] myValue)
-@param defaultValue
-    Value to be used if it cannot be read from the ini file
-*/
-#define SetConfigValueExternal(variable, sectionName, entryName, defaultValue) \
-    orxonox::setConfigValueGeneric(this, &variable, ConfigFileType::Settings, sectionName, entryName, defaultValue)
-
-
-namespace orxonox
-{
-    /** Resets a runtime configurable value to its default.
-        If the container for the value doesn't yet exist, a warning is displayed.
-        Also, the @a variable argument will be modified and set to the default value.
-    @param object
-        Class instance that the config value should belong to (usually just 'this')
-    @param variable
-        Pointer to the variable where the value should be written to
-    @param entryName
-        Name of the entry in the ini file (e.g. [MySection] myValue)
-    */
-    template <class T, class V>
-    inline void resetConfigValueGeneric(T* object, V* variable, const std::string& entryName)
-    {
-        ConfigValueContainer* container = ClassIdentifier<T>::getIdentifier()->getConfigValueContainer(entryName);
-        if (container)
-        {
-            container->reset();
-            container->getValue(variable, object);
-        }
-        else
-        {
-            COUT(2) << "Warning: Couldn't reset config-value '" << entryName << "' in class '"
-                    << ClassIdentifier<T>::getIdentifier()->getName() << "', corresponding container doesn't exist." << std::endl;
-        }
-    }
-}
-
-/** Resets a runtime configurable value to its default (simplified macro version of modifyConfigValueGeneric)
-    If the container for the value doesn't yet exist, a warning is displayed.
-    Also, the @a varname argument will be modified and set to the default value.
-@param varname
-    Variable name as C++ identifier. It will be used as entry name and as variable pointer
-*/
-#define ResetConfigValue(varname) \
-    orxonox::resetConfigValueGeneric(this, &varname, #varname)
-
-
-/** Modifies a runtime configurable value by using a modifier and some arguments.
-    If the container for the value doesn't yet exist, a warning is displayed.
-    Also, the @a variable argument will be modified and set to the current value.
-@param object
-    Class instance that the config value should belong to (usually just 'this')
-@param variable
-    Pointer to the variable where the value should be written to
-@param entryName
-    Name of the entry in the ini file (e.g. [MySection] myValue)
-@param modifier
-    On of these functions: set, tset, add, remove, reset, update
-@param ...
-    Arguments for the modifier function
-*/
-#define ModifyConfigValueGeneric(object, variable, entryName, modifier, ...) \
-    if (orxonox::ConfigValueContainer* container = ClassByObjectType(object)->getConfigValueContainer(entryName)) \
-    { \
-        container->modifier(__VA_ARGS__); \
-        container->getValue(variable, object); \
-    } \
-    else \
-    { \
-        COUT(2) << "Warning: Couln't modify config-value '" << entryName << "' in class '" \
-                << ClassByObjectType(object)->getName() << "', corresponding container doesn't exist." << std::endl; \
-    }
-
-/** Modifies a runtime configurable value by using a modifier and some arguments.
-    If the container for the value doesn't yet exist, a warning is displayed.
-    Also, the @a varname argument will be modified and set to the current value.
-@param varname
-    Variable name as C++ identifier. It will be used as entry name and as variable pointer
-@param modifier
-    On of these functions: set, tset, add, remove, reset, update
-@param ...
-    Arguments for the modifier function
-*/
-#define ModifyConfigValue(varname, modifier, ...) \
-    ModifyConfigValueGeneric(this, &varname, #varname, modifier, __VA_ARGS__)
-
-#endif /* _ConfigValueIncludes_H__ */
Index: sandbox_qt/src/libraries/core/CoreIncludes.h
===================================================================
--- sandbox_qt/src/libraries/core/CoreIncludes.h	(revision 7418)
+++ 	(revision )
@@ -1,179 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @defgroup Factory RegisterObject() and CreateFactory()
-    @ingroup Object
-*/
-
-/**
-    @file
-    @ingroup Object Factory
-    @brief Defines several very important macros used to register objects, create factories, and to work with identifiers.
-
-    Every class needs the @c RegisterObject(class) macro in its constructor. If the class is an interface
-    or the @c BaseObject itself, it needs the macro @c RegisterRootObject(class) instead.
-
-    To allow the object being created through the factory, use the @c CreateFactory(class) macro outside
-    of the class implementation, so it gets executed statically before @c main(). This will at the same time
-    register @a class in the class-hierarchy. If you don't want @a class to be loadable, but still
-    register it, call @c CreateUnloadableFactory(class).
-
-    Example:
-    @code
-    // Create the factory for MyClass
-    CreateFactory(MyClass);
-
-    // Constructor:
-    MyClass::MyClass()
-    {
-        // Register the object in the Identifier of MyClass
-        RegisterObject(MyClass);
-    }
-    @endcode
-
-    This file also defines a number of other useful macros, like, for example, @c Class(class) which
-    returns the @ref orxonox::Identifier "Identifier" of @a class, or @c ClassByString("class") which
-    returns the Identifier of a class with name @a "class".
-
-    Example:
-    @code
-    // Assigns the Identifier of MyClass
-    Identifier* identifier = Class(MyClass);
-    @endcode
-    @code
-    // Assigns the Identifier of a class named "MyClass"
-    Identifier* identifier = ClassByString("MyClass");
-    @endcode
-*/
-
-#ifndef _CoreIncludes_H__
-#define _CoreIncludes_H__
-
-#include "CorePrereqs.h"
-
-#include "util/Debug.h"
-#include "Identifier.h"
-#include "SubclassIdentifier.h"
-#include "ClassFactory.h"
-#include "ObjectList.h"
-
-
-/**
-    @brief Intern macro, containing the common parts of @c RegisterObject and @c RegisterRootObject.
-    @param ClassName The name of the class
-    @param bRootClass True if the class is directly derived from orxonox::OrxonoxClass
-*/
-#define InternRegisterObject(ClassName, bRootClass) \
-    if (ClassIdentifier<ClassName>::getIdentifier(#ClassName)->initialiseObject(this, #ClassName, bRootClass)) \
-        return; \
-    else \
-        ((void)0)
-
-/**
-    @brief Registers a newly created object in the core. Has to be called at the beginning of the constructor of @a ClassName.
-    @param ClassName The name of the class
-*/
-#define RegisterObject(ClassName) \
-    InternRegisterObject(ClassName, false)
-
-/**
-    @brief Registers a newly created object in the core. Has to be called at the beginning of the constructor of @a ClassName.
-    @param ClassName The name of the class
-
-    In contrast to RegisterObject, this is used for classes that inherit directly from
-    orxonox::OrxonoxClass, namely all interfaces and orxonox::BaseObject.
-*/
-#define RegisterRootObject(ClassName) \
-    InternRegisterObject(ClassName, true)
-
-/**
-    @brief Creates the Factory.
-    @param ClassName The name of the class
-*/
-#define CreateFactory(ClassName) \
-    Factory* _##ClassName##Factory = new orxonox::ClassFactory<ClassName>(#ClassName, true)
-
-/**
-    @brief Creates the Factory for classes which should not be loaded through XML.
-    @param ClassName The name of the class
-*/
-#define CreateUnloadableFactory(ClassName) \
-    Factory* _##ClassName##Factory = new orxonox::ClassFactory<ClassName>(#ClassName, false)
-
-/**
-    @brief Returns the Identifier of the given class.
-    @param ClassName The name of the class
-*/
-#define Class(ClassName) \
-    orxonox::ClassIdentifier<ClassName>::getIdentifier()
-
-
-namespace orxonox
-{
-    /**
-        @brief Returns the Identifier with a given name.
-        @param name The name of the class
-    */
-    inline Identifier* ClassByString(const std::string& name)
-    {
-        return Identifier::getIdentifierByString(name);
-    }
-
-    /**
-        @brief Returns the Identifier with a given lowercase name.
-        @param name The lowercase name of the class
-    */
-    inline Identifier* ClassByLowercaseString(const std::string& name)
-    {
-        return Identifier::getIdentifierByLowercaseString(name);
-    }
-
-    /**
-        @brief Returns the Identifier with a given network ID.
-        @param id The network ID of the class
-    */
-    inline Identifier* ClassByID(uint32_t id)
-    {
-        return Identifier::getIdentifierByID(id);
-    }
-
-    /**
-        @brief Returns the Identifier with a given 'this' pointer.
-        @note This of course only works with OrxonoxClasses.
-              The only use is in conjunction with macros that don't know the class type.
-        @param object Pointer to an OrxonoxClass
-    */
-    template <class T>
-    inline Identifier* ClassByObjectType(const T* object)
-    {
-        return ClassIdentifier<T>::getIdentifier();
-    }
-}
-
-#endif /* _CoreIncludes_H__ */
Index: sandbox_qt/src/libraries/core/DynLib.cc
===================================================================
--- sandbox_qt/src/libraries/core/DynLib.cc	(revision 7418)
+++ 	(revision )
@@ -1,138 +1,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-    (Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2006 Torus Knot Software Ltd
-Also see acknowledgements in Readme.html
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU Lesser General Public License as published by the Free Software
-Foundation; either version 2 of the License, or (at your option) any later
-version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public License along with
-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-Place - Suite 330, Boston, MA 02111-1307, USA, or go to
-http://www.gnu.org/copyleft/lesser.txt.
-
-You may alternatively use this source under the terms of a specific version of
-the OGRE Unrestricted License provided you have obtained such a license from
-Torus Knot Software Ltd.
------------------------------------------------------------------------------
-*/
-
-// 08/11/2009: Small adjustments for Orxonox by Fabian 'x3n' Landau
-
-#include "DynLib.h"
-
-#include "util/Exception.h"
-
-#ifdef ORXONOX_PLATFORM_WINDOWS
-#  define WIN32_LEAN_AND_MEAN
-#  ifndef NOMINMAX
-#    define NOMINMAX // required to stop windows.h messing up std::min
-#  endif
-#  include <windows.h>
-#endif
-
-#ifdef ORXONOX_PLATFORM_LINUX
-#  include <dlfcn.h>
-#endif
-
-#ifdef ORXONOX_PLATFORM_APPLE
-#  include <macPlugins.h>
-#endif
-
-namespace orxonox
-{
-    //-----------------------------------------------------------------------
-    DynLib::DynLib( const std::string& name )
-    {
-        mName = name;
-        m_hInst = NULL;
-    }
-
-    //-----------------------------------------------------------------------
-    DynLib::~DynLib()
-    {
-    }
-
-    //-----------------------------------------------------------------------
-    void DynLib::load()
-    {
-        // Log library load
-        COUT(2) << "Loading module " << mName << std::endl;
-
-        std::string name = mName;
-#ifdef ORXONOX_PLATFORM_LINUX
-        // dlopen() does not add .so to the filename, like windows does for .dll
-        if (name.substr(name.length() - 3, 3) != ".so")
-           name += ".so";
-#endif
-
-        m_hInst = (DYNLIB_HANDLE)DYNLIB_LOAD( name.c_str() );
-
-        if (!m_hInst)
-            ThrowException(
-                General,
-                "Could not load dynamic library " + mName +
-                ".  System Error: " + dynlibError());
-    }
-
-    //-----------------------------------------------------------------------
-    void DynLib::unload()
-    {
-        // Log library unload
-        COUT(4) << "Unloading module " << mName << std::endl;
-
-        if (DYNLIB_UNLOAD( m_hInst ))
-        {
-            ThrowException(
-                General,
-                "Could not unload dynamic library " + mName +
-                ".  System Error: " + dynlibError());
-        }
-
-    }
-
-    //-----------------------------------------------------------------------
-    void* DynLib::getSymbol( const std::string& strName ) const throw()
-    {
-        return (void*)DYNLIB_GETSYM( m_hInst, strName.c_str() );
-    }
-    //-----------------------------------------------------------------------
-    std::string DynLib::dynlibError( void )
-    {
-#if defined(ORXONOX_PLATFORM_WINDOWS)
-        LPVOID lpMsgBuf;
-        FormatMessage(
-            FORMAT_MESSAGE_ALLOCATE_BUFFER |
-            FORMAT_MESSAGE_FROM_SYSTEM |
-            FORMAT_MESSAGE_IGNORE_INSERTS,
-            NULL,
-            GetLastError(),
-            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-            (LPTSTR) &lpMsgBuf,
-            0,
-            NULL
-            );
-        std::string ret = (char*)lpMsgBuf;
-        // Free the buffer.
-        LocalFree( lpMsgBuf );
-        return ret;
-#elif defined(ORXONOX_PLATFORM_LINUX)
-        return std::string(dlerror());
-#elif defined(ORXONOX_PLATFORM_APPLE)
-        return std::string(mac_errorBundle());
-#else
-        return "";
-#endif
-    }
-
-}
Index: sandbox_qt/src/libraries/core/DynLib.h
===================================================================
--- sandbox_qt/src/libraries/core/DynLib.h	(revision 7418)
+++ 	(revision )
@@ -1,125 +1,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-    (Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2006 Torus Knot Software Ltd
-Also see acknowledgements in Readme.html
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU Lesser General Public License as published by the Free Software
-Foundation; either version 2 of the License, or (at your option) any later
-version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public License along with
-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-Place - Suite 330, Boston, MA 02111-1307, USA, or go to
-http://www.gnu.org/copyleft/lesser.txt.
-
-You may alternatively use this source under the terms of a specific version of
-the OGRE Unrestricted License provided you have obtained such a license from
-Torus Knot Software Ltd.
------------------------------------------------------------------------------
-*/
-
-// 08/11/2009: Small adjustments for Orxonox by Fabian 'x3n' Landau
-
-/**
-    @file
-    @ingroup Management CoreGame
-    @brief Declaration of DynLib which represents a dynamically loaded module.
-*/
-
-#ifndef _Core_DynLib_H__
-#define _Core_DynLib_H__
-
-#include "CorePrereqs.h"
-
-#include <string>
-
-#if defined(ORXONOX_PLATFORM_WINDOWS)
-#    define DYNLIB_HANDLE hInstance
-#    define DYNLIB_LOAD( a ) LoadLibraryEx( a, NULL, LOAD_WITH_ALTERED_SEARCH_PATH )
-#    define DYNLIB_GETSYM( a, b ) GetProcAddress( a, b )
-#    define DYNLIB_UNLOAD( a ) !FreeLibrary( a )
-
-struct HINSTANCE__;
-typedef struct HINSTANCE__* hInstance;
-
-#elif defined(ORXONOX_PLATFORM_LINUX)
-#    define DYNLIB_HANDLE void*
-#    define DYNLIB_LOAD( a ) dlopen( a, RTLD_LAZY | RTLD_GLOBAL)
-#    define DYNLIB_GETSYM( a, b ) dlsym( a, b )
-#    define DYNLIB_UNLOAD( a ) dlclose( a )
-
-#elif defined(ORXONOX_PLATFORM_APPLE)
-#    define DYNLIB_HANDLE CFBundleRef
-#    define DYNLIB_LOAD( a ) mac_loadExeBundle( a )
-#    define DYNLIB_GETSYM( a, b ) mac_getBundleSym( a, b )
-#    define DYNLIB_UNLOAD( a ) mac_unloadExeBundle( a )
-#endif
-
-namespace orxonox
-{
-    /** %Resource holding data about a dynamic library.
-        @remarks
-            This class holds the data required to get symbols from
-            libraries loaded at run-time (i.e. from DLL's for so's)
-        @author
-            Adrian Cearnãu (cearny@cearny.ro)
-        @since
-            27 January 2002
-    */
-    class _CoreExport DynLib
-    {
-    protected:
-        std::string mName;
-        /// Gets the last loading error
-        std::string dynlibError(void);
-    public:
-        /** Default constructor - used by DynLibManager.
-            @warning
-                Do not call directly
-        */
-        DynLib( const std::string& name );
-
-        /** Default destructor.
-        */
-        ~DynLib();
-
-        /** Load the library
-        */
-        void load();
-        /** Unload the library
-        */
-        void unload();
-        /// Get the name of the library
-        const std::string& getName(void) const { return mName; }
-
-        /**
-            Returns the address of the given symbol from the loaded library.
-            @param
-                strName The name of the symbol to search for
-            @returns
-                If the function succeeds, the returned value is a handle to
-                the symbol.
-            @par
-                If the function fails, the returned value is <b>NULL</b>.
-
-        */
-        void* getSymbol( const std::string& strName ) const throw();
-
-    protected:
-
-        /// Handle to the loaded library.
-        DYNLIB_HANDLE m_hInst;
-    };
-
-}
-
-#endif /* _Core_DynLib_H__ */
Index: sandbox_qt/src/libraries/core/DynLibManager.cc
===================================================================
--- sandbox_qt/src/libraries/core/DynLibManager.cc	(revision 7418)
+++ 	(revision )
@@ -1,86 +1,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-    (Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2006 Torus Knot Software Ltd
-Also see acknowledgements in Readme.html
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU Lesser General Public License as published by the Free Software
-Foundation; either version 2 of the License, or (at your option) any later
-version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public License along with
-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-Place - Suite 330, Boston, MA 02111-1307, USA, or go to
-http://www.gnu.org/copyleft/lesser.txt.
-
-You may alternatively use this source under the terms of a specific version of
-the OGRE Unrestricted License provided you have obtained such a license from
-Torus Knot Software Ltd.
------------------------------------------------------------------------------
-*/
-
-// 08/11/2009: Small adjustments for Orxonox by Fabian 'x3n' Landau
-
-#include "DynLibManager.h"
-
-#include "DynLib.h"
-
-namespace orxonox
-{
-    //-----------------------------------------------------------------------
-    //! Static pointer to the singleton
-    DynLibManager* DynLibManager::singletonPtr_s  = 0;
-
-    //-----------------------------------------------------------------------
-    DynLibManager::DynLibManager()
-    {
-    }
-    //-----------------------------------------------------------------------
-    DynLib* DynLibManager::load( const std::string& filename)
-    {
-        DynLibList::iterator i = mLibList.find(filename);
-        if (i != mLibList.end())
-        {
-            return i->second;
-        }
-        else
-        {
-            DynLib* pLib = new DynLib(filename);
-            pLib->load();
-            mLibList[filename] = pLib;
-            return pLib;
-        }
-    }
-    //-----------------------------------------------------------------------
-    void DynLibManager::unload(DynLib* lib)
-    {
-        DynLibList::iterator i = mLibList.find(lib->getName());
-        if (i != mLibList.end())
-        {
-            mLibList.erase(i);
-        }
-        lib->unload();
-        delete lib;
-    }
-    //-----------------------------------------------------------------------
-    DynLibManager::~DynLibManager()
-    {
-        // Unload & delete resources in turn
-        for (DynLibList::iterator it = mLibList.begin(); it != mLibList.end(); ++it)
-        {
-            it->second->unload();
-            delete it->second;
-        }
-
-        // Empty the list
-        mLibList.clear();
-    }
-}
Index: sandbox_qt/src/libraries/core/DynLibManager.h
===================================================================
--- sandbox_qt/src/libraries/core/DynLibManager.h	(revision 7418)
+++ 	(revision )
@@ -1,104 +1,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-    (Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2006 Torus Knot Software Ltd
-Also see acknowledgements in Readme.html
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU Lesser General Public License as published by the Free Software
-Foundation; either version 2 of the License, or (at your option) any later
-version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public License along with
-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-Place - Suite 330, Boston, MA 02111-1307, USA, or go to
-http://www.gnu.org/copyleft/lesser.txt.
-
-You may alternatively use this source under the terms of a specific version of
-the OGRE Unrestricted License provided you have obtained such a license from
-Torus Knot Software Ltd.
------------------------------------------------------------------------------
-*/
-
-// 08/11/2009: Small adjustments for Orxonox by Fabian 'x3n' Landau
-
-/**
-    @file
-    @ingroup Management CoreGame
-    @brief Declaration of DynLibManager, used to load modules at runtime.
-*/
-
-#ifndef _Core_DynLibManager_H__
-#define _Core_DynLibManager_H__
-
-#include "CorePrereqs.h"
-
-#include <map>
-#include <string>
-#include "util/Singleton.h"
-
-namespace orxonox
-{
-    /** Manager for Dynamic-loading Libraries.
-        @remarks
-            This manager keeps a track of all the open dynamic-loading
-            libraries, opens them and returns references to already-open
-            libraries.
-    */
-    class _CoreExport DynLibManager: public Singleton<DynLibManager>
-    {
-        friend class Singleton<DynLibManager>;
-
-        protected:
-            typedef std::map<std::string, DynLib*> DynLibList;
-            DynLibList mLibList;
-
-        public:
-            /**
-            @brief
-                Default constructor.
-            @note
-                Should never be called as the singleton is automatically
-                created during the creation of the Root object.
-            @see
-                Root::Root
-            */
-            DynLibManager();
-
-            /**
-            @brief
-                Default destructor.
-            @see
-                Root::~Root
-            */
-            virtual ~DynLibManager();
-
-            /**
-            @brief
-                Loads the passed library.
-            @param filename
-                The name of the library. The extension can be omitted
-            */
-            DynLib* load(const std::string& filename);
-
-            /**
-            @brief
-                Unloads the passed library.
-            @param lib
-                A pointer to the library object
-            */
-            void unload(DynLib* lib);
-
-        private:
-            static DynLibManager* singletonPtr_s;
-    };
-}
-
-#endif /* _Core_DynLibManager_H__ */
Index: sandbox_qt/src/libraries/core/Event.cc
===================================================================
--- sandbox_qt/src/libraries/core/Event.cc	(revision 7418)
+++ 	(revision )
@@ -1,110 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Implementation of the classes Event and EventState.
-*/
-
-#include "Event.h"
-
-#include "BaseObject.h"
-#include "Identifier.h"
-
-namespace orxonox
-{
-    /**
-        @brief Processes an event (calls the set-function if the necessary conditions are met).
-
-        @param event     The fired event
-        @param object    The object whose state is affected by the event (only needed for debug output)
-    */
-    void EventState::process(const Event& event, BaseObject* object)
-    {
-        if (this->bProcessingEvent_)
-        {
-            COUT(2) << "Warning: Detected Event loop in section \"" << event.statename_ << "\" of object \"" << object->getName() << "\" and fired by \"" << event.originator_->getName() << '"' << std::endl;
-            return;
-        }
-
-        this->bProcessingEvent_ = true;
-
-        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;
-
-        // check if the originator is an instance of the requested class
-        if (event.originator_->isA(this->subclass_))
-        {
-            // If the EventState doesn't act as an EventSink.
-            // actualize the activationcounter
-            if(!this->bSink_)
-            {
-                if (event.activate_)
-                    ++this->activeEvents_;
-                else
-                {
-                    --this->activeEvents_;
-
-                    if (this->activeEvents_ < 0)
-                        this->activeEvents_ = 0;
-                }
-            }
-
-            if (this->statefunction_->getParamCount() == 0 && event.activate_)
-            {
-                // if the eventfunction doesn't have a state, just call it whenever an activation-event comes in
-                (*this->statefunction_)();
-            }
-            else if (this->bSink_ || (!this->bSink_ && ((this->activeEvents_ == 1 && event.activate_) || (this->activeEvents_ == 0 && !event.activate_)) ) )
-            {
-                // if the eventfunction needs a state, we just call the function if the state changed from 0 to 1 (state = true) or from 1 to 0 (state = false) [but not if activeEvents_ is > 1]
-                if (this->statefunction_->getParamCount() == 1)
-                {
-                    // one argument: just the eventstate
-                    (*this->statefunction_)(event.activate_);
-                }
-                else if (this->statefunction_->getParamCount() >= 2)
-                {
-                    // two arguments: the eventstate and the originator
-                    if (this->subclass_->isExactlyA(ClassIdentifier<BaseObject>::getIdentifier()))
-                    {
-                        // if the subclass is BaseObject, we don't have to cast the pointer
-                        (*this->statefunction_)(event.activate_, event.originator_);
-                    }
-                    else
-                    {
-                        // else cast the pointer to the desired class
-                        void* castOriginator = event.originator_->getDerivedPointer(this->subclass_->getClassID());
-                        (*this->statefunction_)(event.activate_, castOriginator);
-                    }
-                }
-            }
-        }
-
-        this->bProcessingEvent_ = false;
-    }
-}
Index: sandbox_qt/src/libraries/core/Event.h
===================================================================
--- sandbox_qt/src/libraries/core/Event.h	(revision 7418)
+++ 	(revision )
@@ -1,96 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @defgroup Event Events
-    @ingroup Core
-*/
-
-/**
-    @file
-    @ingroup Event
-    @brief Declaration of the classes Event and EventState.
-*/
-
-#ifndef _Event_H__
-#define _Event_H__
-
-#include "CorePrereqs.h"
-#include <string>
-
-namespace orxonox
-{
-    /**
-        @brief The Event struct contains information about a fired Event.
-    */
-    struct _CoreExport Event
-    {
-        Event(bool activate, BaseObject* originator, const std::string& name) : activate_(activate), originator_(originator), name_(name) {}
-
-        bool        activate_;   //!< True if this is an activating event (the event source was inactive before and just triggered the event) - false otherwise
-        std::string statename_;  //!< The name of the state this event affects
-        BaseObject* originator_; //!< The object which triggered this event
-        std::string name_;       //!< The name of this event
-
-    };
-
-    /**
-        @brief The EventState contains information about an event state.
-
-        An event state is a state of an object, which can be changed by events.
-        Event states are changed through functions. Possible functions headers for set event states are:
-         - memoryless state: <tt>function()</tt>
-         - boolean state:    <tt>function(bool state)</tt>
-         - individual state: <tt>function(bool state, SomeClass originator)</tt>
-
-        Note that SomeClass may be any class deriving from BaseObject. You will not receive events from originators of other classes.
-        The actual class for SomeClass must be specified as the second argument of the XMLPortEventState() macro.
-
-        The this pointer of the affected object is hidden in the functors, because the events are processed in the BaseObject, but some
-        statefunctions may be from child-classes.
-    */
-    class _CoreExport EventState
-    {
-        public:
-            EventState(const FunctorPtr& statefunction, Identifier* subclass, bool bSink = false) : bProcessingEvent_(false), activeEvents_(0), statefunction_(statefunction), subclass_(subclass), bSink_(bSink) {}
-
-            void process(const Event& event, BaseObject* object);
-
-            const FunctorPtr& getFunctor() const
-                { return this->statefunction_; }
-
-        private:
-            bool        bProcessingEvent_;  //!< This becomes true while the container processes an event (used to prevent loops)
-            int         activeEvents_;      //!< The number of events which affect this state and are currently active
-            FunctorPtr  statefunction_;     //!< A functor to set the state
-            Identifier* subclass_;          //!< Originators must be an instance of this class (usually BaseObject, but some statefunctions allow a second argument with an originator of a specific class)
-            bool        bSink_;             //!< Determines whether the EventState acts as an EventSink forwarding any Event (even if the state didn't change) or in the normal manner, only processing Events that change the state.
-    };
-}
-
-#endif /* _Event_H__ */
Index: sandbox_qt/src/libraries/core/EventIncludes.h
===================================================================
--- sandbox_qt/src/libraries/core/EventIncludes.h	(revision 7418)
+++ 	(revision )
@@ -1,108 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup Event
-    @brief Definition of the XMLPortEventState() macro, as well as some more useful macros.
-*/
-
-#ifndef _EventIncludes_H__
-#define _EventIncludes_H__
-
-#include "CorePrereqs.h"
-#include "XMLPort.h"
-#include "command/Executor.h"
-
-/**
-    @brief Defines a new event state (a state of the object which can be changed by events).
-
-    @param classname    The name of this class
-    @param subclassname Usually BaseObject - if different, only instances of this class can send events to this object
-    @param statename    The name (string) of this state
-    @param function     The function which should be used to set the state
-    @param xmlelement   Argument for XMLPort
-    @param mode         Argument for XMLPort
-*/
-#define XMLPortEventState(classname, subclassname, statename, function, xmlelement, mode) \
-    orxonox::EventState* containername##function = this->getEventState(statename); \
-    if (!containername##function) \
-    { \
-        containername##function = new orxonox::EventState(orxonox::createFunctor(&classname::function, this), orxonox::ClassIdentifier<subclassname>::getIdentifier()); \
-        this->addEventState(statename, containername##function); \
-    } \
-    XMLPortEventStateIntern(xmlportevent##function, classname, statename, xmlelement, mode)
-
-/**
-    @brief Like XMLPortEventState but creates an event sink instead of an event state.
-           The most important destinction between an EventState and an EventSink is, that an EventState only processes events which change the state of the EventState, where as an EventSink is an EventState that processes any Event that reaches it.
-*/
-
-#define XMLPortEventSink(classname, subclassname, statename, function, xmlelement, mode) \
-    orxonox::EventState* containername##function = this->getEventState(statename); \
-    if (!containername##function) \
-    { \
-        containername##function = new orxonox::EventState(orxonox::createFunctor(&classname::function, this), orxonox::ClassIdentifier<subclassname>::getIdentifier(), true); \
-        this->addEventState(statename, containername##function); \
-    } \
-    XMLPortEventStateIntern(xmlportevent##function, classname, statename, xmlelement, mode)
-
-
-#define XMLPortEventStateTemplate(classname, subclassname, statename, function, xmlelement, mode, ...) \
-    orxonox::EventState* containername##function = this->getEventState(statename); \
-    if (!containername##function) \
-    { \
-        containername##function = new orxonox::EventState(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::function, this), orxonox::ClassIdentifier<subclassname>::getIdentifier()); \
-        this->addEventState(statename, containername##function); \
-    } \
-    XMLPortEventStateIntern(xmlportevent##function, classname, statename, xmlelement, mode)
-
-#define XMLPortEventStateIntern(name, classname, statename, xmlelement, mode) \
-    static orxonox::ExecutorMemberPtr<classname> xmlsetfunctor##name = orxonox::createExecutor(orxonox::createFunctor(&classname::addEventSource), std::string( #classname ) + "::" + "addEventSource" + '(' + statename + ')').cast<orxonox::ExecutorMember<classname> >(); \
-    static orxonox::ExecutorMemberPtr<classname> xmlgetfunctor##name = orxonox::createExecutor(orxonox::createFunctor(&classname::getEventSource), std::string( #classname ) + "::" + "getEventSource" + '(' + statename + ')').cast<orxonox::ExecutorMember<classname> >(); \
-    xmlsetfunctor##name->setDefaultValue(1, statename); \
-    xmlgetfunctor##name->setDefaultValue(1, statename); \
-    XMLPortObjectGeneric(xmlport##name, classname, orxonox::BaseObject, statename, xmlsetfunctor##name, xmlgetfunctor##name, xmlelement, mode, false, true)
-
-
-/**
-    @brief Defines a new event name for a class. Named events can only have names which were defined with this macro.
-
-    @param classname The name of the class
-    @param name      The name of the event
-*/
-#define CreateEventName(classname, name) \
-    static std::string eventname##classname##name = #name
-
-/**
-    @brief This macro is needed to fire an event with this name. The event name must previously be declared with @ref CreateEventName.
-*/
-#define FireEventName(classname, name) \
-    eventname##classname##name
-
-#endif /* _EventIncludes_H__ */
Index: sandbox_qt/src/libraries/core/GUIManager.cc
===================================================================
--- sandbox_qt/src/libraries/core/GUIManager.cc	(revision 7418)
+++ 	(revision )
@@ -1,442 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *      Benjamin Knecht
- *   Co-authors:
- *      ...
- *
- */
-
-#include "GUIManager.h"
-
-#include <boost/bind.hpp>
-#include <memory>
-extern "C" {
-#include <lua.h>
-}
-#include <CEGUIDefaultLogger.h>
-#include <CEGUIExceptions.h>
-#include <CEGUIInputEvent.h>
-#include <CEGUIMouseCursor.h>
-#include <CEGUIResourceProvider.h>
-#include <CEGUISystem.h>
-#include <CEGUIWindow.h>
-#include <CEGUIWindowManager.h>
-#include <ogreceguirenderer/OgreCEGUIRenderer.h>
-
-#include "SpecialConfig.h" // Configures the macro below
-#ifdef CEGUILUA_USE_INTERNAL_LIBRARY
-#   include <ceguilua/CEGUILua.h>
-#else
-#   include <CEGUILua.h>
-#endif
-
-#include "util/Clock.h"
-#include "util/Convert.h"
-#include "util/Debug.h"
-#include "util/Exception.h"
-#include "util/OrxAssert.h"
-#include "Core.h"
-#include "GraphicsManager.h"
-#include "LuaState.h"
-#include "PathConfig.h"
-#include "Resource.h"
-#include "command/ConsoleCommand.h"
-#include "input/InputManager.h"
-#include "input/InputState.h"
-#include "input/KeyBinderManager.h"
-
-namespace orxonox
-{
-    static void key_esc()
-        { GUIManager::getInstance().keyESC(); }
-    SetConsoleCommand("keyESC", &key_esc);
-
-    class CEGUILogger : public CEGUI::DefaultLogger
-    {
-    public:
-        void logEvent(const CEGUI::String& message, CEGUI::LoggingLevel level = CEGUI::Standard)
-        {
-            int orxonoxLevel = CEGUI::Standard;
-            switch (level)
-            {
-                case CEGUI::Errors:      orxonoxLevel = 1; break;
-                case CEGUI::Warnings:    orxonoxLevel = 2; break;
-                case CEGUI::Standard:    orxonoxLevel = 4; break;
-                case CEGUI::Informative: orxonoxLevel = 5; break;
-                case CEGUI::Insane:      orxonoxLevel = 6; break;
-                default: OrxAssert(false, "CEGUI log level out of range, inpect immediately!");
-            }
-            OutputHandler::getOutStream(orxonoxLevel)
-                << "CEGUI: " << message << std::endl;
-
-            CEGUI::DefaultLogger::logEvent(message, level);
-        }
-    };
-
-    static CEGUI::MouseButton convertButton(MouseButtonCode::ByEnum button);
-
-    GUIManager* GUIManager::singletonPtr_s = 0;
-
-    SetConsoleCommand("showGUI", &GUIManager::showGUI).defaultValue(1, false).defaultValue(2, false);
-    SetConsoleCommand("hideGUI", &GUIManager::hideGUI);
-
-    /**
-    @brief
-        Constructs the GUIManager by starting up CEGUI
-
-        Creates the interface to Ogre, sets up the CEGUI renderer and the Lua script module together with the Lua engine.
-        The log is set up and connected to the CEGUILogger.
-        After Lua setup tolua++-elements are linked to Lua-state to give Lua access to C++-code.
-        Finally initial Lua code is executed (maybe we can do this with the CEGUI startup script automatically).
-    @return true if success, otherwise false
-    */
-    GUIManager::GUIManager(const std::pair<int, int>& mousePosition)
-        : resourceProvider_(NULL)
-        , camera_(NULL)
-    {
-        using namespace CEGUI;
-
-        COUT(3) << "Initialising CEGUI." << std::endl;
-
-        // Note: No SceneManager specified yet
-        guiRenderer_.reset(new OgreCEGUIRenderer(GraphicsManager::getInstance().getRenderWindow(), Ogre::RENDER_QUEUE_OVERLAY, false, 3000));
-        resourceProvider_ = guiRenderer_->createResourceProvider();
-        resourceProvider_->setDefaultResourceGroup("GUI");
-
-        // Setup scripting
-        luaState_.reset(new LuaState());
-        rootFileInfo_ = Resource::getInfo("InitialiseGUI.lua");
-        // This is necessary to ensure that input events also use the right resource info when triggering lua functions
-        luaState_->setDefaultResourceInfo(this->rootFileInfo_);
-        scriptModule_.reset(new LuaScriptModule(luaState_->getInternalLuaState()));
-        scriptModule_->setDefaultPCallErrorHandler(LuaState::ERROR_HANDLER_NAME);
-
-        // Create our own logger to specify the filepath
-        std::auto_ptr<CEGUILogger> ceguiLogger(new CEGUILogger());
-        ceguiLogger->setLogFilename(PathConfig::getLogPathString() + "cegui.log");
-        // set the log level according to ours (translate by subtracting 1)
-        ceguiLogger->setLoggingLevel(
-            static_cast<LoggingLevel>(OutputHandler::getInstance().getSoftDebugLevel("logFile") - 1));
-        this->ceguiLogger_ = ceguiLogger.release();
-
-        // Create the CEGUI system singleton
-        guiSystem_.reset(new System(guiRenderer_.get(), resourceProvider_, 0, scriptModule_.get()));
-
-        // Align CEGUI mouse with OIS mouse
-        guiSystem_->injectMousePosition((float)mousePosition.first, (float)mousePosition.second);
-
-        // Initialise the Lua framework and load the schemes
-        this->luaState_->doFile("InitialiseGUI.lua");
-
-        // Create the root nodes
-        this->rootWindow_ = CEGUI::WindowManager::getSingleton().createWindow("MenuWidgets/StaticImage", "AbsoluteRootWindow");
-        this->rootWindow_->setProperty("FrameEnabled", "False");
-        this->hudRootWindow_ = CEGUI::WindowManager::getSingleton().createWindow("DefaultWindow", "HUDRootWindow");
-        this->menuRootWindow_ = CEGUI::WindowManager::getSingleton().createWindow("DefaultWindow", "MenuRootWindow");
-        // And connect them
-        CEGUI::System::getSingleton().setGUISheet(this->rootWindow_);
-        this->rootWindow_->addChildWindow(this->hudRootWindow_);
-        this->rootWindow_->addChildWindow(this->menuRootWindow_);
-
-        // No background to start with (sets the alpha value to 0)
-        this->setBackgroundImage("");
-
-        // Set up the sheet manager in the Lua framework
-        this->luaState_->doFile("SheetManager.lua");
-    }
-
-    /**
-    @brief
-        Basically shuts down CEGUI (member smart pointers) but first unloads our Tolua modules.
-    */
-    GUIManager::~GUIManager()
-    {
-    }
-
-    /**
-    @brief
-        used to tick the GUI
-    @param time
-        clock which provides time value for the GUI System
-
-        Ticking the GUI means updating it with a certain regularity.
-        The elapsed time since the last call is given in the time value provided by the clock.
-        This time value is then used to provide a fluent animation of the GUI.
-    */
-    void GUIManager::preUpdate(const Clock& time)
-    {
-        assert(guiSystem_);
-        this->protectedCall(boost::bind(&CEGUI::System::injectTimePulse, _1, time.getDeltaTime()));
-    }
-
-    /**
-    @brief
-        Tells the GUIManager which SceneManager to use
-    @param camera
-        The current camera on which the GUI should be displayed on.
-
-        In fact the GUIManager needs the SceneManager and not the Camera to display the GUI.
-        This means the GUI is not bound to a camera but rather to the SceneManager.
-        Hiding the GUI when needed can therefore not be resolved by just NOT setting the current camera.
-    */
-    void GUIManager::setCamera(Ogre::Camera* camera)
-    {
-        this->camera_ = camera;
-        if (camera == NULL)
-            this->guiRenderer_->setTargetSceneManager(0);
-        else
-            this->guiRenderer_->setTargetSceneManager(camera->getSceneManager());
-    }
-
-    /**
-    @brief
-        Executes Lua code
-    @param str
-        reference to string object holding the Lua code which is to be executed
-    */
-    void GUIManager::executeCode(const std::string& str)
-    {
-        this->luaState_->doString(str, rootFileInfo_);
-    }
-
-    /** Loads a GUI sheet by Lua script
-    @param name
-        The name of the GUI (like the script name, but without the extension)
-    */
-    void GUIManager::loadGUI(const std::string& name)
-    {
-        this->executeCode("loadSheet(\"" + name + "\")");
-    }
-
-    /**
-    @brief
-        Displays specified GUI on screen
-    @param name
-        The name of the GUI
-    @param bHidePrevious
-        If true all displayed GUIs on the stack, that are below this GUI are hidden.
-    @param bNoInput
-        If true the GUI is transparent to input.
-
-        The function executes the Lua function with the same name in case the GUIManager is ready.
-    */
-    /*static*/ void GUIManager::showGUI(const std::string& name, bool bHidePrevious, bool bNoInput)
-    {
-        GUIManager::getInstance().executeCode("showMenuSheet(\"" + name + "\", " + multi_cast<std::string>(bHidePrevious) + ", " + multi_cast<std::string>(bNoInput) + ")");
-    }
-
-    /**
-    @brief
-        Hack-ish. Needed for GUIOverlay.
-    */
-    void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr, bool bHidePrevious, bool bNoInput)
-    {
-        this->executeCode("showMenuSheet(\"" + name + "\", " + multi_cast<std::string>(bHidePrevious) + ", " + multi_cast<std::string>(bNoInput) + ", " + ptr + ")");
-    }
-
-    /**
-    @brief
-        Hides specified GUI.
-    @param name
-        The name of the GUI.
-    */
-    /*static*/ void GUIManager::hideGUI(const std::string& name)
-    {
-        GUIManager::getInstance().executeCode("hideMenuSheet(\"" + name + "\")");
-    }
-
-    const std::string& GUIManager::createInputState(const std::string& name, TriBool::Value showCursor, TriBool::Value useKeyboard, bool bBlockJoyStick)
-    {
-        InputState* state = InputManager::getInstance().createInputState(name);
-
-        /* Table that maps isFullScreen() and showCursor to mouseExclusive
-        isFullscreen / showCursor | True  | False | Dontcare
-        ----------------------------------------------------
-        true                      | True  | True  | Dontcare
-        ----------------------------------------------------
-        false                     | False | True  | Dontcare
-        */
-        if (showCursor == TriBool::Dontcare)
-            state->setMouseExclusive(TriBool::Dontcare);
-        else if (GraphicsManager::getInstance().isFullScreen() || showCursor == TriBool::False)
-            state->setMouseExclusive(TriBool::True);
-        else
-            state->setMouseExclusive(TriBool::False);
-
-        if (showCursor == TriBool::True)
-            state->setMouseHandler(this);
-        else if (showCursor == TriBool::False)
-            state->setMouseHandler(&InputHandler::EMPTY);
-
-        if (useKeyboard == TriBool::True)
-            state->setKeyHandler(this);
-        else if (useKeyboard == TriBool::False)
-            state->setKeyHandler(&InputHandler::EMPTY);
-
-        if (bBlockJoyStick)
-            state->setJoyStickHandler(&InputHandler::EMPTY);
-
-        return state->getName();
-    }
-
-    void GUIManager::keyESC()
-    {
-        this->executeCode("keyESC()");
-    }
-
-    void GUIManager::setBackgroundImage(const std::string& imageSet, const std::string imageName)
-    {
-        if (imageSet.empty() || imageName.empty())
-            this->setBackgroundImage("");
-        else
-            this->setBackgroundImage("set: " + imageSet + " image: " + imageName);
-    }
-
-    void GUIManager::setBackgroundImage(const std::string& image)
-    {
-        if (image.empty())
-            this->rootWindow_->setProperty("Alpha", "0.0");
-        else
-            this->rootWindow_->setProperty("Alpha", "1.0");
-        this->rootWindow_->setProperty("Image", image);
-    }
-
-    void GUIManager::buttonPressed(const KeyEvent& evt)
-    {
-        this->protectedCall(boost::bind(&CEGUI::System::injectKeyDown, _1, evt.getKeyCode()));
-        this->protectedCall(boost::bind(&CEGUI::System::injectChar, _1, evt.getText()));
-    }
-
-    void GUIManager::buttonReleased(const KeyEvent& evt)
-    {
-        this->protectedCall(boost::bind(&CEGUI::System::injectKeyUp, _1, evt.getKeyCode()));
-    }
-
-    /**
-    @brief
-        Function receiving a mouse button pressed event.
-    @param id
-        ID of the mouse button which got pressed
-
-        This function is inherited by MouseHandler and injects the event into CEGUI.
-        It is for CEGUI to process the event.
-    */
-    void GUIManager::buttonPressed(MouseButtonCode::ByEnum id)
-    {
-        this->protectedCall(boost::bind(&CEGUI::System::injectMouseButtonDown, _1, convertButton(id)));
-    }
-
-    /**
-    @brief
-        Function receiving a mouse button released event.
-    @param id
-        ID of the mouse button which got released
-
-        This function is inherited by MouseHandler and injects the event into CEGUI.
-        It is for CEGUI to process the event.
-    */
-    void GUIManager::buttonReleased(MouseButtonCode::ByEnum id)
-    {
-        this->protectedCall(boost::bind(&CEGUI::System::injectMouseButtonUp, _1, convertButton(id)));
-    }
-
-    void GUIManager::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
-    {
-        this->protectedCall(boost::bind(&CEGUI::System::injectMousePosition, _1, (float)abs.x, (float)abs.y));
-    }
-
-    void GUIManager::mouseScrolled(int abs, int rel)
-    {
-        this->protectedCall(boost::bind(&CEGUI::System::injectMouseWheelChange, _1, (float)rel));
-    }
-
-    /**
-    @brief
-        converts mouse event code to CEGUI event code
-    @param button
-        code of the mouse button as we use it in Orxonox
-    @return
-        code of the mouse button as it is used by CEGUI
-
-        Simple conversion from mouse event code in Orxonox to the one used in CEGUI.
-     */
-    static inline CEGUI::MouseButton convertButton(MouseButtonCode::ByEnum button)
-    {
-        switch (button)
-        {
-        case MouseButtonCode::Left:
-            return CEGUI::LeftButton;
-
-        case MouseButtonCode::Right:
-            return CEGUI::RightButton;
-
-        case MouseButtonCode::Middle:
-            return CEGUI::MiddleButton;
-
-        case MouseButtonCode::Button3:
-            return CEGUI::X1Button;
-
-        case MouseButtonCode::Button4:
-            return CEGUI::X2Button;
-
-        default:
-            return CEGUI::NoButton;
-        }
-    }
-
-    /** Executes a CEGUI function normally, but catches CEGUI::ScriptException.
-        When a ScriptException occurs, the error message will be displayed and
-        the program carries on.
-    @remarks
-        The exception behaviour may pose problems if the code is not written
-        exception-safe (and you can forget about that in Lua). The program might
-        be left in an undefined state. But otherwise one script error would
-        terminate the whole program...
-    @note
-        Your life gets easier if you use boost::bind to create the object/function.
-    @param function
-        Any callable object/function that takes this->guiSystem_ as its only parameter.
-    @return
-        True if input was handled, false otherwise. A caught exception yields true.
-    */
-    template <typename FunctionType>
-    bool GUIManager::protectedCall(FunctionType function)
-    {
-        try
-        {
-            return function(this->guiSystem_);
-        }
-        catch (CEGUI::ScriptException& ex)
-        {
-            // Display the error and proceed. See @remarks why this can be dangerous.
-            COUT(1) << ex.getMessage() << std::endl;
-            return true;
-        }
-    }
-
-    void GUIManager::subscribeEventHelper(CEGUI::Window* window, const std::string& event, const std::string& function)
-    {
-        window->subscribeScriptedEvent(event, function);
-    }
-}
Index: sandbox_qt/src/libraries/core/GUIManager.h
===================================================================
--- sandbox_qt/src/libraries/core/GUIManager.h	(revision 7418)
+++ 	(revision )
@@ -1,146 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *      Benjamin Knecht
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup Graphics
-*/
-
-#ifndef _GUIManager_H__
-#define _GUIManager_H__
-
-#include "CorePrereqs.h"
-
-#include <map>
-#include <set>
-#include <string>
-#include <CEGUIForwardRefs.h>
-#include <boost/scoped_ptr.hpp>
-#include <boost/shared_ptr.hpp>
-
-#include "util/OgreForwardRefs.h"
-#include "util/TriBool.h"
-#include "util/Singleton.h"
-#include "input/InputHandler.h"
-
-// Tolua includes (have to be relative to the current directory)
-/*
-$cfile "../util/TriBool.h" // tolua_export
-*/
-
-namespace orxonox // tolua_export
-{ // tolua_export
-    class PlayerInfo; // Forward declaration
-
-    /**
-    @class GUIManager
-    @brief
-        Provides a simple interface to CEGUI with tolua methods and console commands. It also acts as a key and mouse handler.
-
-        The GUIManager is a singleton and can be called anywhere when access on the GUI is needed.
-
-        Since the GUI needs user input, the GUIManager implements the functions needed to act as a key and/or mouse handler.
-        Those input events are then injected into CEGUI in Lua.
-    */
-    class _CoreExport GUIManager // tolua_export
-        : public Singleton<GUIManager>, public InputHandler
-    { // tolua_export
-        friend class Singleton<GUIManager>;
-    public:
-        GUIManager(const std::pair<int, int>& mousePosition);
-        ~GUIManager();
-
-        void preUpdate(const Clock& time);
-
-        void loadGUI(const std::string& name);
-        static void showGUI(const std::string& name, bool bHidePrevious = false, bool bNoInput = false);
-        void showGUIExtra(const std::string& name, const std::string& ptr, bool bHidePrevious = false, bool bNoInput = false);
-        static void hideGUI(const std::string& name);
-        void keyESC();
-        void setBackgroundImage(const std::string& imageSet, const std::string imageName); // tolua_export
-        void setBackgroundImage(const std::string& image);
-
-        //! Creates a new InputState to be used with a GUI Sheet
-        const std::string& createInputState(const std::string& name, TriBool::Value showCursor = TriBool::True, TriBool::Value useKeyboard = TriBool::True, bool bBlockJoyStick = false); // tolua_export
-        LuaState* getLuaState(void)
-            { return this->luaState_.get(); }
-
-        //! Returns the root window for all menu sheets
-        CEGUI::Window* getMenuRootWindow() { return this->menuRootWindow_; } // tolua_export
-        //! Returns the root window for all HUD sheets
-        CEGUI::Window* getHUDRootWindow() { return this->hudRootWindow_; } // tolua_export
-
-        void setCamera(Ogre::Camera* camera);
-        Ogre::Camera* getCamera() { return this->camera_; }
-
-        inline void setPlayer(const std::string& guiname, PlayerInfo* player)
-            { this->players_[guiname] = player; }
-        inline orxonox::PlayerInfo* getPlayer(const std::string& guiname) const { std::map<std::string, PlayerInfo*>::const_iterator it = this->players_.find(guiname); return (it != this->players_.end()) ? it->second : 0; } // tolua_export
-
-        // TODO: Temporary hack because the tolua exported CEGUI method does not seem to work
-        static void subscribeEventHelper(CEGUI::Window* window, const std::string& event, const std::string& function); //tolua_export
-
-        static GUIManager& getInstance() { return Singleton<GUIManager>::getInstance(); } // tolua_export
-
-    private:
-        GUIManager(const GUIManager& instance); //!< private and undefined copy c'tor (this is a singleton class)
-        void executeCode(const std::string& str);
-
-        template <typename FunctionType>
-        bool protectedCall(FunctionType function);
-
-        // keyHandler functions
-        void buttonPressed (const KeyEvent& evt);
-        void buttonReleased(const KeyEvent& evt);
-
-        // mouseHandler functions
-        void buttonPressed (MouseButtonCode::ByEnum id);
-        void buttonReleased(MouseButtonCode::ByEnum id);
-        void mouseMoved    (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize);
-        void mouseScrolled (int abs, int rel);
-
-        scoped_ptr<CEGUI::OgreCEGUIRenderer> guiRenderer_;      //!< CEGUI's interface to the Ogre Engine
-        scoped_ptr<LuaState>                 luaState_;         //!< LuaState, access point to the Lua engine
-        scoped_ptr<CEGUI::LuaScriptModule>   scriptModule_;     //!< CEGUI's script module to use Lua
-        scoped_ptr<CEGUI::System>            guiSystem_;        //!< CEGUI's main system
-        shared_ptr<ResourceInfo>             rootFileInfo_;     //!< Resource information about the root script
-        CEGUI::ResourceProvider*             resourceProvider_; //!< CEGUI's resource provider
-        CEGUI::Logger*                       ceguiLogger_;      //!< CEGUI's logger to be able to log CEGUI errors in our log
-        CEGUI::Window*                       rootWindow_;       //!< Root node for all windows
-        CEGUI::Window*                       hudRootWindow_;    //!< Root node for the HUD sheets
-        CEGUI::Window*                       menuRootWindow_;   //!< Root node for the menu sheets (used by Lua)
-        std::map<std::string, PlayerInfo*>   players_;          //!< Stores the player (owner) for each GUI
-        Ogre::Camera*                        camera_;           //!< Camera used to render the scene with the GUI
-
-        static GUIManager*                   singletonPtr_s;    //!< Singleton reference to GUIManager
-
-    }; // tolua_export
-} // tolua_export
-
-#endif /* _GUIManager_H__ */
Index: sandbox_qt/src/libraries/core/GameMode.cc
===================================================================
--- sandbox_qt/src/libraries/core/GameMode.cc	(revision 7418)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "GameMode.h"
-
-namespace orxonox
-{
-    bool GameMode::bShowsGraphics_s = false;
-    bool GameMode::bPlaysSound_s    = false;
-    bool GameMode::bIsServer_s      = false;
-    bool GameMode::bIsClient_s      = false;
-    bool GameMode::bIsStandalone_s  = false;
-    bool GameMode::bIsMaster_s      = false;
-}
Index: sandbox_qt/src/libraries/core/GameMode.h
===================================================================
--- sandbox_qt/src/libraries/core/GameMode.h	(revision 7418)
+++ 	(revision )
@@ -1,84 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup Management CoreGame
-    @brief Declaration of the GameMode class which stores and returns the current mode of the game.
-*/
-
-#ifndef _GameMode_H__
-#define _GameMode_H__
-
-#include "CorePrereqs.h"
-
-// tolua_begin
-namespace orxonox
-{
-    /// Helper class, stores and returns the current mode of the game.
-    class _CoreExport GameMode
-    {
-// tolua_end
-        friend class Core;
-
-        public:
-// tolua_begin
-            static bool showsGraphics() { return bShowsGraphics_s; }    ///< Returns true if the game shows graphics, false if it is in text-console mode
-            static bool playsSound()    { return bPlaysSound_s; }       ///< Returns true if the game is able to play sounds
-            static bool isServer()      { return bIsServer_s; }         ///< Returns true if we're currently a server (online)
-            static bool isClient()      { return bIsClient_s; }         ///< Returns true if we're currently a client (online)
-            static bool isStandalone()  { return bIsStandalone_s; }     ///< Returns true if we're in standalone mode (offline)
-            static bool isMaster()      { return bIsMaster_s; }         ///< Returns true if we're in control of the game (either standalone or server)
-// tolua_end
-
-            static void setPlaysSound   (bool val) { bPlaysSound_s    = val; }                      ///< Defines if the game can play sounds
-            static void setIsServer     (bool val) { bIsServer_s      = val; updateIsMaster(); }    ///< Defines if the program is in server mode (online)
-            static void setIsClient     (bool val) { bIsClient_s      = val; updateIsMaster(); }    ///< Defines if the program is in client mode (online)
-            static void setIsStandalone (bool val) { bIsStandalone_s  = val; updateIsMaster(); }    ///< Defines if the program is in standalone mode (offline)
-
-        private:
-            GameMode();
-            GameMode(const GameMode& inst);
-            ~GameMode();
-
-            /// Checks if we're in control of the game (either standalone or server).
-            static void updateIsMaster()
-            {
-                bIsMaster_s = (bIsServer_s || bIsStandalone_s);
-            }
-
-            static bool bShowsGraphics_s;                   //!< global variable that tells whether to show graphics
-            static bool bPlaysSound_s;                      //!< global variable that tells whether to sound works
-            static bool bIsServer_s;                        //!< global variable that tells whether this is a server (online)
-            static bool bIsClient_s;                        //!< global variable that tells whether this is a client (online)
-            static bool bIsStandalone_s;                    //!< global variable that tells whether the game is running in standalone mode (offline)
-            static bool bIsMaster_s;                        //!< global variable that tells whether we're in control of the game (standalone or server)
-    }; // tolua_export
-} // tolua_export
-
-#endif /* _GameMode_H__ */
Index: sandbox_qt/src/libraries/core/GameState.cc
===================================================================
--- sandbox_qt/src/libraries/core/GameState.cc	(revision 7418)
+++ 	(revision )
@@ -1,97 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-@file
-@brief
-    Implementation of GameState class.
-*/
-
-#include "GameState.h"
-
-#include "util/Debug.h"
-#include "util/Exception.h"
-#include "util/OrxAssert.h"
-#include "Game.h"
-
-namespace orxonox
-{
-    /**
-    @brief
-        Constructor only initialises variables and sets the name permanently.
-    */
-    GameState::GameState(const GameStateInfo& info)
-        : info_(info)
-    {
-        this->activity_.activating   = false;
-        this->activity_.active       = false;
-        this->activity_.deactivating = false;
-        this->activity_.suspended    = false;
-        this->activity_.topState     = false;
-        this->activity_.updating     = false;
-    }
-
-    /**
-    @brief
-        Destructor only checks that we don't delete an active state.
-    */
-    GameState::~GameState()
-    {
-        OrxAssert(this->activity_.active == false, "Deleting an active GameState is a very bad idea..");
-    }
-
-    const std::string& GameState::getName() const
-    {
-        return info_.stateName;
-    }
-
-    void GameState::activateInternal()
-    {
-        this->activity_.activating = true;
-        this->activate();
-        this->activity_.activating = false;
-        this->activity_.active = true;
-    }
-
-    void GameState::deactivateInternal()
-    {
-        this->activity_.active = false;
-        this->activity_.deactivating = true;
-        this->deactivate();
-        this->activity_.deactivating = false;
-        this->activity_.suspended = false;
-        this->activity_.updating = false;
-    }
-
-    void GameState::updateInternal(const Clock& time)
-    {
-        this->activity_.updating = true;
-        this->update(time);
-        this->activity_.updating = false;
-    }
-}
Index: sandbox_qt/src/libraries/core/GameState.h
===================================================================
--- sandbox_qt/src/libraries/core/GameState.h	(revision 7418)
+++ 	(revision )
@@ -1,104 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-@file
-@ingroup Management CoreGame
-@brief
-    Definition of GameState class.
-*/
-
-#ifndef _GameState_H__
-#define _GameState_H__
-
-#include "CorePrereqs.h"
-
-#include <map>
-#include <string>
-#include "util/UtilPrereqs.h"
-
-namespace orxonox
-{
-    /**
-    @brief
-        An implementation of a tree to manage game states.
-        This leads to a certain hierarchy that is created at runtime.
-        To actually use the structure, you will have to derive from it and
-        implement 'enter', 'leave' and 'tick'. The latter corresponds to an
-        update function.
-
-        Internally the tree is managed by two maps per node: One stores all its
-        children, grandchildren, etc. by name of the state. The other maps these
-        children states to the actual child of the node.
-        An example: Foo is a grandchildren of Bar and Foofoo is the Foo's parent.
-        Then Bar stores Foo in map by its name. The other one then maps Foo to Foofoo.
-    */
-    class _CoreExport GameState
-    {
-        friend class Game;
-
-    public:
-        /**
-        @brief
-            Gives information about what the GameState is currently doing
-        */
-        struct State
-        {
-            unsigned active       : 1;
-            unsigned activating   : 1;
-            unsigned deactivating : 1;
-            unsigned updating     : 1;
-            unsigned suspended    : 1;
-            unsigned topState     : 1;
-        };
-
-    public:
-        GameState(const GameStateInfo& info);
-        virtual ~GameState();
-
-        const std::string& getName()   const;
-        State getActivity()            const { return activity_; }
-        const GameStateInfo& getInfo() const { return info_; }
-
-    protected:
-        virtual void activate() { }
-        virtual void deactivate() { }
-        virtual void update(const Clock& time) { }
-
-    private:
-        void setActivity(State activity);
-        void activateInternal();
-        void deactivateInternal();
-        void updateInternal(const Clock& time);
-
-        const GameStateInfo& info_;
-        State                activity_;
-    };
-}
-
-#endif /* _GameState_H__ */
Index: sandbox_qt/src/libraries/core/GraphicsManager.cc
===================================================================
--- sandbox_qt/src/libraries/core/GraphicsManager.cc	(revision 7418)
+++ 	(revision )
@@ -1,457 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *      Benjamin Knecht <beni_at_orxonox.net>, (C) 2007
- *   Co-authors:
- *      Felix Schulthess
- *
- */
-
-#include "GraphicsManager.h"
-
-#include <fstream>
-#include <sstream>
-#include <boost/filesystem.hpp>
-#include <boost/shared_array.hpp>
-
-#include <OgreArchiveFactory.h>
-#include <OgreArchiveManager.h>
-#include <OgreFrameListener.h>
-#include <OgreRoot.h>
-#include <OgreLogManager.h>
-#include <OgreRenderWindow.h>
-#include <OgreRenderSystem.h>
-#include <OgreResourceGroupManager.h>
-#include <OgreTextureManager.h>
-#include <OgreViewport.h>
-#include <OgreWindowEventUtilities.h>
-
-#include "SpecialConfig.h"
-#include "util/Clock.h"
-#include "util/Exception.h"
-#include "util/StringUtils.h"
-#include "util/SubString.h"
-#include "ConfigValueIncludes.h"
-#include "CoreIncludes.h"
-#include "Game.h"
-#include "GameMode.h"
-#include "Loader.h"
-#include "MemoryArchive.h"
-#include "PathConfig.h"
-#include "WindowEventListener.h"
-#include "XMLFile.h"
-#include "command/ConsoleCommand.h"
-
-namespace orxonox
-{
-    static const std::string __CC_printScreen_name = "printScreen";
-    DeclareConsoleCommand(__CC_printScreen_name, &prototype::void__void);
-
-    class OgreWindowEventListener : public Ogre::WindowEventListener
-    {
-    public:
-        void windowResized     (Ogre::RenderWindow* rw)
-            { orxonox::WindowEventListener::resizeWindow(rw->getWidth(), rw->getHeight()); }
-        void windowFocusChange (Ogre::RenderWindow* rw)
-            { orxonox::WindowEventListener::changeWindowFocus(); }
-        void windowClosed      (Ogre::RenderWindow* rw)
-            { orxonox::Game::getInstance().stop(); }
-        void windowMoved       (Ogre::RenderWindow* rw)
-            { orxonox::WindowEventListener::moveWindow(); }
-    };
-
-    GraphicsManager* GraphicsManager::singletonPtr_s = 0;
-
-    /**
-    @brief
-        Non-initialising constructor.
-    */
-    GraphicsManager::GraphicsManager(bool bLoadRenderer)
-        : ogreWindowEventListener_(new OgreWindowEventListener())
-#if OGRE_VERSION < 0x010600
-        , memoryArchiveFactory_(new MemoryArchiveFactory())
-#endif
-        , renderWindow_(0)
-        , viewport_(0)
-    {
-        RegisterObject(GraphicsManager);
-
-        this->setConfigValues();
-
-        // Ogre setup procedure (creating Ogre::Root)
-        this->loadOgreRoot();
-
-        // At first, add the root paths of the data directories as resource locations
-        Ogre::ResourceGroupManager::getSingleton().addResourceLocation(PathConfig::getDataPathString(), "FileSystem");
-        // Load resources
-        resources_.reset(new XMLFile("DefaultResources.oxr"));
-        resources_->setLuaSupport(false);
-        Loader::open(resources_.get());
-
-        // Only for development runs
-        if (PathConfig::isDevelopmentRun())
-        {
-            Ogre::ResourceGroupManager::getSingleton().addResourceLocation(PathConfig::getExternalDataPathString(), "FileSystem");
-            extResources_.reset(new XMLFile("resources.oxr"));
-            extResources_->setLuaSupport(false);
-            Loader::open(extResources_.get());
-        }
-
-        if (bLoadRenderer)
-        {
-            // Reads the ogre config and creates the render window
-            this->upgradeToGraphics();
-        }
-    }
-
-    /**
-    @brief
-        Destruction is done by the member scoped_ptrs.
-    */
-    GraphicsManager::~GraphicsManager()
-    {
-        Loader::unload(debugOverlay_.get());
-
-        Ogre::WindowEventUtilities::removeWindowEventListener(renderWindow_, ogreWindowEventListener_.get());
-        ModifyConsoleCommand(__CC_printScreen_name).resetFunction();
-
-        // Undeclare the resources
-        Loader::unload(resources_.get());
-        if (PathConfig::isDevelopmentRun())
-            Loader::unload(extResources_.get());
-    }
-
-    void GraphicsManager::setConfigValues()
-    {
-        SetConfigValue(ogreConfigFile_,  "ogre.cfg")
-            .description("Location of the Ogre config file");
-        SetConfigValue(ogrePluginsDirectory_, specialConfig::ogrePluginsDirectory)
-            .description("Folder where the Ogre plugins are located.");
-        SetConfigValue(ogrePlugins_, specialConfig::ogrePlugins)
-            .description("Comma separated list of all plugins to load.");
-        SetConfigValue(ogreLogFile_,     "ogre.log")
-            .description("Logfile for messages from Ogre. Use \"\" to suppress log file creation.");
-        SetConfigValue(ogreLogLevelTrivial_ , 5)
-            .description("Corresponding orxonox debug level for ogre Trivial");
-        SetConfigValue(ogreLogLevelNormal_  , 4)
-            .description("Corresponding orxonox debug level for ogre Normal");
-        SetConfigValue(ogreLogLevelCritical_, 2)
-            .description("Corresponding orxonox debug level for ogre Critical");
-    }
-
-    /**
-    @brief
-        Loads the renderer and creates the render window if not yet done so.
-    @remarks
-        This operation is irreversible without recreating the GraphicsManager!
-        So if it throws you HAVE to recreate the GraphicsManager!!!
-        It therefore offers almost no exception safety.
-    */
-    void GraphicsManager::upgradeToGraphics()
-    {
-        if (renderWindow_ != NULL)
-            return;
-
-        // load all the required plugins for Ogre
-        this->loadOgrePlugins();
-
-        this->loadRenderer();
-
-#if OGRE_VERSION < 0x010600
-        // WORKAROUND: There is an incompatibility for particle scripts when trying
-        // to support both Ogre 1.4 and 1.6. The hacky solution is to create
-        // scripts for the 1.6 version and then remove the inserted "particle_system"
-        // keyword. But we need to supply these new scripts as well, which is why
-        // there is an extra Ogre::Archive dealing with it in the memory.
-        using namespace Ogre;
-        ArchiveManager::getSingleton().addArchiveFactory(memoryArchiveFactory_.get());
-        const StringVector& groups = ResourceGroupManager::getSingleton().getResourceGroups();
-        // Travers all groups
-        for (StringVector::const_iterator itGroup = groups.begin(); itGroup != groups.end(); ++itGroup)
-        {
-            FileInfoListPtr files = ResourceGroupManager::getSingleton().findResourceFileInfo(*itGroup, "*.particle");
-            for (FileInfoList::const_iterator itFile = files->begin(); itFile != files->end(); ++itFile)
-            {
-                // open file
-                Ogre::DataStreamPtr input = ResourceGroupManager::getSingleton().openResource(itFile->filename, *itGroup, false);
-                std::stringstream output;
-                // Parse file and replace "particle_system" with nothing
-                while (!input->eof())
-                {
-                    std::string line = input->getLine();
-                    size_t pos = line.find("particle_system");
-                    if (pos != std::string::npos)
-                    {
-                        // 15 is the length of "particle_system"
-                        line.replace(pos, 15, "");
-                    }
-                    output << line << std::endl;
-                }
-                // Add file to the memory archive
-                shared_array<char> data(new char[output.str().size()]);
-                // Debug optimisations
-                const std::string& outputStr = output.str();
-                char* rawData = data.get();
-                for (unsigned i = 0; i < outputStr.size(); ++i)
-                    rawData[i] = outputStr[i];
-                MemoryArchive::addFile("particle_scripts_ogre_1.4_" + *itGroup, itFile->filename, data, output.str().size());
-            }
-            if (!files->empty())
-            {
-                // Declare the files, but using a new group
-                ResourceGroupManager::getSingleton().addResourceLocation("particle_scripts_ogre_1.4_" + *itGroup,
-                    "Memory", "particle_scripts_ogre_1.4_" + *itGroup);
-            }
-        }
-#endif
-
-        // Initialise all resources (do this AFTER the renderer has been loaded!)
-        // Note: You can only do this once! Ogre will check whether a resource group has
-        // already been initialised. If you need to load resources later, you will have to
-        // choose another resource group.
-        Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
-    }
-
-    /**
-    @brief
-        Creates the Ogre Root object and sets up the ogre log.
-    */
-    void GraphicsManager::loadOgreRoot()
-    {
-        COUT(3) << "Setting up Ogre..." << std::endl;
-
-        if (ogreConfigFile_.empty())
-        {
-            COUT(2) << "Warning: Ogre config file set to \"\". Defaulting to config.cfg" << std::endl;
-            ModifyConfigValue(ogreConfigFile_, tset, "config.cfg");
-        }
-        if (ogreLogFile_.empty())
-        {
-            COUT(2) << "Warning: Ogre log file set to \"\". Defaulting to ogre.log" << std::endl;
-            ModifyConfigValue(ogreLogFile_, tset, "ogre.log");
-        }
-
-        boost::filesystem::path ogreConfigFilepath(PathConfig::getConfigPath() / this->ogreConfigFile_);
-        boost::filesystem::path ogreLogFilepath(PathConfig::getLogPath() / this->ogreLogFile_);
-
-        // create a new logManager
-        // Ogre::Root will detect that we've already created a Log
-        ogreLogger_.reset(new Ogre::LogManager());
-        COUT(4) << "Ogre LogManager created" << std::endl;
-
-        // create our own log that we can listen to
-        Ogre::Log *myLog;
-        myLog = ogreLogger_->createLog(ogreLogFilepath.string(), true, false, false);
-        COUT(4) << "Ogre Log created" << std::endl;
-
-        myLog->setLogDetail(Ogre::LL_BOREME);
-        myLog->addListener(this);
-
-        COUT(4) << "Creating Ogre Root..." << std::endl;
-
-        // check for config file existence because Ogre displays (caught) exceptions if not
-        if (!boost::filesystem::exists(ogreConfigFilepath))
-        {
-            // create a zero sized file
-            std::ofstream creator;
-            creator.open(ogreConfigFilepath.string().c_str());
-            creator.close();
-        }
-
-        // Leave plugins file empty. We're going to do that part manually later
-        ogreRoot_.reset(new Ogre::Root("", ogreConfigFilepath.string(), ogreLogFilepath.string()));
-
-        COUT(3) << "Ogre set up done." << std::endl;
-    }
-
-    void GraphicsManager::loadOgrePlugins()
-    {
-        // just to make sure the next statement doesn't segfault
-        if (ogrePluginsDirectory_.empty())
-            ogrePluginsDirectory_ = '.';
-
-        boost::filesystem::path folder(ogrePluginsDirectory_);
-        // Do some SubString magic to get the comma separated list of plugins
-        SubString plugins(ogrePlugins_, ",", " ", false, '\\', false, '"', false, '{', '}', false, '\0');
-        // Use backslash paths on Windows! file_string() already does that though.
-        for (unsigned int i = 0; i < plugins.size(); ++i)
-            ogreRoot_->loadPlugin((folder / plugins[i]).file_string());
-    }
-
-    void GraphicsManager::loadRenderer()
-    {
-        CCOUT(4) << "Configuring Renderer" << std::endl;
-
-        if (!ogreRoot_->restoreConfig())
-            if (!ogreRoot_->showConfigDialog())
-                ThrowException(InitialisationFailed, "OGRE graphics configuration dialogue failed.");
-
-        CCOUT(4) << "Creating render window" << std::endl;
-
-        this->renderWindow_ = ogreRoot_->initialise(true, "Orxonox");
-        // Propagate the size of the new winodw
-        this->ogreWindowEventListener_->windowResized(renderWindow_);
-
-        Ogre::WindowEventUtilities::addWindowEventListener(this->renderWindow_, ogreWindowEventListener_.get());
-
-        // create a full screen default viewport
-        // Note: This may throw when adding a viewport with an existing z-order!
-        //       But in our case we only have one viewport for now anyway, therefore
-        //       no ScopeGuards or anything to handle exceptions.
-        this->viewport_ = this->renderWindow_->addViewport(0, 0);
-
-        Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(Ogre::MIP_UNLIMITED);
-
-        // add console commands
-        ModifyConsoleCommand(__CC_printScreen_name).setFunction(&GraphicsManager::printScreen, this);
-    }
-
-    void GraphicsManager::loadDebugOverlay()
-    {
-        // Load debug overlay to show info about fps and tick time
-        COUT(4) << "Loading Debug Overlay..." << std::endl;
-        debugOverlay_.reset(new XMLFile("debug.oxo"));
-        Loader::open(debugOverlay_.get());
-    }
-
-    /**
-    @note
-        A note about the Ogre::FrameListener: Even though we don't use them,
-        they still get called. However, the delta times are not correct (except
-        for timeSinceLastFrame, which is the most important). A little research
-        as shown that there is probably only one FrameListener that doesn't even
-        need the time. So we shouldn't run into problems.
-    */
-    void GraphicsManager::postUpdate(const Clock& time)
-    {
-        Ogre::FrameEvent evt;
-        evt.timeSinceLastFrame = time.getDeltaTime();
-        evt.timeSinceLastEvent = time.getDeltaTime(); // note: same time, but shouldn't matter anyway
-
-        // don't forget to call _fireFrameStarted to OGRE to make sure
-        // everything goes smoothly
-        ogreRoot_->_fireFrameStarted(evt);
-
-        // Pump messages in all registered RenderWindows
-        // This calls the WindowEventListener objects.
-        Ogre::WindowEventUtilities::messagePump();
-        // make sure the window stays active even when not focused
-        // (probably only necessary on windows)
-        this->renderWindow_->setActive(true);
-
-        // Time before rendering
-        uint64_t timeBeforeTick = time.getRealMicroseconds();
-
-        // Render frame
-        ogreRoot_->_updateAllRenderTargets();
-
-        uint64_t timeAfterTick = time.getRealMicroseconds();
-        // Subtract the time used for rendering from the tick time counter
-        Game::getInstance().subtractTickTime((int32_t)(timeAfterTick - timeBeforeTick));
-
-        // again, just to be sure OGRE works fine
-        ogreRoot_->_fireFrameEnded(evt); // note: uses the same time as _fireFrameStarted
-    }
-
-    void GraphicsManager::setCamera(Ogre::Camera* camera)
-    {
-        this->viewport_->setCamera(camera);
-    }
-
-    /**
-    @brief
-        Method called by the LogListener interface from Ogre.
-        We use it to capture Ogre log messages and handle it ourselves.
-    @param message
-        The message to be logged
-    @param lml
-        The message level the log is using
-    @param maskDebug
-        If we are printing to the console or not
-    @param logName
-        The name of this log (so you can have several listeners
-        for different logs, and identify them)
-    */
-    void GraphicsManager::messageLogged(const std::string& message,
-        Ogre::LogMessageLevel lml, bool maskDebug, const std::string& logName)
-    {
-        int orxonoxLevel;
-        std::string introduction;
-        // Do not show caught OGRE exceptions in front
-        if (message.find("EXCEPTION") != std::string::npos)
-        {
-            orxonoxLevel = OutputLevel::Debug;
-            introduction = "Ogre, caught exception: ";
-        }
-        else
-        {
-            switch (lml)
-            {
-            case Ogre::LML_TRIVIAL:
-                orxonoxLevel = this->ogreLogLevelTrivial_;
-                break;
-            case Ogre::LML_NORMAL:
-                orxonoxLevel = this->ogreLogLevelNormal_;
-                break;
-            case Ogre::LML_CRITICAL:
-                orxonoxLevel = this->ogreLogLevelCritical_;
-                break;
-            default:
-                orxonoxLevel = 0;
-            }
-            introduction = "Ogre: ";
-        }
-        OutputHandler::getOutStream(orxonoxLevel)
-            << introduction << message << std::endl;
-    }
-
-    size_t GraphicsManager::getRenderWindowHandle()
-    {
-        size_t windowHnd = 0;
-        renderWindow_->getCustomAttribute("WINDOW", &windowHnd);
-        return windowHnd;
-    }
-
-    bool GraphicsManager::isFullScreen() const
-    {
-        Ogre::ConfigOptionMap& options = ogreRoot_->getRenderSystem()->getConfigOptions();
-        if (options.find("Full Screen") != options.end())
-        {
-            if (options["Full Screen"].currentValue == "Yes")
-                return true;
-            else
-                return false;
-        }
-        else
-        {
-            COUT(0) << "Could not find 'Full Screen' render system option. Fix This!!!" << std::endl;
-            return false;
-        }
-    }
-
-    void GraphicsManager::printScreen()
-    {
-        assert(this->renderWindow_);
-        this->renderWindow_->writeContentsToTimestampedFile(PathConfig::getLogPathString() + "screenShot_", ".png");
-    }
-}
Index: sandbox_qt/src/libraries/core/GraphicsManager.h
===================================================================
--- sandbox_qt/src/libraries/core/GraphicsManager.h	(revision 7418)
+++ 	(revision )
@@ -1,126 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *      Benjamin Knecht <beni_at_orxonox.net>, (C) 2007
- *   Co-authors:
- *      Felix Schulthess
- *
- */
-
-/**
-    @defgroup Graphics Graphics and GUI
-    @ingroup Core
-*/
-
-/**
-@file
-@ingroup Graphics
-@brief
-    Declaration of GraphicsManager Singleton.
- */
-
-#ifndef _GraphicsManager_H__
-#define _GraphicsManager_H__
-
-#include "CorePrereqs.h"
-
-#include <cassert>
-#include <string>
-#include <OgreLog.h>
-#include <boost/scoped_ptr.hpp>
-#include <boost/shared_ptr.hpp>
-
-#include "util/Singleton.h"
-#include "OrxonoxClass.h"
-
-namespace orxonox
-{
-    /**
-    @brief
-        Graphics engine manager class
-    */
-    class _CoreExport GraphicsManager : public Singleton<GraphicsManager>, public OrxonoxClass, public Ogre::LogListener
-    {
-        friend class Singleton<GraphicsManager>;
-    public:
-        GraphicsManager(bool bLoadRenderer = true);
-        ~GraphicsManager();
-
-        void setConfigValues();
-
-        void postUpdate(const Clock& time);
-
-        Ogre::Viewport* getViewport()         { return this->viewport_; }
-        Ogre::RenderWindow* getRenderWindow() { return this->renderWindow_; }
-        size_t getRenderWindowHandle();
-        bool isFullScreen() const;
-
-        void upgradeToGraphics();
-        void loadDebugOverlay();
-        bool rendererLoaded() const { return renderWindow_ != NULL; }
-
-        void setCamera(Ogre::Camera* camera);
-
-    private:
-        GraphicsManager(GraphicsManager&); // don't mess with singletons
-
-        // OGRE initialisation
-        void loadOgreRoot();
-        void loadOgrePlugins();
-        void loadRenderer();
-
-        // event from Ogre::LogListener
-        void messageLogged(const std::string& message, Ogre::LogMessageLevel lml,
-            bool maskDebug, const std::string& logName);
-
-        // console commands
-        void printScreen();
-
-        scoped_ptr<OgreWindowEventListener> ogreWindowEventListener_; //!< Pimpl to hide OgreWindowUtilities.h
-#if OGRE_VERSION < 0x010600
-        scoped_ptr<MemoryArchiveFactory>    memoryArchiveFactory_;    //!< Stores the modified particle scripts
-#endif
-        scoped_ptr<Ogre::LogManager>        ogreLogger_;
-        scoped_ptr<Ogre::Root>              ogreRoot_;                //!< Ogre's root
-        Ogre::RenderWindow* renderWindow_;             //!< the one and only render window
-        Ogre::Viewport*     viewport_;                 //!< default full size viewport
-
-        // XML files for the resources and the debug overlay
-        shared_ptr<XMLFile> resources_;                //!< XML with resource locations
-        shared_ptr<XMLFile> extResources_;             //!< XML with resource locations in the external path (only for dev runs)
-        shared_ptr<XMLFile> debugOverlay_;             //!< XML with various debug overlays
-
-        // config values
-        std::string         ogreConfigFile_;           //!< ogre config filename
-        std::string         ogrePluginsDirectory_;     //!< Directory where the Ogre plugins are located
-        std::string         ogrePlugins_;              //!< Comma separated list of all plugins to load
-        std::string         ogreLogFile_;              //!< log filename for Ogre log messages
-        int                 ogreLogLevelTrivial_;      //!< Corresponding Orxonox debug level for LL_TRIVIAL
-        int                 ogreLogLevelNormal_;       //!< Corresponding Orxonox debug level for LL_NORMAL
-        int                 ogreLogLevelCritical_;     //!< Corresponding Orxonox debug level for LL_CRITICAL
-
-        static GraphicsManager* singletonPtr_s;        //!< Pointer to the Singleton
-    };
-}
-
-#endif /* _GraphicsManager_H__ */
Index: sandbox_qt/src/libraries/core/Identifier.cc
===================================================================
--- sandbox_qt/src/libraries/core/Identifier.cc	(revision 7418)
+++ 	(revision )
@@ -1,507 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Implementation of the Identifier class.
-*/
-
-#include "Identifier.h"
-
-#include <ostream>
-
-#include "util/StringUtils.h"
-#include "ConfigValueContainer.h"
-#include "ClassFactory.h"
-#include "XMLPort.h"
-
-namespace orxonox
-{
-    // ###############################
-    // ###       Identifier        ###
-    // ###############################
-    int Identifier::hierarchyCreatingCounter_s = 0;
-    unsigned int Identifier::classIDCounter_s = 0;
-
-    /**
-        @brief Constructor: No factory, no object created, new ObjectList and a unique networkID.
-    */
-    Identifier::Identifier()
-        : classID_(classIDCounter_s++)
-    {
-        this->objects_ = new ObjectListBase(this);
-
-        this->bCreatedOneObject_ = false;
-        this->bSetName_ = false;
-        this->factory_ = 0;
-        this->bLoadable_ = false;
-
-        this->bHasConfigValues_ = false;
-
-        // Default network ID is the class ID
-        this->networkID_ = this->classID_;
-    }
-
-    /**
-        @brief Destructor: Deletes the list containing the children.
-    */
-    Identifier::~Identifier()
-    {
-        delete this->objects_;
-
-        if (this->factory_)
-            delete this->factory_;
-
-        for (std::map<std::string, ConfigValueContainer*>::iterator it = this->configValues_.begin(); it != this->configValues_.end(); ++it)
-            delete (it->second);
-        for (std::map<std::string, XMLPortParamContainer*>::iterator it = this->xmlportParamContainers_.begin(); it != this->xmlportParamContainers_.end(); ++it)
-            delete (it->second);
-        for (std::map<std::string, XMLPortObjectContainer*>::iterator it = this->xmlportObjectContainers_.begin(); it != this->xmlportObjectContainers_.end(); ++it)
-            delete (it->second);
-    }
-
-    /**
-        @brief Returns the identifier map with the names as received by typeid(). This is only used internally.
-    */
-    std::map<std::string, Identifier*>& Identifier::getTypeIDIdentifierMap()
-    {
-        static std::map<std::string, Identifier*> identifiers;    //!< The map to store all Identifiers.
-        return identifiers;
-    }
-
-    /**
-        @brief Returns an identifier by name and adds it if not available
-        @param name The name of the identifier as typeid().name() suggests
-        @param proposal A pointer to a newly created identifier for the case of non existance in the map
-        @return The identifier (unique instance)
-    */
-    Identifier* Identifier::getIdentifierSingleton(const std::string& name, Identifier* proposal)
-    {
-        std::map<std::string, Identifier*>::const_iterator it = getTypeIDIdentifierMap().find(name);
-
-        if (it != getTypeIDIdentifierMap().end())
-        {
-            // There is already an entry: return it and delete the proposal
-            delete proposal;
-            return it->second;
-        }
-        else
-        {
-            // There is no entry: put the proposal into the map and return it
-            getTypeIDIdentifierMap()[name] = proposal;
-            return proposal;
-        }
-    }
-
-    /**
-        @brief Registers a class, which means that the name and the parents get stored.
-        @param parents A list, containing the Identifiers of all parents of the class
-        @param bRootClass True if the class is either an Interface or the BaseObject itself
-    */
-    void Identifier::initializeClassHierarchy(std::set<const Identifier*>* parents, bool bRootClass)
-    {
-        // Check if at least one object of the given type was created
-        if (!this->bCreatedOneObject_ && Identifier::isCreatingHierarchy())
-        {
-            // If no: We have to store the information and initialize the Identifier
-            COUT(4) << "*** ClassIdentifier: Register Class in " << this->getName() << "-Singleton -> Initialize Singleton." << std::endl;
-            if (bRootClass)
-                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.
-            else
-                this->initialize(parents);
-        }
-    }
-
-    /**
-        @brief Initializes the Identifier with a list containing all parents of the class the Identifier belongs to.
-        @param parents A list containing all parents
-    */
-    void Identifier::initialize(std::set<const Identifier*>* parents)
-    {
-        COUT(4) << "*** Identifier: Initialize " << this->name_ << "-Singleton." << std::endl;
-        this->bCreatedOneObject_ = true;
-
-        if (parents)
-        {
-            this->parents_ = (*parents);
-            this->directParents_ = (*parents);
-
-            // Iterate through all parents
-            for (std::set<const Identifier*>::iterator it = parents->begin(); it != parents->end(); ++it)
-            {
-                // Tell the parent we're one of it's children
-                (*it)->children_.insert((*it)->children_.end(), this);
-
-                // Erase all parents of our parent from our direct-parent-list
-                for (std::set<const Identifier*>::const_iterator it1 = (*it)->getParents().begin(); it1 != (*it)->getParents().end(); ++it1)
-                {
-                    // Search for the parent's parent in our direct-parent-list
-                    for (std::set<const Identifier*>::iterator it2 = this->directParents_.begin(); it2 != this->directParents_.end(); ++it2)
-                    {
-                        if ((*it1) == (*it2))
-                        {
-                            // We've found a non-direct parent in our list: Erase it
-                            this->directParents_.erase(it2);
-                            break;
-                        }
-                    }
-                }
-            }
-
-            // Now iterate through all direct parents
-            for (std::set<const Identifier*>::iterator it = this->directParents_.begin(); it != this->directParents_.end(); ++it)
-            {
-                // Tell the parent we're one of it's direct children
-                (*it)->directChildren_.insert((*it)->directChildren_.end(), this);
-
-                // Create the super-function dependencies
-                (*it)->createSuperFunctionCaller();
-            }
-        }
-    }
-
-    /**
-        @brief Creates the class-hierarchy by creating and destroying one object of each type.
-    */
-    void Identifier::createClassHierarchy()
-    {
-        COUT(3) << "*** Identifier: Create class-hierarchy" << std::endl;
-        Identifier::startCreatingHierarchy();
-        for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getStringIdentifierMap().begin(); it != Identifier::getStringIdentifierMap().end(); ++it)
-        {
-            // To create the new branch of the class-hierarchy, we create a new object and delete it afterwards.
-            if (it->second->hasFactory())
-            {
-                BaseObject* temp = it->second->fabricate(0);
-                temp->destroy();
-            }
-        }
-        Identifier::stopCreatingHierarchy();
-        COUT(3) << "*** Identifier: Finished class-hierarchy creation" << std::endl;
-    }
-
-    /**
-        @brief Destroys all Identifiers. Called when exiting the program.
-    */
-    void Identifier::destroyAllIdentifiers()
-    {
-        for (std::map<std::string, Identifier*>::iterator it = Identifier::getTypeIDIdentifierMap().begin(); it != Identifier::getTypeIDIdentifierMap().end(); ++it)
-            delete (it->second);
-    }
-
-    /**
-        @brief Sets the name of the class.
-    */
-    void Identifier::setName(const std::string& name)
-    {
-        if (!this->bSetName_)
-        {
-            this->name_ = name;
-            this->bSetName_ = true;
-            Identifier::getStringIdentifierMapIntern()[name] = this;
-            Identifier::getLowercaseStringIdentifierMapIntern()[getLowercase(name)] = this;
-            Identifier::getIDIdentifierMapIntern()[this->networkID_] = this;
-        }
-    }
-
-    /**
-        @brief Creates an object of the type the Identifier belongs to.
-        @return The new object
-    */
-    BaseObject* Identifier::fabricate(BaseObject* creator)
-    {
-        if (this->factory_)
-        {
-            return this->factory_->fabricate(creator); // We have to return a BaseObject, because we don't know the exact type.
-        }
-        else
-        {
-            COUT(1) << "An error occurred in Identifier.cc:" << std::endl;
-            COUT(1) << "Error: Cannot fabricate an object of type '" << this->name_ << "'. Class has no factory." << std::endl;
-            COUT(1) << "Aborting..." << std::endl;
-            abort();
-            return 0;
-        }
-    }
-
-    /**
-        @brief Sets the network ID to a new value and changes the entry in the ID-Identifier-map.
-    */
-    void Identifier::setNetworkID(uint32_t id)
-    {
-//        Identifier::getIDIdentifierMapIntern().erase(this->networkID_);
-        Identifier::getIDIdentifierMapIntern()[id] = this;
-        this->networkID_ = id;
-    }
-
-    /**
-        @brief Returns true, if the Identifier is at least of the given type.
-        @param identifier The identifier to compare with
-    */
-    bool Identifier::isA(const Identifier* identifier) const
-    {
-        return (identifier == this || (this->parents_.find(identifier) != this->parents_.end()));
-    }
-
-    /**
-        @brief Returns true, if the Identifier is exactly of the given type.
-        @param identifier The identifier to compare with
-    */
-    bool Identifier::isExactlyA(const Identifier* identifier) const
-    {
-        return (identifier == this);
-    }
-
-    /**
-        @brief Returns true, if the assigned identifier is a child of the given identifier.
-        @param identifier The identifier to compare with
-    */
-    bool Identifier::isChildOf(const Identifier* identifier) const
-    {
-        return (this->parents_.find(identifier) != this->parents_.end());
-    }
-
-    /**
-        @brief Returns true, if the assigned identifier is a direct child of the given identifier.
-        @param identifier The identifier to compare with
-    */
-    bool Identifier::isDirectChildOf(const Identifier* identifier) const
-    {
-        return (this->directParents_.find(identifier) != this->directParents_.end());
-    }
-
-    /**
-        @brief Returns true, if the assigned identifier is a parent of the given identifier.
-        @param identifier The identifier to compare with
-    */
-    bool Identifier::isParentOf(const Identifier* identifier) const
-    {
-        return (this->children_.find(identifier) != this->children_.end());
-    }
-
-    /**
-        @brief Returns true, if the assigned identifier is a direct parent of the given identifier.
-        @param identifier The identifier to compare with
-    */
-    bool Identifier::isDirectParentOf(const Identifier* identifier) const
-    {
-        return (this->directChildren_.find(identifier) != this->directChildren_.end());
-    }
-
-    /**
-        @brief Returns the map that stores all Identifiers with their names.
-        @return The map
-    */
-    std::map<std::string, Identifier*>& Identifier::getStringIdentifierMapIntern()
-    {
-        static std::map<std::string, Identifier*> identifierMap;
-        return identifierMap;
-    }
-
-    /**
-        @brief Returns the map that stores all Identifiers with their names in lowercase.
-        @return The map
-    */
-    std::map<std::string, Identifier*>& Identifier::getLowercaseStringIdentifierMapIntern()
-    {
-        static std::map<std::string, Identifier*> lowercaseIdentifierMap;
-        return lowercaseIdentifierMap;
-    }
-
-    /**
-        @brief Returns the map that stores all Identifiers with their network IDs.
-        @return The map
-    */
-    std::map<uint32_t, Identifier*>& Identifier::getIDIdentifierMapIntern()
-    {
-        static std::map<uint32_t, Identifier*> identifierMap;
-        return identifierMap;
-    }
-
-    /**
-        @brief Returns the Identifier with a given name.
-        @param name The name of the wanted Identifier
-        @return The Identifier
-    */
-    Identifier* Identifier::getIdentifierByString(const std::string& name)
-    {
-        std::map<std::string, Identifier*>::const_iterator it = Identifier::getStringIdentifierMapIntern().find(name);
-        if (it != Identifier::getStringIdentifierMapIntern().end())
-            return it->second;
-        else
-            return 0;
-    }
-
-    /**
-        @brief Returns the Identifier with a given name in lowercase.
-        @param name The name of the wanted Identifier
-        @return The Identifier
-    */
-    Identifier* Identifier::getIdentifierByLowercaseString(const std::string& name)
-    {
-        std::map<std::string, Identifier*>::const_iterator it = Identifier::getLowercaseStringIdentifierMapIntern().find(name);
-        if (it != Identifier::getLowercaseStringIdentifierMapIntern().end())
-            return it->second;
-        else
-            return 0;
-    }
-
-    /**
-        @brief Returns the Identifier with a given network ID.
-        @param id The network ID of the wanted Identifier
-        @return The Identifier
-    */
-    Identifier* Identifier::getIdentifierByID(const uint32_t id)
-    {
-        std::map<uint32_t, Identifier*>::const_iterator it = Identifier::getIDIdentifierMapIntern().find(id);
-        if (it != Identifier::getIDIdentifierMapIntern().end())
-            return it->second;
-        else
-            return 0;
-    }
-
-    /**
-        @brief Cleans the NetworkID map (needed on clients for correct initialization)
-    */
-    void Identifier::clearNetworkIDs()
-    {
-        Identifier::getIDIdentifierMapIntern().clear();
-    }
-
-    /**
-        @brief Adds the ConfigValueContainer of a variable, given by the string of its name.
-        @param varname The name of the variablee
-        @param container The container
-    */
-    void Identifier::addConfigValueContainer(const std::string& varname, ConfigValueContainer* container)
-    {
-        std::map<std::string, ConfigValueContainer*>::const_iterator it = this->configValues_.find(varname);
-        if (it != this->configValues_.end())
-        {
-            COUT(2) << "Warning: Overwriting config-value with name " << varname << " in class " << this->getName() << '.' << std::endl;
-            delete (it->second);
-        }
-
-        this->bHasConfigValues_ = true;
-        this->configValues_[varname] = container;
-    }
-
-    /**
-        @brief Returns the ConfigValueContainer of a variable, given by the string of its name.
-        @param varname The name of the variable
-        @return The ConfigValueContainer
-    */
-    ConfigValueContainer* Identifier::getConfigValueContainer(const std::string& varname)
-    {
-        std::map<std::string, ConfigValueContainer*>::const_iterator it = configValues_.find(varname);
-        if (it != configValues_.end())
-            return it->second;
-        else
-            return 0;
-    }
-
-    /**
-        @brief Returns a XMLPortParamContainer that loads a parameter of this class.
-        @param paramname The name of the parameter
-        @return The container
-    */
-    XMLPortParamContainer* Identifier::getXMLPortParamContainer(const std::string& paramname)
-    {
-        std::map<std::string, XMLPortParamContainer*>::const_iterator it = this->xmlportParamContainers_.find(paramname);
-        if (it != this->xmlportParamContainers_.end())
-            return it->second;
-        else
-            return 0;
-    }
-
-    /**
-        @brief Adds a new XMLPortParamContainer that loads a parameter of this class.
-        @param paramname The name of the parameter
-        @param container The container
-    */
-    void Identifier::addXMLPortParamContainer(const std::string& paramname, XMLPortParamContainer* container)
-    {
-        std::map<std::string, XMLPortParamContainer*>::const_iterator it = this->xmlportParamContainers_.find(paramname);
-        if (it != this->xmlportParamContainers_.end())
-        {
-            COUT(2) << "Warning: Overwriting XMLPortParamContainer in class " << this->getName() << '.' << std::endl;
-            delete (it->second);
-        }
-
-        this->xmlportParamContainers_[paramname] = container;
-    }
-
-    /**
-        @brief Returns a XMLPortObjectContainer that attaches an object to this class.
-        @param sectionname The name of the section that contains the attachable objects
-        @return The container
-    */
-    XMLPortObjectContainer* Identifier::getXMLPortObjectContainer(const std::string& sectionname)
-    {
-        std::map<std::string, XMLPortObjectContainer*>::const_iterator it = this->xmlportObjectContainers_.find(sectionname);
-        if (it != this->xmlportObjectContainers_.end())
-            return it->second;
-        else
-            return 0;
-    }
-
-    /**
-        @brief Adds a new XMLPortObjectContainer that attaches an object to this class.
-        @param sectionname The name of the section that contains the attachable objects
-        @param container The container
-    */
-    void Identifier::addXMLPortObjectContainer(const std::string& sectionname, XMLPortObjectContainer* container)
-    {
-        std::map<std::string, XMLPortObjectContainer*>::const_iterator it = this->xmlportObjectContainers_.find(sectionname);
-        if (it != this->xmlportObjectContainers_.end())
-        {
-            COUT(2) << "Warning: Overwriting XMLPortObjectContainer in class " << this->getName() << '.' << std::endl;
-            delete (it->second);
-        }
-
-        this->xmlportObjectContainers_[sectionname] = container;
-    }
-
-    /**
-        @brief Lists the names of all Identifiers in a std::set<const Identifier*>.
-        @param out The outstream
-        @param list The list (or set) of Identifiers
-        @return The outstream
-    */
-    std::ostream& operator<<(std::ostream& out, const std::set<const Identifier*>& list)
-    {
-        for (std::set<const Identifier*>::const_iterator it = list.begin(); it != list.end(); ++it)
-        {
-            if (it != list.begin())
-                out << ' ';
-            out << (*it)->getName();
-        }
-
-        return out;
-    }
-}
Index: sandbox_qt/src/libraries/core/Identifier.h
===================================================================
--- sandbox_qt/src/libraries/core/Identifier.h	(revision 7418)
+++ 	(revision )
@@ -1,502 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @defgroup Identifier Identifier
-    @ingroup Class
-*/
-
-/**
-    @file
-    @ingroup Class Identifier
-    @brief Declaration of Identifier, definition of ClassIdentifier<T>; used to identify the class of an object.
-
-    @anchor IdentifierExample
-
-    An Identifier "identifies" the class of an object. It contains different information about
-    the class: Its name and ID, a list of all instances of this class, a factory to create new
-    instances of this class, and more.
-
-    It also contains information about the inheritance of this class: It stores a list of the
-    Identifiers of all parent-classes as well as a list of all child-classes. These relationships
-    can be tested using functions like @c isA(), @c isChildOf(), @c isParentOf(), and more.
-
-    Every Identifier is in fact a ClassIdentifier<T> (where T is the class that is identified
-    by the Identifier), Identifier is just the common base-class.
-
-    Example:
-    @code
-    MyClass* object = new MyClass();                                            // create an instance of MyClass
-
-    object->getIdentifier()->getName();                                         // returns "MyClass"
-
-    BaseObject* other = object->getIdentifier()->fabricate(0);                  // fabricates a new instance of MyClass
-
-
-    // iterate through all objects of type MyClass:
-    ObjectListBase* objects = object->getIdentifier()->getObjects();            // get a pointer to the object-list
-    int count;
-    for (Iterator<BaseObject> it = objects.begin(); it != objects.end(); ++it)  // iterate through the objects
-        ++count;
-    COUT(0) << count << std::endl;                                              // prints "2" because we created 2 instances of MyClass so far
-
-
-    // test the class hierarchy
-    object->getIdentifier()->isA(Class(MyClass));                               // returns true
-    object->isA(Class(MyClass));                                                // returns true (short version)
-
-    object->isA(Class(BaseClass));                                              // returns true if MyClass is a child of BaseClass
-
-    Class(ChildClass)->isChildOf(object->getIdentifier());                      // returns true if ChildClass is a child of MyClass
-    @endcode
-*/
-
-#ifndef _Identifier_H__
-#define _Identifier_H__
-
-#include "CorePrereqs.h"
-
-#include <cassert>
-#include <map>
-#include <set>
-#include <string>
-#include <typeinfo>
-#include <loki/TypeTraits.h>
-
-#include "util/Debug.h"
-#include "MetaObjectList.h"
-#include "ObjectList.h"
-#include "ObjectListBase.h"
-#include "Super.h"
-
-namespace orxonox
-{
-    // ###############################
-    // ###       Identifier        ###
-    // ###############################
-    /**
-        @brief The Identifier is used to identify the class of an object and to store information about the class.
-
-        Each Identifier stores information about one class. The Identifier can then be used to identify
-        this class. On the other hand it's also possible to get the corresponding Identifier of a class,
-        for example by using the macro Class().
-
-        @see See @ref IdentifierExample "Identifier.h" for more information and some examples.
-
-        @note You can't directly create an Identifier, it's just the base-class of ClassIdentifier<T>.
-    */
-    class _CoreExport Identifier
-    {
-        public:
-            /// Returns the name of the class the Identifier belongs to.
-            inline const std::string& getName() const { return this->name_; }
-            void setName(const std::string& name);
-
-            /// Returns the network ID to identify a class through the network.
-            inline const uint32_t getNetworkID() const { return this->networkID_; }
-            void setNetworkID(uint32_t id);
-
-            /// Returns the unique ID of the class.
-            FORCEINLINE unsigned int getClassID() const { return this->classID_; }
-
-            /// Returns the list of all existing objects of this class.
-            inline ObjectListBase* getObjects() const { return this->objects_; }
-
-            /// Sets the Factory.
-            inline void addFactory(Factory* factory) { this->factory_ = factory; }
-            /// Returns true if the Identifier has a Factory.
-            inline bool hasFactory() const { return (this->factory_ != 0); }
-
-            BaseObject* fabricate(BaseObject* creator);
-
-            /// Returns true if the class can be loaded through XML.
-            inline bool isLoadable() const { return this->bLoadable_; }
-            /// Set the class to be loadable through XML or not.
-            inline void setLoadable(bool bLoadable) { this->bLoadable_ = bLoadable; }
-
-            bool isA(const Identifier* identifier) const;
-            bool isExactlyA(const Identifier* identifier) const;
-            bool isChildOf(const Identifier* identifier) const;
-            bool isDirectChildOf(const Identifier* identifier) const;
-            bool isParentOf(const Identifier* identifier) const;
-            bool isDirectParentOf(const Identifier* identifier) const;
-
-
-            /////////////////////////////
-            ////// Class Hierarchy //////
-            /////////////////////////////
-            static void createClassHierarchy();
-
-            /// Returns true, if a branch of the class-hierarchy is being created, causing all new objects to store their parents.
-            inline static bool isCreatingHierarchy() { return (hierarchyCreatingCounter_s > 0); }
-
-            /// Returns the parents of the class the Identifier belongs to.
-            inline const std::set<const Identifier*>& getParents() const { return this->parents_; }
-            /// Returns the begin-iterator of the parents-list.
-            inline std::set<const Identifier*>::const_iterator getParentsBegin() const { return this->parents_.begin(); }
-            /// Returns the end-iterator of the parents-list.
-            inline std::set<const Identifier*>::const_iterator getParentsEnd() const { return this->parents_.end(); }
-
-            /// Returns the children of the class the Identifier belongs to.
-            inline const std::set<const Identifier*>& getChildren() const { return this->children_; }
-            /// Returns the begin-iterator of the children-list.
-            inline std::set<const Identifier*>::const_iterator getChildrenBegin() const { return this->children_.begin(); }
-            /// Returns the end-iterator of the children-list.
-            inline std::set<const Identifier*>::const_iterator getChildrenEnd() const { return this->children_.end(); }
-
-            /// Returns the direct parents of the class the Identifier belongs to.
-            inline const std::set<const Identifier*>& getDirectParents() const { return this->directParents_; }
-            /// Returns the begin-iterator of the direct-parents-list.
-            inline std::set<const Identifier*>::const_iterator getDirectParentsBegin() const { return this->directParents_.begin(); }
-            /// Returns the end-iterator of the direct-parents-list.
-            inline std::set<const Identifier*>::const_iterator getDirectParentsEnd() const { return this->directParents_.end(); }
-
-            /// Returns the direct children the class the Identifier belongs to.
-            inline const std::set<const Identifier*>& getDirectChildren() const { return this->directChildren_; }
-            /// Returns the begin-iterator of the direct-children-list.
-            inline std::set<const Identifier*>::const_iterator getDirectChildrenBegin() const { return this->directChildren_.begin(); }
-            /// Returns the end-iterator of the direct-children-list.
-            inline std::set<const Identifier*>::const_iterator getDirectChildrenEnd() const { return this->directChildren_.end(); }
-
-
-            //////////////////////////
-            ///// Identifier Map /////
-            //////////////////////////
-            static void destroyAllIdentifiers();
-
-            static Identifier* getIdentifierByString(const std::string& name);
-            static Identifier* getIdentifierByLowercaseString(const std::string& name);
-            static Identifier* getIdentifierByID(uint32_t id);
-
-            static void clearNetworkIDs();
-
-            /// Returns the map that stores all Identifiers with their names.
-            static inline const std::map<std::string, Identifier*>& getStringIdentifierMap() { return Identifier::getStringIdentifierMapIntern(); }
-            /// Returns a const_iterator to the beginning of the map that stores all Identifiers with their names.
-            static inline std::map<std::string, Identifier*>::const_iterator getStringIdentifierMapBegin() { return Identifier::getStringIdentifierMap().begin(); }
-            /// Returns a const_iterator to the end of the map that stores all Identifiers with their names.
-            static inline std::map<std::string, Identifier*>::const_iterator getStringIdentifierMapEnd() { return Identifier::getStringIdentifierMap().end(); }
-
-            /// Returns the map that stores all Identifiers with their names in lowercase.
-            static inline const std::map<std::string, Identifier*>& getLowercaseStringIdentifierMap() { return Identifier::getLowercaseStringIdentifierMapIntern(); }
-            /// Returns a const_iterator to the beginning of the map that stores all Identifiers with their names in lowercase.
-            static inline std::map<std::string, Identifier*>::const_iterator getLowercaseStringIdentifierMapBegin() { return Identifier::getLowercaseStringIdentifierMap().begin(); }
-            /// Returns a const_iterator to the end of the map that stores all Identifiers with their names in lowercase.
-            static inline std::map<std::string, Identifier*>::const_iterator getLowercaseStringIdentifierMapEnd() { return Identifier::getLowercaseStringIdentifierMap().end(); }
-
-            /// Returns the map that stores all Identifiers with their IDs.
-            static inline const std::map<uint32_t, Identifier*>& getIDIdentifierMap() { return Identifier::getIDIdentifierMapIntern(); }
-            /// Returns a const_iterator to the beginning of the map that stores all Identifiers with their IDs.
-            static inline std::map<uint32_t, Identifier*>::const_iterator getIDIdentifierMapBegin() { return Identifier::getIDIdentifierMap().begin(); }
-            /// Returns a const_iterator to the end of the map that stores all Identifiers with their IDs.
-            static inline std::map<uint32_t, Identifier*>::const_iterator getIDIdentifierMapEnd() { return Identifier::getIDIdentifierMap().end(); }
-
-
-            /////////////////////////
-            ///// Config Values /////
-            /////////////////////////
-            virtual void updateConfigValues(bool updateChildren = true) const = 0;
-
-            /// Returns true if this class has at least one config value.
-            inline bool hasConfigValues() const { return this->bHasConfigValues_; }
-
-            void addConfigValueContainer(const std::string& varname, ConfigValueContainer* container);
-            ConfigValueContainer* getConfigValueContainer(const std::string& varname);
-
-
-            ///////////////////
-            ///// XMLPort /////
-            ///////////////////
-            /// Returns the map that stores all XMLPort params.
-            inline const std::map<std::string, XMLPortParamContainer*>& getXMLPortParamMap() const { return this->xmlportParamContainers_; }
-            /// Returns a const_iterator to the beginning of the map that stores all XMLPort params.
-            inline std::map<std::string, XMLPortParamContainer*>::const_iterator getXMLPortParamMapBegin() const { return this->xmlportParamContainers_.begin(); }
-            /// Returns a const_iterator to the end of the map that stores all XMLPort params.
-            inline std::map<std::string, XMLPortParamContainer*>::const_iterator getXMLPortParamMapEnd() const { return this->xmlportParamContainers_.end(); }
-
-            /// Returns the map that stores all XMLPort objects.
-            inline const std::map<std::string, XMLPortObjectContainer*>& getXMLPortObjectMap() const { return this->xmlportObjectContainers_; }
-            /// Returns a const_iterator to the beginning of the map that stores all XMLPort objects.
-            inline std::map<std::string, XMLPortObjectContainer*>::const_iterator getXMLPortObjectMapBegin() const { return this->xmlportObjectContainers_.begin(); }
-            /// Returns a const_iterator to the end of the map that stores all XMLPort objects.
-            inline std::map<std::string, XMLPortObjectContainer*>::const_iterator getXMLPortObjectMapEnd() const { return this->xmlportObjectContainers_.end(); }
-
-            void addXMLPortParamContainer(const std::string& paramname, XMLPortParamContainer* container);
-            XMLPortParamContainer* getXMLPortParamContainer(const std::string& paramname);
-
-            void addXMLPortObjectContainer(const std::string& sectionname, XMLPortObjectContainer* container);
-            XMLPortObjectContainer* getXMLPortObjectContainer(const std::string& sectionname);
-
-
-        protected:
-            Identifier();
-            Identifier(const Identifier& identifier); // don't copy
-            virtual ~Identifier();
-
-            static Identifier* getIdentifierSingleton(const std::string& name, Identifier* proposal);
-            virtual void createSuperFunctionCaller() const = 0;
-
-            void initializeClassHierarchy(std::set<const Identifier*>* parents, bool bRootClass);
-
-            /// Returns the map that stores all Identifiers with their names.
-            static std::map<std::string, Identifier*>& getStringIdentifierMapIntern();
-            /// Returns the map that stores all Identifiers with their names in lowercase.
-            static std::map<std::string, Identifier*>& getLowercaseStringIdentifierMapIntern();
-            /// Returns the map that stores all Identifiers with their network IDs.
-            static std::map<uint32_t, Identifier*>& getIDIdentifierMapIntern();
-
-            /// Returns the children of the class the Identifier belongs to.
-            inline std::set<const Identifier*>& getChildrenIntern() const { return this->children_; }
-            /// Returns the direct children of the class the Identifier belongs to.
-            inline std::set<const Identifier*>& getDirectChildrenIntern() const { return this->directChildren_; }
-
-            ObjectListBase* objects_;                                      //!< The list of all objects of this class
-
-        private:
-            /// Increases the hierarchyCreatingCounter_s variable, causing all new objects to store their parents.
-            inline static void startCreatingHierarchy() { hierarchyCreatingCounter_s++; }
-            /// Decreases the hierarchyCreatingCounter_s variable, causing the objects to stop storing their parents.
-            inline static void stopCreatingHierarchy()  { hierarchyCreatingCounter_s--; }
-
-            static std::map<std::string, Identifier*>& getTypeIDIdentifierMap();
-
-            void initialize(std::set<const Identifier*>* parents);
-
-            std::set<const Identifier*> parents_;                          //!< The parents of the class the Identifier belongs to
-            mutable std::set<const Identifier*> children_;                 //!< The children of the class the Identifier belongs to
-
-            std::set<const Identifier*> directParents_;                    //!< The direct parents of the class the Identifier belongs to
-            mutable std::set<const Identifier*> directChildren_;           //!< The direct children of the class the Identifier belongs to
-
-            bool bCreatedOneObject_;                                       //!< True if at least one object of the given type was created (used to determine the need of storing the parents)
-            bool bSetName_;                                                //!< True if the name is set
-            bool bLoadable_;                                               //!< False = it's not permitted to load the object through XML
-            std::string name_;                                             //!< The name of the class the Identifier belongs to
-            Factory* factory_;                                             //!< The Factory, able to create new objects of the given class (if available)
-            static int hierarchyCreatingCounter_s;                         //!< Bigger than zero if at least one Identifier stores its parents (its an int instead of a bool to avoid conflicts with multithreading)
-            uint32_t networkID_;                                           //!< The network ID to identify a class through the network
-            const unsigned int classID_;                                   //!< Uniquely identifies a class (might not be the same as the networkID_)
-            static unsigned int classIDCounter_s;                          //!< Static counter for the unique classIDs
-
-            bool bHasConfigValues_;                                        //!< True if this class has at least one assigned config value
-            std::map<std::string, ConfigValueContainer*> configValues_;    //!< A map to link the string of configurable variables with their ConfigValueContainer
-
-            std::map<std::string, XMLPortParamContainer*> xmlportParamContainers_;     //!< All loadable parameters
-            std::map<std::string, XMLPortObjectContainer*> xmlportObjectContainers_;   //!< All attachable objects
-    };
-
-    _CoreExport std::ostream& operator<<(std::ostream& out, const std::set<const Identifier*>& list);
-
-
-    // ###############################
-    // ###     ClassIdentifier     ###
-    // ###############################
-    /**
-        @brief The ClassIdentifier is derived from Identifier and holds all class-specific functions and variables the Identifier cannot have.
-
-        ClassIdentifier is a Singleton, which means that only one ClassIdentifier for a given type T exists.
-        This makes it possible to store information about a class, sharing them with all
-        objects of that class without defining static variables in every class.
-
-        To be really sure that not more than exactly one object exists (even with libraries),
-        ClassIdentifiers are stored in a static map in Identifier.
-    */
-    template <class T>
-    class ClassIdentifier : public Identifier
-    {
-        #ifndef DOXYGEN_SHOULD_SKIP_THIS
-          #define SUPER_INTRUSIVE_DECLARATION_INCLUDE
-          #include "Super.h"
-        #endif
-
-        public:
-            static ClassIdentifier<T>* getIdentifier();
-            static ClassIdentifier<T>* getIdentifier(const std::string& name);
-
-            bool initialiseObject(T* object, const std::string& className, bool bRootClass);
-
-            void updateConfigValues(bool updateChildren = true) const;
-
-        private:
-            static void initialiseIdentifier();
-            ClassIdentifier(const ClassIdentifier<T>& identifier) {}    // don't copy
-            ClassIdentifier()
-            {
-                SuperFunctionInitialization<0, T>::initialize(this);
-            }
-            ~ClassIdentifier()
-            {
-                SuperFunctionDestruction<0, T>::destroy(this);
-            }
-
-            static ClassIdentifier<T>* classIdentifier_s;
-    };
-
-    template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::classIdentifier_s = 0;
-
-    /**
-        @brief Returns the only instance of this class.
-        @return The unique Identifier
-    */
-    template <class T>
-    inline ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
-    {
-        // check if the Identifier already exists
-        if (!ClassIdentifier<T>::classIdentifier_s)
-            ClassIdentifier<T>::initialiseIdentifier();
-
-        return ClassIdentifier<T>::classIdentifier_s;
-    }
-
-    /**
-        @brief Does the same as getIdentifier() but sets the name if this wasn't done yet.
-        @param name The name of this Identifier
-        @return The Identifier
-    */
-    template <class T>
-    inline ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier(const std::string& name)
-    {
-        ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier();
-        identifier->setName(name);
-        return identifier;
-    }
-
-    /**
-        @brief Assigns the static field for the identifier singleton.
-    */
-    template <class T>
-    void ClassIdentifier<T>::initialiseIdentifier()
-    {
-        // Get the name of the class
-        const std::string& name = typeid(T).name();
-
-        // create a new identifier anyway. Will be deleted in Identifier::getIdentifier if not used.
-        ClassIdentifier<T>* proposal = new ClassIdentifier<T>();
-
-        // Get the entry from the map
-        ClassIdentifier<T>::classIdentifier_s = (ClassIdentifier<T>*)Identifier::getIdentifierSingleton(name, proposal);
-
-        if (ClassIdentifier<T>::classIdentifier_s == proposal)
-        {
-            COUT(4) << "*** Identifier: Requested Identifier for " << name << " was not yet existing and got created." << std::endl;
-        }
-        else
-        {
-            COUT(4) << "*** Identifier: Requested Identifier for " << name << " was already existing and got assigned." << std::endl;
-        }
-    }
-
-    /**
-        @brief Adds an object of the given type to the ObjectList.
-        @param object The object to add
-        @param className The name of the class T
-        @param bRootClass True if this is a root class (i.e. it inherits directly from OrxonoxClass)
-    */
-    template <class T>
-    bool ClassIdentifier<T>::initialiseObject(T* object, const std::string& className, bool bRootClass)
-    {
-        if (bRootClass)
-            COUT(5) << "*** Register Root-Object: " << className << std::endl;
-        else
-            COUT(5) << "*** Register Object: " << className << std::endl;
-
-        object->identifier_ = this;
-        if (Identifier::isCreatingHierarchy())
-        {
-            if (bRootClass && !object->parents_)
-                object->parents_ = new std::set<const Identifier*>();
-
-            if (object->parents_)
-            {
-                this->initializeClassHierarchy(object->parents_, bRootClass);
-                object->parents_->insert(object->parents_->end(), this);
-            }
-
-            object->setConfigValues();
-            return true;
-        }
-        else
-        {
-            COUT(5) << "*** ClassIdentifier: Added object to " << this->getName() << "-list." << std::endl;
-            object->metaList_->add(this->objects_, this->objects_->add(new ObjectListElement<T>(object)));
-
-            // Add pointer of type T to the map in the OrxonoxClass instance that enables "dynamic_casts"
-            object->objectPointers_.push_back(std::make_pair(this->getClassID(), static_cast<void*>(object)));
-            return false;
-        }
-    }
-
-    /**
-        @brief Updates the config-values of all existing objects of this class by calling their setConfigValues() function.
-    */
-    template <class T>
-    void ClassIdentifier<T>::updateConfigValues(bool updateChildren) const
-    {
-        if (!this->hasConfigValues())
-            return;
-
-        for (ObjectListIterator<T> it = ObjectList<T>::begin(); it; ++it)
-            it->setConfigValues();
-
-        if (updateChildren)
-            for (std::set<const Identifier*>::const_iterator it = this->getChildrenBegin(); it != this->getChildrenEnd(); ++it)
-                (*it)->updateConfigValues(false);
-    }
-
-
-    // ###############################
-    // ###      orxonox_cast       ###
-    // ###############################
-    /**
-    @brief
-        Casts on object of type OrxonoxClass to any derived type that is
-        registered in the class hierarchy.
-    @return
-        Returns NULL if the cast is not possible
-    @note
-        In case of NULL return (and using MSVC), a dynamic_cast might still be possible if
-        a class forgot to register its objects.
-        Also note that the function is implemented differently for GCC/MSVC.
-    */
-    template <class T, class U>
-    FORCEINLINE T orxonox_cast(U* source)
-    {
-#ifdef ORXONOX_COMPILER_MSVC
-        typedef Loki::TypeTraits<typename Loki::TypeTraits<T>::PointeeType>::NonConstType ClassType;
-        if (source != NULL)
-            return source->template getDerivedPointer<ClassType>(ClassIdentifier<ClassType>::getIdentifier()->getClassID());
-        else
-            return NULL;
-#else
-        return dynamic_cast<T>(source);
-#endif
-    }
-}
-
-#endif /* _Identifier_H__ */
Index: sandbox_qt/src/libraries/core/Iterator.h
===================================================================
--- sandbox_qt/src/libraries/core/Iterator.h	(revision 7418)
+++ 	(revision )
@@ -1,311 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup Object ObjectList
-    @brief Definition of the Iterator class, used to iterate through object-lists.
-
-    @anchor IteratorExample
-
-    @ref orxonox::Iterator "Iterator" allows to iterate through an @ref orxonox::ObjectListBase
-    "ObjectListBase". Objects in this list are cast to the template argument @a T of Iterator<T> using
-    @c dynamic_cast. In contrast to @ref orxonox::ObjectListIterator "ObjectListIterator<T>",
-    @ref orxonox::Iterator "Iterator<T>" can iterate through every object-list. In practice though it
-    is limited to objects of type @a T and its subclasses. Because of the @c dynamic_cast, this iterator
-    is much slower than ObjectListIterator.
-
-    Usage:
-    @code
-    for (Iterator<myClass> it = anyidentifier->getObjects()->begin(); it != anyidentifier->getObjects()->end(); ++it)
-    {
-        it->someFunction(...);
-        myClass* myObject = *it;
-    }
-    @endcode
-*/
-
-#ifndef _Iterator_H__
-#define _Iterator_H__
-
-#include "CorePrereqs.h"
-
-#include "Identifier.h"
-#include "ObjectListBase.h"
-
-namespace orxonox
-{
-    /**
-        @brief The Iterator allows to iterate through a given ObjectList.
-
-        Independent of the object-list's type, the objects in the list are always casted
-        to @a T using @c dynamic_cast.
-
-        @see See @ref IteratorExample "Iterator.h" for more information an example.
-    */
-    template <class T = OrxonoxClass>
-    class Iterator
-    {
-        public:
-            /**
-                @brief Constructor: Sets the element, whereon the iterator points, to zero.
-            */
-            inline Iterator()
-            {
-                this->element_ = 0;
-                this->list_ = 0;
-            }
-
-            /**
-                @brief Constructor: Sets this element to the exported element.
-                @param exp The exported element
-            */
-            inline Iterator(const ObjectListBase::Export& exp)
-            {
-                this->element_ = exp.element_;
-                this->list_ = exp.list_;
-                this->list_->registerIterator(this);
-            }
-
-            /**
-                @brief Constructor: Sets this element to the element of another Iterator.
-                @param other The other Iterator
-            */
-            inline Iterator(const Iterator<T>& other)
-            {
-                this->element_ = other.element_;
-                this->list_ = other.list_;
-                this->list_->registerIterator(this);
-            }
-
-            /**
-                @brief Constructor: Sets this element to a given element
-                @param element The element
-            */
-            template <class O>
-            inline Iterator(ObjectListElement<O>* element)
-            {
-                this->element_ = element;
-                this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects();
-                this->list_->registerIterator(this);
-            }
-
-            /**
-                @brief Constructor: Sets this element to the element an ObjectListIterator.
-                @param other The ObjectListIterator
-            */
-            template <class O>
-            inline Iterator(const ObjectListIterator<O>& other)
-            {
-                this->element_ = other.element_;
-                this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects();
-                this->list_->registerIterator(this);
-            }
-
-            /**
-                @brief Unregisters the Iterator from the ObjectList.
-            */
-            inline ~Iterator()
-            {
-                this->list_->unregisterIterator(this);
-            }
-
-            /**
-                @brief Assigns an exported element.
-                @param exp The exported element
-            */
-            inline Iterator<T>& operator=(const ObjectListBase::Export& exp)
-            {
-                if (this->list_)
-                    this->list_->unregisterIterator(this);
-
-                this->element_ = exp.element_;
-                this->list_ = exp.list_;
-                this->list_->registerIterator(this);
-
-                return (*this);
-            }
-
-            /**
-                @brief Assigns the element of another Iterator.
-                @param other The other Iterator
-            */
-            inline Iterator<T>& operator=(const Iterator<T>& other)
-            {
-                if (this->list_)
-                    this->list_->unregisterIterator(this);
-
-                this->element_ = other.element_;
-                this->list_ = other.list_;
-                this->list_->registerIterator(this);
-
-                return (*this);
-            }
-
-            /**
-                @brief Assigns a given element.
-                @param element The element
-            */
-            template <class O>
-            inline Iterator<T>& operator=(ObjectListElement<O>* element)
-            {
-                if (this->list_)
-                    this->list_->unregisterIterator(this);
-
-                this->element_ = element;
-                this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects();
-                this->list_->registerIterator(this);
-
-                return (*this);
-            }
-
-            /**
-                @brief Assigns the element of an ObjectListIterator.
-                @param other The ObjectListIterator
-            */
-            template <class O>
-            inline Iterator<T>& operator=(const ObjectListIterator<O>& other)
-            {
-                if (this->list_)
-                    this->list_->unregisterIterator(this);
-
-                this->element_ = other.element_;
-                this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects();
-                this->list_->registerIterator(this);
-
-                return (*this);
-            }
-
-            /**
-                @brief Overloading of the ++it operator: Iterator points to the next object in the list.
-                @return The Iterator itself
-            */
-            inline const Iterator<T>& operator++()
-            {
-                this->element_ = this->element_->next_;
-                return *this;
-            }
-
-            /**
-                @brief Overloading of the it++ operator: Iterator points to the next object in the list.
-                @return The Iterator itself
-            */
-            inline Iterator<T> operator++(int)
-            {
-                Iterator<T> copy = *this;
-                this->element_ = this->element_->next_;
-                return copy;
-            }
-
-            /**
-                @brief Overloading of the --it operator: Iterator points to the previous object in the list.
-                @return The Iterator itself
-            */
-            inline const Iterator<T>& operator--()
-            {
-                this->element_ = this->element_->prev_;
-                return *this;
-            }
-
-            /**
-                @brief Overloading of the it-- operator: Iterator points to the previous object in the list.
-                @return The Iterator itself
-            */
-            inline Iterator<T> operator--(int i)
-            {
-                Iterator<T> copy = *this;
-                this->element_ = this->element_->prev_;
-                return copy;
-            }
-
-            /**
-                @brief Overloading of the *it operator: returns the pointer to the object.
-                @return The object the Iterator points at
-            */
-            inline T* operator*() const
-            {
-                return orxonox_cast<T*>(this->element_->objectBase_);
-            }
-
-            /**
-                @brief Overloading of the it-> operator: returns the pointer to the object.
-                @return The object the Iterator points at
-            */
-            inline T* operator->() const
-            {
-                return orxonox_cast<T*>(this->element_->objectBase_);
-            }
-
-            /**
-                @brief Overloading of the typecast-operator to bool: returns true if the iterator points to an existing object.
-                @return True if the Iterator points to an existing object.
-            */
-            inline operator bool() const
-            {
-                return (this->element_ != 0);
-            }
-
-            /**
-                @brief Overloading of the == operator to compare with another Iterator.
-                @param compare The other Iterator
-                @return True if the iterators point to the same element
-            */
-            inline bool operator==(const Iterator<T>& compare) const
-            {
-                return (this->element_ == compare.element_);
-            }
-
-            /**
-                @brief Overloading of the != operator to compare with another Iterator.
-                @param compare The other Iterator
-                @return True if the iterators point to different elements
-            */
-            inline bool operator!=(const Iterator<T>& compare) const
-            {
-                return (this->element_ != compare.element_);
-            }
-
-            /**
-                @brief Increments the Iterator if it points at the given object.
-                @param object The object to compare with
-            */
-            inline void incrementIfEqual(OrxonoxClass* object)
-            {
-                if (this->element_ && this->element_->objectBase_ == object)
-                    this->operator++();
-            }
-
-        protected:
-            ObjectListBaseElement* element_;       //!< The element the Iterator points at
-            ObjectListBase* list_;                 //!< The list wherein the element is
-    };
-
-    typedef Iterator<OrxonoxClass> BaseIterator;
-}
-
-#endif /* _Iterator_H__ */
Index: sandbox_qt/src/libraries/core/Language.cc
===================================================================
--- sandbox_qt/src/libraries/core/Language.cc	(revision 7418)
+++ 	(revision )
@@ -1,329 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Implementation of the Language and the LanguageEntry classes.
-*/
-
-#include "Language.h"
-
-#include <fstream>
-#include "util/Debug.h"
-#include "util/StringUtils.h"
-#include "Core.h"
-#include "PathConfig.h"
-
-namespace orxonox
-{
-    // ###############################
-    // ###      LanguageEntry      ###
-    // ###############################
-    /**
-        @brief Constructor: Sets the default entry.
-        @param fallbackEntry The default entry
-    */
-    LanguageEntry::LanguageEntry(const std::string& fallbackEntry)
-    {
-        this->fallbackEntry_ = fallbackEntry;
-        this->localisedEntry_ = fallbackEntry; // Set the localisation to the fallback entry, for the case that no translation gets assigned
-        this->bLocalisationSet_ = false;
-    }
-
-    /**
-        @brief Sets the localisation of the entry.
-        @param localisation The localisation
-    */
-    void LanguageEntry::setLocalisation(const std::string& localisation)
-    {
-        // Check if the translation is more than just an empty string
-        if (!localisation.empty())
-        {
-            this->localisedEntry_ = localisation;
-            this->bLocalisationSet_ = true;
-        }
-        else
-            this->localisedEntry_ = this->fallbackEntry_;
-    }
-
-    /**
-        @brief Sets the default entry.
-        @param fallbackEntry The default entry
-    */
-    void LanguageEntry::setDefault(const std::string& fallbackEntry)
-    {
-        // If the default entry changes and the translation wasn't set yet, use the new default entry as translation
-        if (!this->bLocalisationSet_)
-            this->localisedEntry_ = fallbackEntry;
-
-        this->fallbackEntry_ = fallbackEntry;
-    }
-
-    // ###############################
-    // ###        Language         ###
-    // ###############################
-
-    Language* Language::singletonPtr_s = 0;
-
-    /**
-        @brief Constructor: Reads the default language file and sets some values.
-    */
-    Language::Language()
-    {
-        this->defaultLanguage_ = "default";
-        this->defaultLocalisation_ = "ERROR: LANGUAGE ENTRY DOESN'T EXIST!";
-
-        // Read the default language file to create all known LanguageEntry objects
-        this->readDefaultLanguageFile();
-    }
-
-    /**
-        @brief Destructor: Deletes all language entries.
-    */
-    Language::~Language()
-    {
-        for (std::map<std::string, LanguageEntry*>::iterator it = this->languageEntries_.begin(); it != this->languageEntries_.end(); ++it)
-            delete (it->second);
-    }
-
-    /**
-        @brief Creates a new LanguageEntry with a given label and a given default entry.
-        @param label The label of the entry
-        @param entry The default entry
-        @return The created LanguageEntry object
-    */
-    LanguageEntry* Language::createEntry(const LanguageEntryLabel& label, const std::string& entry)
-    {
-        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(label);
-
-        // Make sure we don't create a duplicate entry
-        if (it == this->languageEntries_.end())
-        {
-            LanguageEntry* newEntry = new LanguageEntry(entry);
-            newEntry->setLabel(label);
-            this->languageEntries_[label] = newEntry;
-            return newEntry;
-        }
-
-        COUT(2) << "Warning: Language entry " << label << " is duplicate in " << getFilename(this->defaultLanguage_) << '!' << std::endl;
-        return it->second;
-    }
-
-    /**
-        @brief Adds a new LanguageEntry, if it's not already existing.
-        @param label The label of the entry
-        @param entry The default entry
-    */
-    void Language::addEntry(const LanguageEntryLabel& label, const std::string& entry)
-    {
-        COUT(5) << "Language: Called addEntry with\n  label: " << label << "\n  entry: " <<  entry << std::endl;
-        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(label);
-        if (it == this->languageEntries_.end())
-        {
-            // The entry isn't available yet, meaning it's new, so create it
-            this->createEntry(label, entry);
-        }
-        else if (it->second->getDefault().compare(entry) == 0)
-        {
-            // The entry is available and the default string is the same, so return because everything is fine
-            return;
-        }
-        else
-        {
-            // The defined default entry is not the same as in the default language file - change it to the new entry
-            it->second->setDefault(entry);
-        }
-
-        // Write the default language file because either a new entry was created or an existing entry has changed
-        this->writeDefaultLanguageFile();
-
-    }
-
-    /**
-        @brief Returns the localisation of a given entry.
-        @param label The label of the entry
-        @param bError If true, an error is printed if the label doesn't exist and the default localisation is returned. If false, no error is printed and an empty string is returned.
-        @return The localisation
-    */
-    const std::string& Language::getLocalisation(const LanguageEntryLabel& label, bool bError) const
-    {
-        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(label);
-        if (it != this->languageEntries_.end())
-            return it->second->getLocalisation();
-        else if (bError)
-        {
-            // Uh, oh, an undefined entry was requested: return the default string
-            COUT(2) << "Warning: Language entry \"" << label << "\" not found!" << std::endl;
-            return this->defaultLocalisation_;
-        }
-        else
-            return BLANKSTRING;
-    }
-
-    /**
-        @brief Creates the name of the language file out of the languages name.
-        @param language The name of the language
-        @return The filename
-    */
-    std::string Language::getFilename(const std::string& language)
-    {
-        return std::string("translation_" + language + ".lang");
-    }
-
-    /**
-        @brief Reads the default language file and creates a LanguageEntry objects for every entry.
-    */
-    void Language::readDefaultLanguageFile()
-    {
-        COUT(4) << "Read default language file." << std::endl;
-
-        const std::string& filepath = PathConfig::getConfigPathString() + getFilename(this->defaultLanguage_);
-
-        // This creates the file if it's not existing
-        std::ofstream createFile;
-        createFile.open(filepath.c_str(), std::fstream::app);
-        createFile.close();
-
-        // Open the file
-        std::ifstream file;
-        file.open(filepath.c_str(), std::fstream::in);
-
-        if (!file.is_open())
-        {
-            COUT(1) << "An error occurred in Language.cc:" << std::endl;
-            COUT(1) << "Error: Couldn't open file " << getFilename(this->defaultLanguage_) << " to read the default language entries!" << std::endl;
-            return;
-        }
-
-        // Iterate through the file and create the LanguageEntries
-        while (file.good() && !file.eof())
-        {
-            std::string lineString;
-            std::getline(file, lineString);
-
-            // Check if the line is empty
-            if (!lineString.empty())
-            {
-                size_t pos = lineString.find('=');
-
-                // Check if the length is at least 3 and if there's an entry before and behind the =
-                if (pos > 0 && pos < (lineString.size() - 1) && lineString.size() >= 3)
-                    this->createEntry(lineString.substr(0, pos), lineString.substr(pos + 1));
-                else
-                {
-                    COUT(2) << "Warning: Invalid language entry \"" << lineString << "\" in " << getFilename(this->defaultLanguage_) << std::endl;
-                }
-            }
-        }
-
-        file.close();
-    }
-
-    /**
-        @brief Reads the language file of the configured language and assigns the localisation to the corresponding LanguageEntry object.
-    */
-    void Language::readTranslatedLanguageFile()
-    {
-        COUT(4) << "Read translated language file (" << Core::getInstance().getLanguage() << ")." << std::endl;
-
-        const std::string& filepath = PathConfig::getConfigPathString() + getFilename(Core::getInstance().getLanguage());
-
-        // Open the file
-        std::ifstream file;
-        file.open(filepath.c_str(), std::fstream::in);
-
-        if (!file.is_open())
-        {
-            COUT(1) << "An error occurred in Language.cc:" << std::endl;
-            COUT(1) << "Error: Couldn't open file " << getFilename(Core::getInstance().getLanguage()) << " to read the translated language entries!" << std::endl;
-            Core::getInstance().resetLanguage();
-            COUT(3) << "Info: Reset language to " << this->defaultLanguage_ << '.' << std::endl;
-            return;
-        }
-
-        // Iterate through the file and create the LanguageEntries
-        while (file.good() && !file.eof())
-        {
-            std::string lineString;
-            std::getline(file, lineString);
-
-            // Check if the line is empty
-            if (!lineString.empty())
-            {
-                size_t pos = lineString.find('=');
-
-                // Check if the length is at least 3 and if there's an entry before and behind the =
-                if (pos > 0 && pos < (lineString.size() - 1) && lineString.size() >= 3)
-                {
-                    std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(lineString.substr(0, pos));
-
-                    // Check if the entry exists
-                    if (it != this->languageEntries_.end())
-                        it->second->setLocalisation(lineString.substr(pos + 1));
-                    else
-                        this->createEntry(lineString.substr(0, pos), this->defaultLocalisation_)->setLocalisation(lineString.substr(pos + 1));
-                }
-                else
-                {
-                    COUT(2) << "Warning: Invalid language entry \"" << lineString << "\" in " << getFilename(Core::getInstance().getLanguage()) << std::endl;
-                }
-            }
-        }
-
-        file.close();
-    }
-
-    /**
-        @brief Writes all default entries to the default language file.
-    */
-    void Language::writeDefaultLanguageFile() const
-    {
-        COUT(4) << "Language: Write default language file." << std::endl;
-
-        const std::string& filepath = PathConfig::getConfigPathString() + getFilename(this->defaultLanguage_);
-
-        // Open the file
-        std::ofstream file;
-        file.open(filepath.c_str(), std::fstream::out);
-
-        if (!file.is_open())
-        {
-            COUT(1) << "An error occurred in Language.cc:" << std::endl;
-            COUT(1) << "Error: Couldn't open file " << getFilename(this->defaultLanguage_) << " to write the default language entries!" << std::endl;
-            return;
-        }
-
-        // Iterate through the list an write the lines into the file
-        for (std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.begin(); it != this->languageEntries_.end(); ++it)
-        {
-            file << it->second->getLabel() << '=' << it->second->getDefault() << std::endl;
-        }
-
-        file.close();
-    }
-}
Index: sandbox_qt/src/libraries/core/Language.h
===================================================================
--- sandbox_qt/src/libraries/core/Language.h	(revision 7418)
+++ 	(revision )
@@ -1,207 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @defgroup Language Language
-    @ingroup Core
-*/
-
-/**
-    @file
-    @ingroup Language
-    @brief Declaration of the Language and the LanguageEntry class, as well as some helper functions.
-
-    @anchor LanguageExample
-
-    The Language class is used, to get a localisation of a string in the configured language.
-    The string is identified by another string, the label of the entry.
-    If the translation in the configured language isn't available, the default entry, defined in the code, is used.
-
-    Usage:
-     - Set the entry with the default string:
-       @code
-       Language::getInstance()->addEntry("label of the entry", "the string to translate");
-       @endcode
-
-     - Get the localisation of the entry in the configured language:
-       @code
-       std::cout << Language::getInstance()->getLocalisation("name of the entry") << std::endl;
-       @endcode
-
-    Example:
-    @code
-    int age = 20;
-    AddLanguageEntry("user_age", "Age");
-    std::cout << GetLocalisation("user_age") << ": " << age << std::endl;
-    @endcode
-
-    Resulting output:
-    @code
-    Age: 20
-    @endcode
-
-    The language entry is now defined in @a translation_default.lang:
-    @code
-    user_age=Age
-    @endcode
-
-    We can add a translation for another language, for example @a translation_german.lang:
-    @code
-    user_age=Alter
-    @endcode
-
-    Now change the language in @a orxonox.ini to "german":
-    @code
-    language_ = "german"
-    @endcode
-
-    Now you will see the translated language entry in the resulting output of the above code:
-    @code
-    Alter: 20
-    @endcode
-*/
-
-#ifndef _Language_H__
-#define _Language_H__
-
-#include "CorePrereqs.h"
-
-#include <map>
-#include <string>
-#include <cassert>
-#include "util/Singleton.h"
-
-namespace orxonox
-{
-    // ###############################
-    // ###      LanguageEntry      ###
-    // ###############################
-    /**
-        @brief The LanguageEntry class stores the default- and the translated string of a given entry in the language file.
-
-        This class belongs to the Language class.
-    */
-    class _CoreExport LanguageEntry
-    {
-        public:
-            explicit LanguageEntry(const std::string& fallbackEntry);
-            void setLocalisation(const std::string& localisation);
-            void setDefault(const std::string& fallbackEntry);
-
-            /**
-              @brief Returns the localised entry in the configured language.
-              @return The translated entry
-            */
-            inline const std::string& getLocalisation()
-                { return this->localisedEntry_; }
-
-            /**
-              @brief Returns the default entry.
-              @return The default entry
-            */
-            inline const std::string& getDefault()
-                { return this->fallbackEntry_; }
-
-            /**
-                @brief Sets the label of this entry.
-                @param label The label
-            */
-            inline void setLabel(const LanguageEntryLabel& label)
-                { this->label_ = label; }
-
-            /**
-                @brief Returns the label of this entry.
-                @return The label
-            */
-            inline const LanguageEntryLabel& getLabel() const
-                { return this->label_; }
-
-        private:
-            LanguageEntryLabel label_;              //!< The label of the entry
-            std::string fallbackEntry_;             //!< The default entry: Used, if no translation is available or no language configured
-            std::string localisedEntry_;            //!< The localised entry in the configured language
-            bool bLocalisationSet_;                 //!< True if the translation was set
-    };
-
-
-    // ###############################
-    // ###         Language        ###
-    // ###############################
-    /**
-        @brief The Language class manges the language files and entries and stores the LanguageEntry objects in a map.
-
-        @see See @ref LanguageExample "Language.h" for some examples.
-    */
-    class _CoreExport Language : public Singleton<Language>
-    {
-        friend class Singleton<Language>;
-        friend class Core;
-
-        public:
-            Language();
-            ~Language();
-
-            void addEntry(const LanguageEntryLabel& label, const std::string& entry);
-            const std::string& getLocalisation(const LanguageEntryLabel& label, bool bError = true) const;
-
-        private:
-            Language(const Language&);
-
-            void readDefaultLanguageFile();
-            void readTranslatedLanguageFile();
-            void writeDefaultLanguageFile() const;
-            static std::string getFilename(const std::string& language);
-            LanguageEntry* createEntry(const LanguageEntryLabel& label, const std::string& entry);
-
-            std::string defaultLanguage_;                           //!< The default language
-            std::string defaultLocalisation_;                       //!< The returned string, if an entry unavailable entry is requested
-            std::map<std::string, LanguageEntry*> languageEntries_; //!< A map to store all LanguageEntry objects and their labels
-
-            static Language* singletonPtr_s;
-    };
-
-    /// Shortcut function for Language::addEntry
-    inline void AddLanguageEntry(const LanguageEntryLabel& label, const std::string& fallbackString)
-    {
-        Language::getInstance().addEntry(label, fallbackString);
-    }
-
-    /// Shortcut function for Language::getLocalisation
-    inline const std::string& GetLocalisation(const LanguageEntryLabel& label)
-    {
-        return Language::getInstance().getLocalisation(label);
-    }
-
-    /// Shortcut function for Language::getLocalisation without printing an error in case the label doesn't exist
-    inline const std::string& GetLocalisation_noerror(const LanguageEntryLabel& label)
-    {
-        return Language::getInstance().getLocalisation(label, false);
-    }
-}
-
-#endif /* _Language_H__ */
Index: sandbox_qt/src/libraries/core/Loader.cc
===================================================================
--- sandbox_qt/src/libraries/core/Loader.cc	(revision 7418)
+++ 	(revision )
@@ -1,368 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "Loader.h"
-
-#include <sstream>
-#include <tinyxml/ticpp.h>
-#include <boost/scoped_ptr.hpp>
-
-#include "util/Debug.h"
-#include "util/Exception.h"
-#include "util/StringUtils.h"
-#include "BaseObject.h"
-#include "Iterator.h"
-#include "ObjectList.h"
-#include "LuaState.h"
-#include "Namespace.h"
-#include "Resource.h"
-#include "XMLFile.h"
-
-namespace orxonox
-{
-    std::vector<std::pair<const XMLFile*, ClassTreeMask> > Loader::files_s;
-    ClassTreeMask Loader::currentMask_s;
-
-    bool Loader::open(const XMLFile* file, const ClassTreeMask& mask)
-    {
-        Loader::add(file, mask);
-        return Loader::load(file, mask);
-    }
-
-    void Loader::close()
-    {
-        Loader::unload();
-        Loader::files_s.clear();
-    }
-
-    void Loader::close(const XMLFile* file)
-    {
-        Loader::unload(file);
-        Loader::remove(file);
-    }
-
-    void Loader::add(const XMLFile* file, const ClassTreeMask& mask)
-    {
-        if (!file)
-            return;
-        Loader::files_s.insert(Loader::files_s.end(), std::pair<const XMLFile*, ClassTreeMask>(file, mask));
-    }
-
-    void Loader::remove(const XMLFile* file)
-    {
-        if (!file)
-            return;
-        for (std::vector<std::pair<const XMLFile*, ClassTreeMask> >::iterator it = Loader::files_s.begin(); it != Loader::files_s.end(); ++it)
-        {
-            if (it->first == file)
-            {
-                Loader::files_s.erase(it);
-                break;
-            }
-        }
-    }
-
-    bool Loader::load(const ClassTreeMask& mask)
-    {
-        bool success = true;
-        for (std::vector<std::pair<const XMLFile*, ClassTreeMask> >::iterator it = Loader::files_s.begin(); it != Loader::files_s.end(); ++it)
-            if (!Loader::load(it->first, it->second * mask))
-                success = false;
-
-        return success;
-    }
-
-    void Loader::unload(const ClassTreeMask& mask)
-    {
-        for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); )
-        {
-            if (mask.isIncluded(it->getIdentifier()))
-                (it++)->destroy();
-            else
-                ++it;
-        }
-    }
-
-    bool Loader::reload(const ClassTreeMask& mask)
-    {
-        Loader::unload(mask);
-        return Loader::load(mask);
-    }
-
-    bool Loader::load(const XMLFile* file, const ClassTreeMask& mask)
-    {
-        if (!file)
-            return false;
-
-        Loader::currentMask_s = file->getMask() * mask;
-
-        std::string xmlInput;
-        if (file->getLuaSupport())
-        {
-            // Use the LuaState to replace the XML tags (calls our function)
-            scoped_ptr<LuaState> luaState(new LuaState());
-            luaState->setIncludeParser(&Loader::replaceLuaTags);
-            luaState->includeFile(file->getFilename());
-            xmlInput = luaState->getOutput().str();
-        }
-        else
-        {
-            shared_ptr<ResourceInfo> info = Resource::getInfo(file->getFilename());
-            if (info == NULL)
-            {
-                COUT(1) << "Error: Could not find XML file '" << file->getFilename() << "'." << std::endl;
-                return false;
-            }
-            xmlInput = Resource::open(file->getFilename())->getAsString();
-        }
-
-        try
-        {
-            COUT(0) << "Start loading " << file->getFilename() << "..." << std::endl;
-            COUT(3) << "Mask: " << Loader::currentMask_s << std::endl;
-
-            ticpp::Document xmlfile(file->getFilename());
-            xmlfile.Parse(xmlInput, true);
-
-            ticpp::Element rootElement;
-            rootElement.SetAttribute("name", "root");
-            rootElement.SetAttribute("bAutogenerated", true);
-
-            for (ticpp::Iterator<ticpp::Element> child = xmlfile.FirstChildElement(false); child != child.end(); child++)
-                rootElement.InsertEndChild(*child);
-
-            COUT(4) << "  creating root-namespace..." << std::endl;
-            Namespace* rootNamespace = new Namespace(0);
-            rootNamespace->setLoaderIndentation("    ");
-            rootNamespace->setFile(file);
-            rootNamespace->setNamespace(rootNamespace);
-            rootNamespace->setRoot(true);
-            rootNamespace->XMLPort(rootElement, XMLPort::LoadObject);
-
-            COUT(0) << "Finished loading " << file->getFilename() << '.' << std::endl;
-
-            COUT(4) << "Namespace-tree:" << std::endl << rootNamespace->toString("  ") << std::endl;
-
-            return true;
-        }
-        catch (ticpp::Exception& ex)
-        {
-            COUT(1) << std::endl;
-            COUT(1) << "An XML-error occurred in Loader.cc while loading " << file->getFilename() << ':' << std::endl;
-            COUT(1) << ex.what() << std::endl;
-            COUT(1) << "Loading aborted." << std::endl;
-            return false;
-        }
-        catch (Exception& ex)
-        {
-            COUT(1) << std::endl;
-            COUT(1) << "A loading-error occurred in Loader.cc while loading " << file->getFilename() << ':' << std::endl;
-            COUT(1) << ex.what() << std::endl;
-            COUT(1) << "Loading aborted." << std::endl;
-            return false;
-        }
-        catch (...)
-        {
-            COUT(1) << std::endl;
-            COUT(1) << "An error occurred in Loader.cc while loading " << file->getFilename() << ':' << std::endl;
-            COUT(1) << Exception::handleMessage() << std::endl;
-            COUT(1) << "Loading aborted." << std::endl;
-            return false;
-        }
-    }
-
-    void Loader::unload(const XMLFile* file, const ClassTreeMask& mask)
-    {
-        if (!file)
-            return;
-        for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it; )
-        {
-            if ((it->getFile() == file) && mask.isIncluded(it->getIdentifier()))
-                (it++)->destroy();
-            else
-                ++it;
-        }
-    }
-
-    bool Loader::reload(const XMLFile* file, const ClassTreeMask& mask)
-    {
-        Loader::unload(file, mask);
-        return Loader::load(file, mask);
-    }
-
-    std::string Loader::replaceLuaTags(const std::string& text)
-    {
-        // create map with all Lua tags
-        std::map<size_t, bool> luaTags;
-        {
-            size_t pos = 0;
-            while ((pos = text.find("<?lua", pos)) != std::string::npos)
-                luaTags[pos++] = true;
-        }
-        {
-            size_t pos = 0;
-            while ((pos = text.find("?>", pos)) != std::string::npos)
-                luaTags[pos++] = false;
-        }
-
-        // erase all tags from the map that are between two quotes
-        {
-            std::map<size_t, bool>::iterator it = luaTags.begin();
-            std::map<size_t, bool>::iterator it2 = it;
-            bool bBetweenQuotes = false;
-            size_t pos = 0;
-            while ((pos = getNextQuote(text, pos)) != std::string::npos)
-            {
-                while ((it != luaTags.end()) && (it->first < pos))
-                {
-                    if (bBetweenQuotes)
-                    {
-                        it2++;
-                        if (it->second && !(it2->second) && it2->first < pos)
-                            it = ++it2;
-                        else
-                            luaTags.erase(it++);
-                    }
-                    else
-                        ++it;
-                }
-                bBetweenQuotes = !bBetweenQuotes;
-                pos++;
-            }
-        }
-
-        // check whether on every opening <?lua tag a closing ?> tag follows
-        {
-            bool expectedValue = true;
-            for (std::map<size_t, bool>::iterator it = luaTags.begin(); it != luaTags.end(); ++it)
-            {
-                if (it->second == expectedValue)
-                    expectedValue = !expectedValue;
-                else
-                {
-                    expectedValue = false;
-                    break;
-                }
-            }
-            if (!expectedValue)
-            {
-                COUT(2) << "Warning: Error in level file" << std::endl;
-                // todo: errorhandling
-                return "";
-            }
-        }
-
-        // Use a stringstream object to speed up the parsing
-        std::ostringstream output;
-
-        // cut the original string into pieces and put them together with print() instead of lua tags
-        {
-            std::map<size_t, bool>::iterator it = luaTags.begin();
-            bool bInPrintFunction = true;
-            size_t start = 0;
-            size_t end = 0;
-
-            do
-            {
-                if (it != luaTags.end())
-                    end = (it++)->first;
-                else
-                    end = std::string::npos;
-
-                unsigned int equalSignCounter = 0;
-
-                if (bInPrintFunction)
-                {
-                    // count ['='[ and ]'='] and replace tags with print([[ and ]])
-                    const std::string& temp = text.substr(start, end - start);
-                    {
-                    size_t pos = 0;
-                    while ((pos = temp.find('[', pos)) != std::string::npos)
-                    {
-                        unsigned int tempCounter = 1;
-                        size_t tempPos = pos++;
-                        while (temp[++tempPos] == '=')
-                        {
-                            tempCounter++;
-                        }
-                        if (temp[tempPos] != '[')
-                        {
-                            tempCounter = 0;
-                        }
-                        else if (tempCounter == 0)
-                        {
-                            tempCounter = 1;
-                        }
-                        if (tempCounter > equalSignCounter)
-                            equalSignCounter = tempCounter;
-                        }
-                    }
-                    {
-                        size_t pos = 0;
-                        while ((pos = temp.find(']', pos)) != std::string::npos)
-                        {
-                            unsigned int tempCounter = 1;
-                            size_t tempPos = pos++;
-                            while (temp[++tempPos] == '=')
-                            {
-                                tempCounter++;
-                            }
-                            if (temp[tempPos] != ']')
-                            {
-                                tempCounter = 0;
-                            }
-                            else if (tempCounter == 0)
-                            {
-                                tempCounter = 1;
-                            }
-                            if (tempCounter > equalSignCounter)
-                                equalSignCounter = tempCounter;
-                        }
-                    }
-                    std::string equalSigns;
-                    for (unsigned int i = 0; i < equalSignCounter; i++)
-                    {
-                        equalSigns += '=';
-                    }
-                    output << "print([" + equalSigns + '[' + temp + ']' + equalSigns +"])";
-                    start = end + 5;
-                }
-                else
-                {
-                    output << text.substr(start, end - start);
-                    start = end + 2;
-                }
-
-                bInPrintFunction = !bInPrintFunction;
-            }
-            while (end != std::string::npos);
-        }
-
-        return output.str();
-    }
-}
Index: sandbox_qt/src/libraries/core/Loader.h
===================================================================
--- sandbox_qt/src/libraries/core/Loader.h	(revision 7418)
+++ 	(revision )
@@ -1,76 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @defgroup Loader Loader
-    @ingroup XML
-*/
-
-/**
-    @file
-    @ingroup XML Loader
-*/
-
-#ifndef _Loader_H__
-#define _Loader_H__
-
-#include "CorePrereqs.h"
-
-#include <vector>
-#include "ClassTreeMask.h"
-
-namespace orxonox
-{
-    class _CoreExport Loader
-    {
-        public:
-            static bool open(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
-            static void close();
-            static void close(const XMLFile* file);
-
-            static void add(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
-            static void remove(const XMLFile* file);
-
-            static bool load(const ClassTreeMask& mask = ClassTreeMask());
-            static void unload(const ClassTreeMask& mask = ClassTreeMask());
-            static bool reload(const ClassTreeMask& mask = ClassTreeMask());
-
-            static bool load(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
-            static void unload(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
-            static bool reload(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
-
-            static std::string replaceLuaTags(const std::string& text);
-
-            static ClassTreeMask currentMask_s;
-
-        private:
-            static std::vector<std::pair<const XMLFile*, ClassTreeMask> > files_s;
-    };
-}
-
-#endif /* _Loader_H__ */
Index: sandbox_qt/src/libraries/core/LuaState.cc
===================================================================
--- sandbox_qt/src/libraries/core/LuaState.cc	(revision 7418)
+++ 	(revision )
@@ -1,376 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Benjamin Knecht
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "LuaState.h"
-
-#include <tolua/tolua++.h>
-extern "C" {
-#include <lua.h>
-#include <lualib.h>
-}
-#include <loki/ScopeGuard.h>
-
-#include "util/Debug.h"
-#include "util/Exception.h"
-#include "Resource.h"
-#include "ToluaBindCore.h"
-#include "command/IOConsole.h"
-
-namespace orxonox
-{
-    LuaState::ToluaInterfaceMap LuaState::toluaInterfaces_s;
-    std::vector<LuaState*> LuaState::instances_s;
-
-    const std::string LuaState::ERROR_HANDLER_NAME = "errorHandler";
-
-    // Do this after declaring toluaInterfaces_s and instances_s to avoid larger problems
-    DeclareToluaInterface(Core);
-
-    LuaState::LuaState()
-        : bIsRunning_(false)
-        , includeParseFunction_(NULL)
-    {
-        // Create new lua state and configure it
-        luaState_ = lua_open();
-        Loki::ScopeGuard luaStateGuard = Loki::MakeGuard(&lua_close, luaState_);
-#if LUA_VERSION_NUM == 501
-        luaL_openlibs(luaState_);
-#else
-        luaopen_base(luaState_);
-        luaopen_string(luaState_);
-        luaopen_table(luaState_);
-        luaopen_math(luaState_);
-        luaopen_io(luaState_);
-        luaopen_debug(luaState_);
-#endif
-
-        // Open all available tolua interfaces
-        this->openToluaInterfaces(luaState_);
-
-        // Create dummy file info
-        sourceFileInfo_.reset(new ResourceInfo());
-        sourceFileInfo_->group = "General";
-        sourceFileInfo_->size = 0;
-
-        // Push 'this' pointer
-        tolua_pushusertype(luaState_, static_cast<void*>(this), "orxonox::LuaState");
-        lua_setglobal(luaState_, "luaState");
-
-        // Parse init script
-        if (!this->doFile("LuaStateInit.lua"))
-            ThrowException(InitialisationFailed, "Running LuaStateInit.lua failed");
-
-        luaStateGuard.Dismiss();
-    }
-
-    LuaState::~LuaState()
-    {
-        lua_close(luaState_);
-    }
-
-    shared_ptr<ResourceInfo> LuaState::getFileInfo(const std::string& filename)
-    {
-        // Look in the current directory first
-        shared_ptr<ResourceInfo> sourceInfo = Resource::getInfo(sourceFileInfo_->path + filename);
-        // Continue search in root directories
-        if (sourceInfo == NULL && !sourceFileInfo_->path.empty())
-            sourceInfo = Resource::getInfo(filename);
-        return sourceInfo;
-    }
-
-    bool LuaState::includeFile(const std::string& filename)
-    {
-        shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename);
-        if (sourceInfo != NULL)
-            return this->includeString(Resource::open(sourceInfo)->getAsString(), sourceInfo);
-        else
-        {
-            COUT(2) << "LuaState: Cannot include file '" << filename << "' (not found)." << std::endl;
-            return false;
-        }
-    }
-
-    bool LuaState::includeString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo)
-    {
-        // Parse string with provided include parser (otherwise don't preparse at all)
-        std::string luaInput;
-        if (includeParseFunction_ != NULL)
-            luaInput = (*includeParseFunction_)(code);
-        else
-            luaInput = code;
-
-        if (sourceFileInfo != NULL)
-        {
-            // Also fill a map with the actual source code. This is just for the include* commands
-            // where the content of sourceFileInfo->filename doesn't match 'code'
-            this->sourceCodeMap_[sourceFileInfo->filename] = code;
-        }
-
-        bool returnValue = this->doString(luaInput, sourceFileInfo);
-
-        if (sourceFileInfo != NULL)
-        {
-            // Delete source code entry
-            if (sourceFileInfo != NULL)
-                this->sourceCodeMap_.erase(sourceFileInfo->filename);
-        }
-
-        return returnValue;
-    }
-
-    bool LuaState::doFile(const std::string& filename)
-    {
-        shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename);
-        if (sourceInfo != NULL)
-            return this->doString(Resource::open(sourceInfo)->getAsString(), sourceInfo);
-        else
-        {
-            COUT(2) << "LuaState: Cannot do file '" << filename << "' (not found)." << std::endl;
-            return false;
-        }
-    }
-
-    bool LuaState::doString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo)
-    {
-        // Save the old source file info
-        shared_ptr<ResourceInfo> oldSourceFileInfo = sourceFileInfo_;
-        // Only override if sourceFileInfo provides useful information
-        if (sourceFileInfo != NULL)
-            sourceFileInfo_ = sourceFileInfo;
-
-        std::string chunkname;
-        if (sourceFileInfo != NULL)
-        {
-            // Provide lua_load with the filename for debug purposes
-            // The '@' is a Lua convention to identify the chunk name as filename
-            chunkname = '@' + sourceFileInfo->filename;
-        }
-        else
-        {
-            // Use the code string to identify the chunk
-            chunkname = code;
-        }
-
-        // Push custom error handler that uses the debugger
-        lua_getglobal(this->luaState_, ERROR_HANDLER_NAME.c_str());
-        int errorHandler = lua_gettop(luaState_);
-        if (lua_isnil(this->luaState_, -1))
-        {
-            lua_pop(this->luaState_, 1);
-            errorHandler = 0;
-        }
-
-#if LUA_VERSION_NUM != 501
-        LoadS ls;
-        ls.s = code.c_str();
-        ls.size = code.size();
-        int error = lua_load(luaState_, &orxonox::LuaState::lua_Chunkreader, &ls, chunkname.c_str());
-#else
-        int error = luaL_loadbuffer(luaState_, code.c_str(), code.size(), chunkname.c_str());
-#endif
-
-        switch (error)
-        {
-        case LUA_ERRSYNTAX: // Syntax error
-            COUT(1) << "Lua syntax error: " << lua_tostring(luaState_, -1) << std::endl;
-            break;
-        case LUA_ERRMEM:    // Memory allocation error
-            COUT(1) << "Lua memory allocation error: Consult your dentist immediately!" << std::endl;
-            break;
-        }
-
-        if (error == 0)
-        {
-            // Execute the chunk in protected mode with an error handler function (stack index)
-            error = lua_pcall(luaState_, 0, 1, errorHandler);
-
-            switch (error)
-            {
-            case LUA_ERRRUN: // Runtime error
-                if (errorHandler)
-                {
-                    // Do nothing (we already display the error in the
-                    // 'errorHandler' Lua function in LuaStateInit.lua)
-                }
-                else
-                {
-                    std::string errorString = lua_tostring(this->luaState_, -1);
-                    if (errorString.find("Error propagation") == std::string::npos)
-                        COUT(1) << "Lua runtime error: " << errorString << std::endl;
-                }
-                break;
-            case LUA_ERRERR: // Error in the error handler
-                COUT(1) << "Lua error in error handler. No message available." << std::endl;
-                break;
-            case LUA_ERRMEM: // Memory allocation error
-                COUT(1) << "Lua memory allocation error: Consult your dentist immediately!" << std::endl;
-                break;
-            }
-        }
-
-        if (error != 0)
-        {
-            lua_pop(luaState_, 1);  // Remove error message
-            lua_pushnil(luaState_); // Push a nil return value
-        }
-
-        if (errorHandler != 0)
-            lua_remove(luaState_, errorHandler); // Remove error handler from stack
-
-        // Set return value to a global variable because we cannot return a table in this function
-        // here. It would work for numbers, pointers and strings, but certainly not for Lua tables.
-        lua_setglobal(luaState_, "LuaStateReturnValue");
-
-        // Load the old info again
-        sourceFileInfo_ = oldSourceFileInfo;
-
-        return (error == 0);
-    }
-
-    void LuaState::luaPrint(const std::string& str)
-    {
-        output_ << str;
-    }
-
-    void LuaState::luaLog(unsigned int level, const std::string& message)
-    {
-        OutputHandler::getOutStream(level) << message << std::endl;
-    }
-
-    bool LuaState::fileExists(const std::string& filename)
-    {
-        shared_ptr<ResourceInfo> info = this->getFileInfo(filename);
-        if (info == NULL)
-            return false;
-        else
-            return true;
-    }
-
-    //! Returns the content of a file
-    std::string LuaState::getSourceCode(const std::string& filename)
-    {
-        // Try the internal map first to get the actual Lua code
-        // and not just some pseudo Lua-XML code when using include* commands
-        std::map<std::string, std::string>::const_iterator it = this->sourceCodeMap_.find(filename);
-        if (it != this->sourceCodeMap_.end())
-            return it->second;
-        shared_ptr<ResourceInfo> info = Resource::getInfo(filename);
-        if (info == NULL)
-            return "";
-        else
-            return Resource::open(info)->getAsString();
-    }
-
-    bool LuaState::usingIOConsole() const
-    {
-        return IOConsole::exists();
-    }
-
-#if LUA_VERSION_NUM != 501
-    const char * LuaState::lua_Chunkreader(lua_State *L, void *data, size_t *size)
-    {
-        LoadS* ls = static_cast<LoadS*>(data);
-        if (ls->size == 0)
-            return NULL;
-        *size = ls->size;
-        ls->size = 0;
-        return ls->s;
-    }
-#endif
-
-    /*static*/ bool LuaState::addToluaInterface(int (*function)(lua_State*), const std::string& name)
-    {
-        for (ToluaInterfaceMap::const_iterator it = toluaInterfaces_s.begin(); it != toluaInterfaces_s.end(); ++it)
-        {
-            if (it->first == name || it->second == function)
-            {
-                COUT(2) << "Warning: Trying to add a Tolua interface with the same name or function." << std::endl;
-                return true;
-            }
-        }
-        toluaInterfaces_s[name] = function;
-
-        // Open interface in all LuaStates
-        for (std::vector<LuaState*>::const_iterator it = instances_s.begin(); it != instances_s.end(); ++it)
-            (*function)((*it)->luaState_);
-
-        // Return dummy bool
-        return true;
-    }
-
-    /*static*/ bool LuaState::removeToluaInterface(const std::string& name)
-    {
-        ToluaInterfaceMap::iterator it = toluaInterfaces_s.find(name);
-        if (it == toluaInterfaces_s.end())
-        {
-            COUT(2) << "Warning: Cannot remove Tolua interface '" << name << "': Not found" << std::endl;
-            return true;
-        }
-
-        // Close interface in all LuaStates
-        for (std::vector<LuaState*>::const_iterator itState = instances_s.begin(); itState != instances_s.end(); ++itState)
-        {
-            lua_pushnil((*itState)->luaState_);
-            lua_setglobal((*itState)->luaState_, it->first.c_str());
-        }
-
-        // Remove entry
-        toluaInterfaces_s.erase(it);
-
-        // Return dummy bool
-        return true;
-    }
-
-    /*static*/ void LuaState::openToluaInterfaces(lua_State* state)
-    {
-        for (ToluaInterfaceMap::const_iterator it = toluaInterfaces_s.begin(); it != toluaInterfaces_s.end(); ++it)
-            (*it->second)(state);
-    }
-
-    /*static*/ void LuaState::closeToluaInterfaces(lua_State* state)
-    {
-        for (ToluaInterfaceMap::const_iterator it = toluaInterfaces_s.begin(); it != toluaInterfaces_s.end(); ++it)
-        {
-            lua_pushnil(state);
-            lua_setglobal(state, it->first.c_str());
-        }
-    }
-
-
-    LuaFunctor::LuaFunctor(const std::string& code, LuaState* luaState)
-    {
-        this->code_ = code;
-        this->lua_ = luaState;
-    }
-
-    void LuaFunctor::operator()()
-    {
-        lua_->doString(this->code_);
-    }
-}
Index: sandbox_qt/src/libraries/core/LuaState.h
===================================================================
--- sandbox_qt/src/libraries/core/LuaState.h	(revision 7418)
+++ 	(revision )
@@ -1,138 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Benjamin Knecht
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @defgroup Lua Lua
-    @ingroup Core
-*/
-
-/**
-    @file
-    @ingroup Lua
-*/
-
-#ifndef _LuaState_H__
-#define _LuaState_H__
-
-#include "CorePrereqs.h"
-
-#include <map>
-#include <sstream>
-#include <string>
-#include <vector>
-#include <boost/shared_ptr.hpp>
-#include <loki/ScopeGuard.h>
-
-#include "ToluaInterface.h"
-
-namespace orxonox // tolua_export
-{ // tolua_export
-    class LuaFunctor; // tolua_export
-
-    //! callback class that executes lua code
-    class _CoreExport LuaFunctor
-    {
-        public:
-            LuaFunctor(const std::string& code, LuaState* luaState);
-            void operator()();
-
-        private:
-            std::string code_;
-            LuaState*   lua_;
-    };
-
-
-    /**
-    @brief
-        Representation of an interface to lua
-    */
-    class _CoreExport LuaState // tolua_export
-    { // tolua_export
-    public:
-        LuaState();
-        ~LuaState();
-
-        bool doFile(const std::string& filename); // tolua_export
-        bool doString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo = shared_ptr<ResourceInfo>());
-
-        bool includeFile(const std::string& filename); // tolua_export
-        bool includeString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo = shared_ptr<ResourceInfo>());
-
-        void luaPrint(const std::string& str); // tolua_export
-        void luaLog(unsigned int level, const std::string& message); // tolua_export
-        bool fileExists(const std::string& filename); // tolua_export
-        std::string getSourceCode(const std::string& filename); // tolua_export
-
-        const std::stringstream& getOutput() const { return output_; }
-        void clearOutput() { output_.clear(); } // tolua_export
-
-        void setIncludeParser(std::string (*function)(const std::string&)) { includeParseFunction_ = function; }
-        lua_State* getInternalLuaState() { return luaState_; }
-
-        void setDefaultResourceInfo(const shared_ptr<ResourceInfo>& sourceFileInfo) { this->sourceFileInfo_ = sourceFileInfo; }
-        const shared_ptr<ResourceInfo>& getDefaultResourceInfo() { return this->sourceFileInfo_; }
-
-        LuaFunctor* createLuaFunctor(const std::string& code) { return new LuaFunctor(code, this); } // tolua_export
-        //! Tells about whether IOConsole was activated. The Lua debugger only works with a normal console.
-        bool usingIOConsole() const; // tolua_export
-
-        static bool addToluaInterface(int (*function)(lua_State*), const std::string& name);
-        static bool removeToluaInterface(const std::string& name);
-        static void openToluaInterfaces(lua_State* state);
-        static void closeToluaInterfaces(lua_State* state);
-
-        static const std::string ERROR_HANDLER_NAME;
-
-    private:
-        shared_ptr<ResourceInfo> getFileInfo(const std::string& filename);
-
-#if LUA_VERSION_NUM != 501
-        struct LoadS
-        {
-            const char* s;
-            size_t size;
-        };
-
-        static const char * lua_Chunkreader(lua_State *L, void *data, size_t *size);
-#endif
-
-        std::stringstream output_;
-        lua_State* luaState_;
-        bool bIsRunning_;
-        shared_ptr<ResourceInfo> sourceFileInfo_;
-        std::map<std::string, std::string> sourceCodeMap_;
-        std::string (*includeParseFunction_)(const std::string&);
-
-        typedef std::map<std::string, int (*)(lua_State *L)> ToluaInterfaceMap;
-        static ToluaInterfaceMap toluaInterfaces_s;
-        static std::vector<LuaState*> instances_s;
-    }; // tolua_export
-} // tolua_export
-
-#endif /* _LuaState_H__ */
Index: sandbox_qt/src/libraries/core/MemoryArchive.cc
===================================================================
--- sandbox_qt/src/libraries/core/MemoryArchive.cc	(revision 7418)
+++ 	(revision )
@@ -1,141 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "MemoryArchive.h"
-
-#if OGRE_VERSION < 0x010600
-
-#include <OgreException.h>
-#include <boost/filesystem.hpp>
-#include <boost/version.hpp>
-
-// Boost 1.36 has some issues with deprecated functions that have been omitted
-#if (BOOST_VERSION == 103600)
-#  define BOOST_HAS_BRANCH_PATH_FUNCTION has_parent_path
-#else
-#  define BOOST_HAS_BRANCH_PATH_FUNCTION has_branch_path
-#endif
-
-namespace orxonox
-{
-    using namespace Ogre;
-
-    MemoryArchive::ArchiveMap MemoryArchive::archives_s;
-
-    void MemoryArchive::load()
-    {
-        if (archives_s.find(this->getName()) == archives_s.end())
-            OGRE_EXCEPT(Ogre::Exception::ERR_INTERNAL_ERROR, this->getName() + " - MemoryArchive not found.", "MemoryArchive");
-    }
-
-    DataStreamPtr MemoryArchive::open(const Ogre::String& filename) const
-    {
-        const FileMap& files = archives_s[this->getName()];
-        FileMap::const_iterator itFile = files.find(filename);
-        if (itFile == files.end())
-            return DataStreamPtr();
-        else
-            return MemoryDataStreamPtr(new MemoryDataStream(itFile->second.first.get(), itFile->second.second));
-    }
-
-    void MemoryArchive::findFiles(const Ogre::String& pattern, bool bRecursive,
-        bool bDirs, Ogre::StringVector* simpleList, Ogre::FileInfoList* detailList)
-    {
-        const FileMap& files = archives_s[this->getName()];
-
-        for (FileMap::const_iterator it = files.begin(); it != files.end(); ++it)
-        {
-            boost::filesystem::path file = it->first;
-            // Check pattern
-            if (!StringUtil::match(file.string(), pattern, true))
-                continue;
-            if (bDirs)
-                file = file.branch_path();
-            if (file.empty())
-                continue;
-            if (file.BOOST_HAS_BRANCH_PATH_FUNCTION() && !bRecursive)
-                continue;
-            if (simpleList)
-                simpleList->push_back(file.string());
-            if (detailList)
-            {
-                FileInfo fi;
-                fi.archive = this;
-                fi.filename = file.string();
-                fi.basename = file.leaf();
-                fi.path = file.branch_path().string();
-                fi.compressedSize = it->second.second;
-                fi.uncompressedSize = it->second.second;
-                detailList->push_back(fi);
-            }
-        }
-    }
-    StringVectorPtr MemoryArchive::list(bool recursive, bool dirs)
-    {
-        StringVectorPtr ret(new StringVector());
-        findFiles("*", recursive, dirs, ret.getPointer(), 0);
-        return ret;
-    }
-
-    FileInfoListPtr MemoryArchive::listFileInfo(bool recursive, bool dirs)
-    {
-        FileInfoListPtr ret(new FileInfoList());
-        findFiles("*", recursive, dirs, 0, ret.getPointer());
-        return ret;
-    }
-
-    StringVectorPtr MemoryArchive::find(const Ogre::String& pattern,
-                                            bool recursive, bool dirs)
-    {
-        StringVectorPtr ret(new StringVector());
-        findFiles(pattern, recursive, dirs, ret.getPointer(), 0);
-        return ret;
-    }
-
-    FileInfoListPtr MemoryArchive::findFileInfo(const Ogre::String& pattern,
-        bool recursive, bool dirs)
-    {
-        FileInfoListPtr ret(new FileInfoList());
-        findFiles(pattern, recursive, dirs, 0, ret.getPointer());
-        return ret;
-    }
-
-    bool MemoryArchive::exists(const Ogre::String& filename)
-    {
-        const FileMap& files = archives_s[this->getName()];
-        return files.find(filename) != files.end();
-    }
-
-    const Ogre::String& MemoryArchiveFactory::getType(void) const
-    {
-        static std::string result("Memory");
-        return result;
-    }
-}
-
-#endif /* OGRE_VERSION < 0x010600 */
Index: sandbox_qt/src/libraries/core/MemoryArchive.h
===================================================================
--- sandbox_qt/src/libraries/core/MemoryArchive.h	(revision 7418)
+++ 	(revision )
@@ -1,106 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup Management Resources
-*/
-
-#ifndef _MemoryArchive_H__
-#define _MemoryArchive_H__
-
-#include "CorePrereqs.h"
-#include <OgrePrerequisites.h>
-
-#if OGRE_VERSION < 0x010600
-
-#include <map>
-#include <OgreArchive.h>
-#include <OgreArchiveFactory.h>
-#include <boost/shared_array.hpp>
-
-namespace orxonox
-{
-    /**
-    @brief
-        Provides a simple mechanism of 'memory mapped IO', but compatible for Ogre 1.4
-
-        Files are stored as shared_array<char> in a static map with the archive names
-        (imaging the different archives as resource locations). This map then contains
-        yet another map with the actual files.
-        If you want to know why we make such a fuss, contact GraphicsManager::upgradeToGraphics()
-        for more information.
-    */
-    class MemoryArchive : public Ogre::Archive
-    {
-    public:
-        MemoryArchive(const Ogre::String& name, const Ogre::String& archiveType) : Ogre::Archive(name, archiveType) { }
-        ~MemoryArchive() { }
-
-        bool isCaseSensitive(void) const { return true; }
-
-        void load();
-        void unload() { }
-
-        Ogre::DataStreamPtr open(const Ogre::String& filename) const;
-
-        Ogre::StringVectorPtr list(bool recursive = true, bool dirs = false);
-        Ogre::FileInfoListPtr listFileInfo(bool recursive = true, bool dirs = false);
-
-        Ogre::StringVectorPtr find(const Ogre::String& pattern, bool recursive = true,
-            bool dirs = false);
-        Ogre::FileInfoListPtr findFileInfo(const Ogre::String& pattern, bool recursive = true,
-            bool dirs = false);
-
-        bool exists(const Ogre::String& filename);
-
-        static void addFile(const std::string& archiveName, const std::string& filename, shared_array<char> content, size_t size)
-            { archives_s[archiveName][filename] = std::make_pair(content, size); }
-
-    private:
-        void findFiles(const Ogre::String& pattern, bool bRecursive,
-            bool bDirs, Ogre::StringVector* simpleList, Ogre::FileInfoList* detailList);
-
-        typedef std::map<std::string, std::pair<shared_array<char>, size_t> > FileMap;
-        typedef std::map<std::string, FileMap> ArchiveMap;
-        static ArchiveMap archives_s;
-    };
-
-    //! Specialisation of ArchiveFactory for MemoryArchive.
-    class _CoreExport MemoryArchiveFactory : public Ogre::ArchiveFactory
-    {
-    public:
-        const Ogre::String& getType(void) const;
-        Ogre::Archive* createInstance(const Ogre::String& name) { return new MemoryArchive(name, "Memory"); }
-        void destroyInstance(Ogre::Archive* arch)               { delete arch; }
-    };
-}
-
-#endif /* OGRE_VERSION < 0x010600 */
-
-#endif /* _MemoryArchive_H__ */
Index: sandbox_qt/src/libraries/core/MetaObjectList.cc
===================================================================
--- sandbox_qt/src/libraries/core/MetaObjectList.cc	(revision 7418)
+++ 	(revision )
@@ -1,103 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Implementation of the MetaObjectList class.
-*/
-
-#include "MetaObjectList.h"
-
-#include "util/Debug.h"
-#include "Identifier.h"
-#include "ObjectListBase.h"
-
-namespace orxonox
-{
-    // ###############################
-    // ###  MetaObjectListElement  ###
-    // ###############################
-    /**
-        @brief Destructor: Removes the ObjectListBaseElement from the ObjectListBase by linking next_ and prev_ of the ObjectListBaseElement.
-    */
-    MetaObjectListElement::~MetaObjectListElement()
-    {
-        COUT(5) << "*** MetaObjectList: Removing Object from " << this->list_->getIdentifier()->getName() << "-list." << std::endl;
-        this->list_->notifyIterators(this->element_->objectBase_);
-
-        if (this->element_->next_)
-            this->element_->next_->prev_ = this->element_->prev_;
-        else
-            this->list_->last_ = this->element_->prev_; // If there is no next_, we deleted the last object and have to update the last_ pointer of the list
-
-        if (this->element_->prev_)
-            this->element_->prev_->next_ = this->element_->next_;
-        else
-            this->list_->first_ = this->element_->next_; // If there is no prev_, we deleted the first object and have to update the first_ pointer of the list
-
-        delete this->element_;
-    }
-
-
-    // ###############################
-    // ###     MetaObjectList      ###
-    // ###############################
-    /**
-        @brief Constructor: Sets first_ to zero.
-    */
-    MetaObjectList::MetaObjectList()
-    {
-        this->first_ = 0;
-    }
-
-    /**
-        @brief Destructor: Removes all elements from the list, causing them to remove the stored ObjectListElement from the ObjectList.
-    */
-    MetaObjectList::~MetaObjectList()
-    {
-        MetaObjectListElement* temp;
-        while (this->first_)
-        {
-            temp = this->first_->next_;
-            delete this->first_;
-            this->first_ = temp;
-        }
-    }
-
-    /**
-        @brief Adds an ObjectList and an element of that list to the MetaObjectList.
-        @param list The ObjectList wherein the element is
-        @param element The element wherein the object is
-    */
-    void MetaObjectList::add(ObjectListBase* list, ObjectListBaseElement* element)
-    {
-        MetaObjectListElement* temp = this->first_;
-        this->first_ = new MetaObjectListElement(list, element);
-        this->first_->next_ = temp;
-    }
-}
Index: sandbox_qt/src/libraries/core/MetaObjectList.h
===================================================================
--- sandbox_qt/src/libraries/core/MetaObjectList.h	(revision 7418)
+++ 	(revision )
@@ -1,86 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup Object ObjectList
-    @brief Declaration of the MetaObjectList class.
-
-    The MetaObjectList is a single-linked list, containing all list-elements and their
-    lists wherein the object, owning the MetaObjectList, is registered.
-    This allows much faster deletion of objects because no iteration is needed.
-*/
-
-#ifndef _MetaObjectList_H__
-#define _MetaObjectList_H__
-
-#include "CorePrereqs.h"
-
-namespace orxonox
-{
-    // ###############################
-    // ###  MetaObjectListElement  ###
-    // ###############################
-    /// The list-element of the MetaObjectList
-    class _CoreExport MetaObjectListElement
-    {
-        public:
-            /**
-                @brief Constructor: Creates the list-element with given list and element.
-            */
-            MetaObjectListElement(ObjectListBase* list, ObjectListBaseElement* element) : next_(0), element_(element), list_(list) {}
-            ~MetaObjectListElement();
-
-            MetaObjectListElement* next_;       //!< The next Element in the list
-            ObjectListBaseElement* element_;    //!< The list element, containing the object
-            ObjectListBase* list_;              //!< The list, containing the element
-    };
-
-
-    // ###############################
-    // ###     MetaObjectList      ###
-    // ###############################
-    /**
-        @brief The MetaObjectList contains ObjectListBaseElements and their ObjectListBases.
-
-        The MetaObjectList is a single-linked list, containing all list-elements and their
-        lists wherein the object that owns the MetaObjectList is registered.
-        This allows much faster deletion of objects because no iteration is needed.
-    */
-    class _CoreExport MetaObjectList
-    {
-        public:
-            MetaObjectList();
-            ~MetaObjectList();
-            void add(ObjectListBase* list, ObjectListBaseElement* element);
-
-            MetaObjectListElement* first_;      //!< The first element in the list
-    };
-}
-
-#endif /* _MetaObjectList_H__ */
Index: sandbox_qt/src/libraries/core/Namespace.cc
===================================================================
--- sandbox_qt/src/libraries/core/Namespace.cc	(revision 7418)
+++ 	(revision )
@@ -1,176 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "Namespace.h"
-
-#include <set>
-
-#include "NamespaceNode.h"
-#include "CoreIncludes.h"
-#include "XMLPort.h"
-#include "util/SubString.h"
-
-namespace orxonox
-{
-    CreateFactory(Namespace);
-
-    Namespace::Namespace(BaseObject* creator) : BaseObject(creator),
-      bAutogeneratedFileRootNamespace_(false),
-      bRoot_(false),
-      operator_("or")
-    {
-        RegisterObject(Namespace);
-    }
-
-    Namespace::~Namespace()
-    {
-        if (this->bRoot_)
-            for (std::set<NamespaceNode*>::iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); ++it)
-                delete (*it);
-    }
-
-    void Namespace::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(Namespace, XMLPort, xmlelement, mode);
-
-        std::string name = this->getName();
-        size_t pos = 0;
-        while ((pos = name.find(',')) != std::string::npos)
-            name.replace(pos, 1, " ");
-        while ((pos = name.find(';')) != std::string::npos)
-            name.replace(pos, 1, " ");
-        while ((pos = name.find('\n')) != std::string::npos)
-            name.replace(pos, 1, " ");
-        while ((pos = name.find('\t')) != std::string::npos)
-            name.replace(pos, 1, " ");
-        SubString tokens(name, " ", "", false, '\\', true, '"', true, '\0', '\0', true, '\0');
-        if (this->bRoot_)
-        {
-            this->representingNamespaces_.insert(new NamespaceNode(this->getName()));
-        }
-        else
-        {
-            for (unsigned int i = 0; i < tokens.size(); i++)
-            {
-                for (std::set<NamespaceNode*>::iterator it = this->getNamespace()->representingNamespaces_.begin(); it != this->getNamespace()->representingNamespaces_.end(); ++it)
-                {
-                    std::set<NamespaceNode*> temp = (*it)->getNodeRelative(tokens[i]);
-                    this->representingNamespaces_.insert(temp.begin(), temp.end());
-                }
-            }
-        }
-
-        XMLPortParam(Namespace, "operator", setOperator, getOperator, xmlelement, mode);
-        XMLPortParam(Namespace, "bAutogenerated", setAutogenerated, isAutogenerated, xmlelement, mode);
-
-        if (this->bAutogeneratedFileRootNamespace_)
-        {
-            for (std::set<NamespaceNode*>::iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); ++it)
-            {
-                (*it)->setRoot(true);
-                (*it)->setHidden(true);
-            }
-        }
-
-        XMLPortObjectExtended(Namespace, BaseObject, "", loadObjects, saveObjects, xmlelement, mode, true, false);
-    }
-
-    void Namespace::loadObjects(BaseObject* object)
-    {
-        object->setNamespace(this);
-    }
-
-    const BaseObject* Namespace::saveObjects(unsigned int index) const
-    {
-        return 0; // todo
-    }
-
-    bool Namespace::includes(const Namespace* ns) const
-    {
-        for (std::set<NamespaceNode*>::const_iterator it1 = this->representingNamespaces_.begin(); it1 != this->representingNamespaces_.end(); ++it1)
-        {
-            for (std::set<NamespaceNode*>::const_iterator it2 = ns->representingNamespaces_.begin(); it2 != ns->representingNamespaces_.end(); ++it2)
-            {
-                if ((*it1)->includes(*it2))
-                {
-                    if (this->operator_ == "or")
-                        return true;
-
-                    if (this->operator_ == "not")
-                        return false;
-                }
-                else
-                {
-                    if (this->operator_ == "and")
-                        return false;
-                }
-            }
-        }
-
-        if (this->operator_ == "or")
-            return false;
-        else if (this->operator_ == "and")
-            return true;
-        else if (this->operator_ == "not")
-            return true;
-
-        return false;
-    }
-
-    std::string Namespace::toString() const
-    {
-        std::string output;
-
-        int i = 0;
-        for (std::set<NamespaceNode*>::const_iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); i++, ++it)
-        {
-            if (i > 0)
-                output += " / ";
-
-            output += (*it)->toString();
-        }
-
-        return output;
-    }
-
-    std::string Namespace::toString(const std::string& indentation) const
-    {
-        std::string output;
-
-        int i = 0;
-        for (std::set<NamespaceNode*>::const_iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); i++, ++it)
-        {
-            if (i > 0)
-                output += '\n';
-
-            output += (*it)->toString(indentation);
-        }
-
-        return output;
-    }
-}
Index: sandbox_qt/src/libraries/core/Namespace.h
===================================================================
--- sandbox_qt/src/libraries/core/Namespace.h	(revision 7418)
+++ 	(revision )
@@ -1,83 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup XML Loader
-*/
-
-#ifndef _Namespace_H__
-#define _Namespace_H__
-
-#include "CorePrereqs.h"
-
-#include <set>
-#include <string>
-#include "BaseObject.h"
-
-namespace orxonox
-{
-    class Namespace : public BaseObject
-    {
-        public:
-            Namespace(BaseObject* creator);
-            virtual ~Namespace();
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-
-            void loadObjects(BaseObject* object);
-            const BaseObject* saveObjects(unsigned int index) const;
-
-            void setAutogenerated(bool bAutogenerated)
-                { this->bAutogeneratedFileRootNamespace_ = bAutogenerated; }
-            bool isAutogenerated() const
-                { return this->bAutogeneratedFileRootNamespace_; }
-
-            void setOperator(const std::string& op)
-                { this->operator_ = op; }
-            const std::string& getOperator() const
-                { return this->operator_; }
-
-            void setRoot(bool bRoot)
-                { this->bRoot_ = bRoot; }
-
-            bool includes(const Namespace* ns) const;
-            bool isIncludedIn(const Namespace* ns) const { return ns->includes(this); }
-
-            std::string toString() const;
-            std::string toString(const std::string& indentation) const;
-
-        private:
-            std::set<NamespaceNode*> representingNamespaces_;
-            bool bAutogeneratedFileRootNamespace_;
-            bool bRoot_;
-            std::string operator_;
-    };
-}
-
-#endif /* _Namespace_H__ */
Index: sandbox_qt/src/libraries/core/NamespaceNode.cc
===================================================================
--- sandbox_qt/src/libraries/core/NamespaceNode.cc	(revision 7418)
+++ 	(revision )
@@ -1,174 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "NamespaceNode.h"
-#include "util/Debug.h"
-
-namespace orxonox
-{
-    NamespaceNode::NamespaceNode(const std::string& name, NamespaceNode* parent)
-    {
-        this->name_ = name;
-        this->parent_ = parent;
-        this->bRoot_ = false;
-        this->bHidden_ = false;
-    }
-
-    NamespaceNode::~NamespaceNode()
-    {
-        for (std::map<std::string, NamespaceNode*>::iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); )
-            delete (it++)->second;
-    }
-
-    std::set<NamespaceNode*> NamespaceNode::getNodeRelative(const std::string& name)
-    {
-        std::set<NamespaceNode*> nodes;
-
-        if (name.empty())
-        {
-            nodes.insert(this);
-        }
-        else
-        {
-            size_t pos = name.find("::");
-            std::string firstPart = name;
-            std::string secondPart;
-
-            if (pos != std::string::npos)
-            {
-                firstPart = name.substr(0, pos);
-                secondPart = name.substr(pos + 2, std::string::npos);
-            }
-
-            if (firstPart == "..")
-            {
-                if (this->bRoot_)
-                {
-                    COUT(2) << "Warning: Can't go to enclosing namespace with '..' operator in namespace " << this->name_ << ", namespace is root." << std::endl;
-                    nodes = this->getNodeRelative(secondPart);
-                }
-                else if (!this->parent_)
-                {
-                    COUT(2) << "Warning: Can't go to enclosing namespace with '..' operator in namespace " << this->name_ << ", no parent namespace set." << std::endl;
-                    nodes = this->getNodeRelative(secondPart);
-                }
-                else
-                {
-                    nodes = this->parent_->getNodeRelative(secondPart);
-                }
-            }
-            else if (name.find('@') != 0)
-            {
-                std::map<std::string, NamespaceNode*>::iterator it = this->subnodes_.find(firstPart);
-                if (it == this->subnodes_.end())
-                    it = this->subnodes_.insert(this->subnodes_.begin(), std::pair<std::string, NamespaceNode*>(firstPart, new NamespaceNode(firstPart, this)));
-
-                if (it->second->isHidden())
-                {
-                    COUT(2) << "Warning: Subnamespace '" << firstPart << "' in namespace '" << this->name_ << "' is hidden and can't be accessed." << std::endl;
-                    nodes.insert(this);
-                }
-                else
-                {
-                    nodes = it->second->getNodeRelative(secondPart);
-                }
-            }
-            else
-            {
-                bool bFoundMatchingNamespace = false;
-
-                for (std::map<std::string, NamespaceNode*>::iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
-                {
-                    if (it->first.find(firstPart) == (it->first.size() - firstPart.size()))
-                    {
-                        std::set<NamespaceNode*> temp2 = it->second->getNodeRelative(secondPart);
-                        nodes.insert(temp2.begin(), temp2.end());
-                        bFoundMatchingNamespace = true;
-                    }
-                }
-
-                if (!bFoundMatchingNamespace)
-                {
-                    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;
-                    nodes = this->getNodeRelative(secondPart);
-                }
-            }
-        }
-
-        return nodes;
-    }
-
-    bool NamespaceNode::includes(const NamespaceNode* ns) const
-    {
-        if (ns == this)
-        {
-            return true;
-        }
-        else
-        {
-            for (std::map<std::string, NamespaceNode*>::const_iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
-                if (it->second->includes(ns))
-                    return true;
-        }
-
-        return false;
-    }
-
-    std::string NamespaceNode::toString() const
-    {
-        std::string output = this->name_;
-
-        if (this->subnodes_.size() > 0)
-        {
-            output += " (";
-
-            int i = 0;
-            for (std::map<std::string, NamespaceNode*>::const_iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); i++, ++it)
-            {
-                if (i > 0)
-                    output += ", ";
-
-                output += it->second->toString();
-            }
-
-            output += ')';
-        }
-
-        return output;
-    }
-
-    std::string NamespaceNode::toString(const std::string& indentation) const
-    {
-        std::string output = (indentation + this->name_ + '\n');
-
-        for (std::map<std::string, NamespaceNode*>::const_iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
-            output += it->second->toString(indentation + "  ");
-
-        return output;
-    }
-}
Index: sandbox_qt/src/libraries/core/NamespaceNode.h
===================================================================
--- sandbox_qt/src/libraries/core/NamespaceNode.h	(revision 7418)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup XML Loader
-*/
-
-#ifndef _NamespaceNode_H__
-#define _NamespaceNode_H__
-
-#include "CorePrereqs.h"
-
-#include <map>
-#include <set>
-#include <string>
-
-namespace orxonox
-{
-    class NamespaceNode
-    {
-        public:
-            NamespaceNode(const std::string& name, NamespaceNode* parent = 0);
-            ~NamespaceNode();
-
-            std::set<NamespaceNode*> getNodeRelative(const std::string& name);
-
-            void setRoot(bool bRoot) { this->bRoot_ = bRoot; }
-            void setHidden(bool bHidden) { this->bHidden_ = bHidden; }
-
-            bool isRoot() const { return this->bRoot_; }
-            bool isHidden() const { return this->bHidden_; }
-
-            bool includes(const NamespaceNode*) const;
-
-            std::string toString() const;
-            std::string toString(const std::string& indentation) const;
-
-        private:
-            std::string name_;
-            NamespaceNode* parent_;
-            std::map<std::string, NamespaceNode*> subnodes_;
-            bool bHidden_;
-            bool bRoot_;
-    };
-}
-
-#endif /* _NamespaceNode_H__ */
Index: sandbox_qt/src/libraries/core/ObjectList.h
===================================================================
--- sandbox_qt/src/libraries/core/ObjectList.h	(revision 7418)
+++ 	(revision )
@@ -1,101 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @defgroup ObjectList Object-lists and iterators
-    @ingroup Object
-*/
-
-/**
-    @file
-    @ingroup Object ObjectList
-    @brief Definition of the ObjectList class, a wrapper of ObjectListBase.
-
-    @ref orxonox::ObjectList "ObjectList<T>" is a wrapper of an @ref orxonox::ObjectListBase
-    "ObjectListBase" of class @a T. Use @ref orxonox::ObjectListIterator "ObjectListIterator<T>"
-    to iterate through the list.
-*/
-
-#ifndef _ObjectList_H__
-#define _ObjectList_H__
-
-#include "CorePrereqs.h"
-
-#include "Identifier.h"
-#include "ObjectListBase.h"
-#include "ObjectListIterator.h"
-
-namespace orxonox
-{
-    // ###############################
-    // ###       ObjectList        ###
-    // ###############################
-    /**
-        @brief The ObjectList contains all objects of the given class.
-
-        Wraps the ObjectListBase which contains all objects of type @a T. Use @ref ObjectListIterator
-        "ObjectListIterator<T>" or its typedef ObjectList<T>::iterator to iterate through all objects
-        in the list.
-    */
-    template <class T>
-    class ObjectList
-    {
-        public:
-            typedef ObjectListIterator<T> iterator;
-
-            /// Returns an Iterator to the first element in the list.
-            inline static ObjectListElement<T>* begin()
-            {
-                ObjectListBase* list = ClassIdentifier<T>::getIdentifier()->getObjects();
-                return static_cast<ObjectListElement<T>*>(list->begin().element_);
-            }
-
-            /// Returns an Iterator to the element after the last element in the list.
-            inline static ObjectListElement<T>* end()
-            {
-                ObjectListBase* list = ClassIdentifier<T>::getIdentifier()->getObjects();
-                return static_cast<ObjectListElement<T>*>(list->end().element_);
-            }
-
-            /// Returns an Iterator to the last element in the list.
-            inline static ObjectListElement<T>* rbegin()
-            {
-                ObjectListBase* list = ClassIdentifier<T>::getIdentifier()->getObjects();
-                return static_cast<ObjectListElement<T>*>(list->rbegin().element_);
-            }
-
-            /// Returns an Iterator to the element before the first element in the list.
-            inline static ObjectListElement<T>* rend()
-            {
-                ObjectListBase* list = ClassIdentifier<T>::getIdentifier()->getObjects();
-                return static_cast<ObjectListElement<T>*>(list->rend().element_);
-            }
-    };
-}
-
-#endif /* _ObjectList_H__ */
Index: sandbox_qt/src/libraries/core/ObjectListBase.cc
===================================================================
--- sandbox_qt/src/libraries/core/ObjectListBase.cc	(revision 7418)
+++ 	(revision )
@@ -1,103 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Implementation of the ObjectListBase class.
-*/
-
-#include "ObjectListBase.h"
-
-#include <set>
-#include "Identifier.h"
-#include "Iterator.h"
-#include "ObjectListIterator.h"
-
-namespace orxonox
-{
-    /**
-        @brief Constructor: Sets default values.
-    */
-    ObjectListBase::ObjectListBase(Identifier* identifier)
-    {
-        this->identifier_ = identifier;
-        this->first_ = 0;
-        this->last_ = 0;
-    }
-
-    /**
-        @brief Destructor: Deletes all list-elements, but NOT THE OBJECTS.
-    */
-    ObjectListBase::~ObjectListBase()
-    {
-        ObjectListBaseElement* temp;
-        while (this->first_)
-        {
-            temp = this->first_->next_;
-            delete this->first_;
-            this->first_ = temp;
-        }
-    }
-
-    /**
-        @brief Increases all Iterators that currently point on the given element (because it gets removed).
-        @param object The object that gets removed
-    */
-    void ObjectListBase::notifyIterators(OrxonoxClass* object) const
-    {
-        for (std::vector<void*>::const_iterator it = this->iterators_.begin(); it != this->iterators_.end(); ++it)
-            ((Iterator<OrxonoxClass>*)(*it))->incrementIfEqual(object);
-        for (std::vector<void*>::const_iterator it = this->objectListIterators_.begin(); it != this->objectListIterators_.end(); ++it)
-            ((ObjectListIterator<OrxonoxClass>*)(*it))->incrementIfEqual(object);
-    }
-
-    /**
-        @brief Adds a new object to the end of the list.
-        @param element The element to add
-        @return The pointer to the new ObjectListBaseElement, needed by the MetaObjectList of the added object
-    */
-    ObjectListBaseElement* ObjectListBase::add(ObjectListBaseElement* element)
-    {
-        if (!this->last_)
-        {
-            // If the list is empty
-            this->last_ = element;
-            this->first_ = this->last_; // There's only one object in the list now
-        }
-        else
-        {
-            // If the list isn't empty
-            ObjectListBaseElement* temp = this->last_;
-            this->last_ = element;
-            this->last_->prev_ = temp;
-            temp->next_ = this->last_;
-        }
-
-        return this->last_;
-    }
-}
Index: sandbox_qt/src/libraries/core/ObjectListBase.h
===================================================================
--- sandbox_qt/src/libraries/core/ObjectListBase.h	(revision 7418)
+++ 	(revision )
@@ -1,159 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup Object ObjectList
-    @brief Declaration of the ObjectListBase class which stores all objects of each class.
-
-    orxonox::ObjectListBase is a double-linked list, used by @ref orxonox::Identifier "Identifiers"
-    to store all objects of a given class. Newly created objects are added to the list through the
-    @c RegisterObject() macro in the constructor.
-*/
-
-#ifndef _ObjectListBase_H__
-#define _ObjectListBase_H__
-
-#include "CorePrereqs.h"
-
-#include <vector>
-#include "OrxonoxClass.h"
-
-namespace orxonox
-{
-    // ###############################
-    // ###  ObjectListBaseElement  ###
-    // ###############################
-    /// The list-element of the ObjectListBase
-    class _CoreExport ObjectListBaseElement
-    {
-        public:
-            /**
-                @brief Constructor: Creates the list-element with an object.
-                @param objectBase The object to store
-            */
-            ObjectListBaseElement(OrxonoxClass* objectBase) : next_(0), prev_(0), objectBase_(objectBase) {}
-
-            ObjectListBaseElement* next_;       //!< The next element in the list
-            ObjectListBaseElement* prev_;       //!< The previous element in the list
-            OrxonoxClass* objectBase_;
-    };
-
-
-    // ###############################
-    // ###    ObjectListElement    ###
-    // ###############################
-    /// The list-element that actually contains the object
-    template <class T>
-    class ObjectListElement : public ObjectListBaseElement
-    {
-        public:
-            ObjectListElement(T* object) : ObjectListBaseElement(static_cast<OrxonoxClass*>(object)), object_(object) {}
-            T* object_;              //!< The object
-    };
-
-
-    // ###############################
-    // ###     ObjectListBase      ###
-    // ###############################
-    /**
-        @brief The ObjectListBase contains all objects of a given class.
-
-        The ObjectListBase is used by Identifiers to store all objects of their class.
-        You can use Identifier::getObjects() to get the object-list from an Identifier.
-        Use @ref Iterator "Iterator<T>" to iterate through them.
-
-        Alternatively you can also use the static helper class @ref orxonox::ObjectList "ObjectList<T>"
-        to get the list of all objects of type @a T. Use @ref ObjectListIterator "ObjectListIterator<T>"
-        or @ref Iterator "Iterator<T>" to iterate through them.
-    */
-    class _CoreExport ObjectListBase
-    {
-        friend class MetaObjectListElement;
-
-        public:
-            ObjectListBase(Identifier* identifier);
-            ~ObjectListBase();
-
-            ObjectListBaseElement* add(ObjectListBaseElement* element);
-
-            /// Helper struct, used to export an element and the list to an instance of Iterator.
-            struct Export
-            {
-                Export(ObjectListBase* list, ObjectListBaseElement* element) : list_(list), element_(element) {}
-                ObjectListBase* list_;
-                ObjectListBaseElement* element_;
-            };
-
-            /// Returns a pointer to the first element in the list. Works only with Iterator.
-            inline Export begin() { return ObjectListBase::Export(this, this->first_); }
-            /// Returns a pointer to the element after the last element in the list. Works only with Iterator.
-            inline Export end() { return ObjectListBase::Export(this, 0); }
-            /// Returns a pointer to the last element in the list. Works only with Iterator.
-            inline Export rbegin() { return ObjectListBase::Export(this, this->last_); }
-            /// Returns a pointer to the element in front of the first element in the list. Works only with Iterator.
-            inline Export rend() { return ObjectListBase::Export(this, 0); }
-
-            inline void registerIterator(void* iterator) { this->iterators_.push_back(iterator); }
-            inline void unregisterIterator(void* iterator)
-            {
-                for (unsigned int i = 0; i < this->iterators_.size(); ++i)
-                {
-                    if (iterators_[i] == iterator)
-                    {
-                        iterators_.erase(iterators_.begin() + i);
-                        break;
-                    }
-                }
-            }
-            inline void registerObjectListIterator(void* iterator) { this->objectListIterators_.push_back(iterator); }
-            inline void unregisterObjectListIterator(void* iterator)
-            {
-                for (unsigned int i = 0; i < this->objectListIterators_.size(); ++i)
-                {
-                    if (objectListIterators_[i] == iterator)
-                    {
-                        objectListIterators_.erase(objectListIterators_.begin() + i);
-                        break;
-                    }
-                }
-            }
-            void notifyIterators(OrxonoxClass* object) const;
-
-            inline Identifier* getIdentifier() const { return this->identifier_; }
-
-        private:
-            Identifier* identifier_;                 //!< The Iterator owning this list
-            ObjectListBaseElement* first_;           //!< The first element in the list
-            ObjectListBaseElement* last_;            //!< The last element in the list
-            std::vector<void*> iterators_;           //!< A list of Iterators pointing on an element in this list
-            std::vector<void*> objectListIterators_; //!< A list of ObjectListIterators pointing on an element in this list
-    };
-}
-
-#endif /* _ObjectListBase_H__ */
Index: sandbox_qt/src/libraries/core/ObjectListIterator.h
===================================================================
--- sandbox_qt/src/libraries/core/ObjectListIterator.h	(revision 7418)
+++ 	(revision )
@@ -1,236 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup Object ObjectList
-    @brief Definition of the ObjectListIterator class, used to iterate through object-lists.
-
-    @anchor ObjectListIteratorExample
-
-    @ref orxonox::ObjectListIterator "ObjectListIterator<T>" allows to iterate through
-    @ref orxonox::ObjectList "ObjectList<T>", containing all objects of type @a T. In contrast to
-    @ref orxonox::Iterator "Iterator<T>", this iterator is limited to the object-list of type @a T.
-    It is, however, much faster as it doesn't need a @c dynamic_cast.
-
-    Usage:
-    @code
-    for (ObjectListIterator<myClass> it = ObjectList<myClass>::begin(); it != ObjectList<myClass>::end(); ++it)
-    {
-        it->someFunction(...);
-        myClass* myObject = *it;
-    }
-    @endcode
-
-    @note @ref orxonox::ObjectList::iterator "ObjectList<T>::iterator" is identical to
-          @ref orxonox::ObjectListIterator "ObjectListIterator<T>" (it's just a typedef).
-*/
-
-#ifndef _ObjectListIterator_H__
-#define _ObjectListIterator_H__
-
-#include "CorePrereqs.h"
-#include "Identifier.h"
-#include "ObjectList.h"
-
-namespace orxonox
-{
-    /**
-        @brief ObjectListIterator<T> allows to iterate through the ObjectList of class @a T.
-
-        @see See @ref ObjectListIteratorExample "ObjectListIterator.h" for more information an example.
-    */
-    template <class T>
-    class ObjectListIterator
-    {
-        template <class I>
-        friend class Iterator;
-
-        public:
-            /**
-                @brief Constructor: Sets the element, whereon the ObjectListIterator points, to zero.
-            */
-            inline ObjectListIterator()
-            {
-                this->element_ = 0;
-                ClassIdentifier<T>::getIdentifier()->getObjects()->registerObjectListIterator(this);
-            }
-
-            /**
-                @brief Constructor: Sets this element to a given element.
-                @param element The element to start with
-            */
-            inline ObjectListIterator(ObjectListElement<T>* element)
-            {
-                this->element_ = element;
-                ClassIdentifier<T>::getIdentifier()->getObjects()->registerObjectListIterator(this);
-            }
-
-            /**
-                @brief Constructor: Sets this element to the element of another ObjectListIterator.
-                @param other The other ObjectListIterator
-            */
-            inline ObjectListIterator(const ObjectListIterator<T>& other)
-            {
-                this->element_ = other.element_;
-                ClassIdentifier<T>::getIdentifier()->getObjects()->registerObjectListIterator(this);
-            }
-
-            /**
-                @brief Unregisters the ObjectListIterator from the ObjectList.
-            */
-            inline ~ObjectListIterator()
-            {
-                ClassIdentifier<T>::getIdentifier()->getObjects()->unregisterObjectListIterator(this);
-            }
-
-            /**
-                @brief Assigns an ObjectListElement.
-                @param element The ObjectListElement
-            */
-            inline ObjectListIterator<T>& operator=(ObjectListElement<T>* element)
-            {
-                this->element_ = element;
-                return (*this);
-            }
-
-            /**
-                @brief Assigns the element of another ObjectListIterator.
-                @param other The other ObjectListIterator
-            */
-            inline ObjectListIterator<T>& operator=(const ObjectListIterator<T>& other)
-            {
-                this->element_ = other.element_;
-                return (*this);
-            }
-
-            /**
-                @brief Overloading of the ++it operator: ObjectListIterator points to the next object in the list.
-                @return The ObjectListIterator itself
-            */
-            inline const ObjectListIterator<T>& operator++()
-            {
-                this->element_ = static_cast<ObjectListElement<T>*>(this->element_->next_);
-                return *this;
-            }
-
-            /**
-                @brief Overloading of the it++ operator: ObjectListIterator points to the next object in the list.
-                @return The ObjectListIterator itself
-            */
-            inline ObjectListIterator<T> operator++(int)
-            {
-                ObjectListIterator<T> copy = *this;
-                this->element_ = static_cast<ObjectListElement<T>*>(this->element_->next_);
-                return copy;
-            }
-
-            /**
-                @brief Overloading of the --it operator: ObjectListIterator points to the previous object in the list.
-                @return The ObjectListIterator itself
-            */
-            inline const ObjectListIterator<T>& operator--()
-            {
-                this->element_ = static_cast<ObjectListElement<T>*>(this->element_->prev_);
-                return *this;
-            }
-
-            /**
-                @brief Overloading of the it-- operator: ObjectListIterator points to the previous object in the list.
-                @return The ObjectListIterator itself
-            */
-            inline ObjectListIterator<T> operator--(int i)
-            {
-                ObjectListIterator<T> copy = *this;
-                this->element_ = static_cast<ObjectListElement<T>*>(this->element_->prev_);
-                return copy;
-            }
-
-            /**
-                @brief Overloading of the *it operator: returns the pointer to the object.
-                @return The object the ObjectListIterator points at
-            */
-            inline T* operator*() const
-            {
-                return this->element_->object_;
-            }
-
-            /**
-                @brief Overloading of the it-> operator: returns the pointer to the object.
-                @return The object the ObjectListIterator points at
-            */
-            inline T* operator->() const
-            {
-                return this->element_->object_;
-            }
-
-            /**
-                @brief Overloading of the typecast-operator to bool: returns true if the ObjectListIterator points to an existing object.
-                @return True if the ObjectListIterator points to an existing object.
-            */
-            inline operator bool() const
-            {
-                return (this->element_ != 0);
-            }
-
-            /**
-                @brief Overloading of the == operator to compare with another ObjectListIterator.
-                @param compare The other ObjectListIterator
-                @return True if the ObjectListIterator point to the same element
-            */
-            inline bool operator==(const ObjectListIterator<T>& compare) const
-            {
-                return (this->element_ == compare.element_);
-            }
-
-            /**
-                @brief Overloading of the != operator to compare with another ObjectListIterator.
-                @param compare The other ObjectListIterator
-                @return True if the ObjectListIterator point to different elements
-            */
-            inline bool operator!=(const ObjectListIterator<T>& compare) const
-            {
-                return (this->element_ != compare.element_);
-            }
-
-            /**
-                @brief Increments the ObjectListIterator if it points at the given object.
-                @param object The object to compare with
-            */
-            inline void incrementIfEqual(OrxonoxClass* object)
-            {
-                if (this->element_ && this->element_->objectBase_ == object)
-                    this->operator++();
-            }
-
-        private:
-            ObjectListElement<T>* element_;        //!< The element the iterator points at
-    };
-}
-
-#endif /* _ObjectListIterator_H__ */
Index: sandbox_qt/src/libraries/core/OrxonoxClass.cc
===================================================================
--- sandbox_qt/src/libraries/core/OrxonoxClass.cc	(revision 7418)
+++ 	(revision )
@@ -1,141 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Implementation of OrxonoxClass.
-*/
-
-#include "OrxonoxClass.h"
-
-#include <cassert>
-#include "MetaObjectList.h"
-#include "Identifier.h"
-#include "WeakPtr.h"
-
-namespace orxonox
-{
-    /**
-        @brief Constructor: Sets the default values.
-    */
-    OrxonoxClass::OrxonoxClass()
-    {
-        this->identifier_ = 0;
-        this->parents_ = 0;
-        this->metaList_ = new MetaObjectList();
-        this->referenceCount_ = 0;
-        this->requestedDestruction_ = false;
-        // Optimisation
-        this->objectPointers_.reserve(6);
-    }
-
-    /**
-        @brief Destructor: Removes the object from the object-lists, notifies all @ref WeakPtr "weak pointers" that this object is being deleted.
-    */
-    OrxonoxClass::~OrxonoxClass()
-    {
-//        if (!this->requestedDestruction_)
-//            COUT(2) << "Warning: Destroyed object without destroy() (" << this->getIdentifier()->getName() << ')' << std::endl;
-
-        assert(this->referenceCount_ <= 0);
-
-        this->unregisterObject();
-
-        // parents_ exists only if isCreatingHierarchy() of the associated Identifier returned true while creating the class
-        if (this->parents_)
-            delete this->parents_;
-
-        // reset all weak pointers pointing to this object
-        for (std::set<WeakPtr<OrxonoxClass>*>::iterator it = this->weakPointers_.begin(); it != this->weakPointers_.end(); )
-            (*(it++))->objectDeleted();
-    }
-
-    /**
-        @brief Deletes the object if no @ref orxonox::SmartPtr "smart pointers" point to this object. Otherwise schedules the object to be deleted as soon as possible.
-    */
-    void OrxonoxClass::destroy()
-    {
-        assert(this); // Just in case someone tries to delete a NULL pointer
-        this->requestedDestruction_ = true;
-        if (this->referenceCount_ == 0)
-        {
-            this->preDestroy();
-            if (this->referenceCount_ == 0)
-                delete this;
-        }
-    }
-
-    /**
-        @brief Removes this object from the object-lists.
-    */
-    void OrxonoxClass::unregisterObject()
-    {
-        if (this->metaList_)
-            delete this->metaList_;
-        this->metaList_ = 0;
-    }
-
-    /// Returns true if the object's class is of the given type or a derivative.
-    bool OrxonoxClass::isA(const Identifier* identifier)
-        { return this->getIdentifier()->isA(identifier); }
-    /// Returns true if the object's class is exactly of the given type.
-    bool OrxonoxClass::isExactlyA(const Identifier* identifier)
-        { return this->getIdentifier()->isExactlyA(identifier); }
-    /// Returns true if the object's class is a child of the given type.
-    bool OrxonoxClass::isChildOf(const Identifier* identifier)
-        { return this->getIdentifier()->isChildOf(identifier); }
-    /// Returns true if the object's class is a direct child of the given type.
-    bool OrxonoxClass::isDirectChildOf(const Identifier* identifier)
-        { return this->getIdentifier()->isDirectChildOf(identifier); }
-    /// Returns true if the object's class is a parent of the given type.
-    bool OrxonoxClass::isParentOf(const Identifier* identifier)
-        { return this->getIdentifier()->isParentOf(identifier); }
-    /// Returns true if the object's class is a direct parent of the given type.
-    bool OrxonoxClass::isDirectParentOf(const Identifier* identifier)
-        { return this->getIdentifier()->isDirectParentOf(identifier); }
-
-
-    /// Returns true if the object's class is of the given type or a derivative.
-    bool OrxonoxClass::isA(const OrxonoxClass* object)
-        { return this->getIdentifier()->isA(object->getIdentifier()); }
-    /// Returns true if the object's class is exactly of the given type.
-    bool OrxonoxClass::isExactlyA(const OrxonoxClass* object)
-        { return this->getIdentifier()->isExactlyA(object->getIdentifier()); }
-    /// Returns true if the object's class is a child of the given type.
-    bool OrxonoxClass::isChildOf(const OrxonoxClass* object)
-        { return this->getIdentifier()->isChildOf(object->getIdentifier()); }
-    /// Returns true if the object's class is a direct child of the given type.
-    bool OrxonoxClass::isDirectChildOf(const OrxonoxClass* object)
-        { return this->getIdentifier()->isDirectChildOf(object->getIdentifier()); }
-    /// Returns true if the object's class is a parent of the given type.
-    bool OrxonoxClass::isParentOf(const OrxonoxClass* object)
-        { return this->getIdentifier()->isParentOf(object->getIdentifier()); }
-    /// Returns true if the object's class is a direct child of the given type.
-    bool OrxonoxClass::isDirectParentOf(const OrxonoxClass* object)
-        { return this->getIdentifier()->isDirectParentOf(object->getIdentifier()); }
-}
Index: sandbox_qt/src/libraries/core/OrxonoxClass.h
===================================================================
--- sandbox_qt/src/libraries/core/OrxonoxClass.h	(revision 7418)
+++ 	(revision )
@@ -1,195 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @defgroup OrxonoxClass OrxonoxClass
-    @ingroup Class
-*/
-
-/**
-    @file
-    @ingroup Class OrxonoxClass
-    @brief Declaration of OrxonoxClass, the base class of all objects and interfaces in Orxonox.
-
-    All objects and interfaces of the game-logic (not the engine) are derived from OrxonoxClass.
-    It stores the Identifier and the MetaObjectList and has all needed functions to create and use the class-hierarchy.
-*/
-
-#ifndef _OrxonoxClass_H__
-#define _OrxonoxClass_H__
-
-#include "CorePrereqs.h"
-#include "Super.h"
-
-#include <set>
-#include <vector>
-
-/**
-@def CCOUT
-    Acts almost exactly like COUT(x), but prepends "ClassName: "
-*/
-#define CCOUT(level) \
-    COUT(level) << this->getIdentifier()->getName() << ": "
-
-namespace orxonox
-{
-    /**
-        @brief The class all objects and interfaces of the game-logic (not the engine) are derived from.
-
-        The BaseObject and Interfaces are derived with @c virtual @c public @c OrxonoxClass from OrxonoxClass.
-        OrxonoxClass is needed to create the class-hierarchy at startup and to store the Identifier and the
-        MetaObjectList, as well as to provide an interface for SmartPtr and WeakPtr.
-    */
-    class _CoreExport OrxonoxClass
-    {
-        template <class T>
-        friend class ClassIdentifier;
-
-        template <class T>
-        friend class SmartPtr;
-
-        template <class T>
-        friend class WeakPtr;
-
-        public:
-            OrxonoxClass();
-            virtual ~OrxonoxClass();
-
-            void destroy();
-            void unregisterObject();
-
-            /// Function to collect the SetConfigValue-macro calls.
-            void setConfigValues() {};
-
-            /// Returns the Identifier of the object.
-            inline Identifier* getIdentifier() const { return this->identifier_; }
-
-            bool isA(const Identifier* identifier);
-            bool isExactlyA(const Identifier* identifier);
-            bool isChildOf(const Identifier* identifier);
-            bool isDirectChildOf(const Identifier* identifier);
-            bool isParentOf(const Identifier* identifier);
-            bool isDirectParentOf(const Identifier* identifier);
-
-            /// Returns true if the object's class is of the given type or a derivative.
-            template <class B> inline bool isA(const SubclassIdentifier<B>* identifier)
-                { return this->isA(*identifier); }
-            /// Returns true if the object's class is exactly of the given type.
-            template <class B> inline bool isExactlyA(const SubclassIdentifier<B>* identifier)
-                { return this->isExactlyA(*identifier); }
-            /// Returns true if the object's class is a child of the given type.
-            template <class B> inline bool isChildOf(const SubclassIdentifier<B>* identifier)
-                { return this->isChildOf(*identifier); }
-            /// Returns true if the object's class is a direct child of the given type.
-            template <class B> inline bool isDirectChildOf(const SubclassIdentifier<B>* identifier)
-                { return this->isDirectChildOf(*identifier); }
-            /// Returns true if the object's class is a parent of the given type.
-            template <class B> inline bool isParentOf(const SubclassIdentifier<B>* identifier)
-                { return this->isParentOf(*identifier); }
-            /// Returns true if the object's class is a direct parent of the given type.
-            template <class B> inline bool isDirectParentOf(const SubclassIdentifier<B>* identifier)
-                { return this->isDirectParentOf(*identifier); }
-
-            bool isA(const OrxonoxClass* object);
-            bool isExactlyA(const OrxonoxClass* object);
-            bool isChildOf(const OrxonoxClass* object);
-            bool isDirectChildOf(const OrxonoxClass* object);
-            bool isParentOf(const OrxonoxClass* object);
-            bool isDirectParentOf(const OrxonoxClass* object);
-
-            virtual void clone(OrxonoxClass*& item) {}
-
-            /// Returns the number of @ref orxonox::SmartPtr "smart pointers" that point to this object.
-            inline unsigned int getReferenceCount() const
-                { return this->referenceCount_; }
-
-            /**
-            @brief
-                Returns a valid pointer of any derived type that is
-                registered in the class hierarchy.
-            @return
-                Returns NULL if the no pointer was found.
-            */
-            FORCEINLINE void* getDerivedPointer(unsigned int classID)
-            {
-                for (int i = this->objectPointers_.size() - 1; i >= 0; --i)
-                {
-                    if (this->objectPointers_[i].first == classID)
-                        return this->objectPointers_[i].second;
-                }
-                return NULL;
-            }
-
-            /// Version of getDerivedPointer with template
-            template <class T> FORCEINLINE T* getDerivedPointer(unsigned int classID)
-            {   return static_cast<T*>(this->getDerivedPointer(classID));   }
-            /// Const version of getDerivedPointer with template
-            template <class T> FORCEINLINE const T* getDerivedPointer(unsigned int classID) const
-            {   return const_cast<OrxonoxClass*>(this)->getDerivedPointer<T>(classID);   }
-
-        protected:
-            /// This virtual function is called if destroy() is called and no SmartPtr points to this object. Used in some cases to create a new SmartPtr to prevent destruction.
-            virtual void preDestroy() {}
-
-        private:
-            /// Increments the reference counter (for smart pointers).
-            inline void incrementReferenceCount()
-                { ++this->referenceCount_; }
-            /// Decrements the reference counter (for smart pointers).
-            inline void decrementReferenceCount()
-            {
-                --this->referenceCount_;
-                if (this->referenceCount_ == 0 && this->requestedDestruction_)
-                    this->destroy();
-            }
-
-            /// Register a weak pointer which points to this object.
-            template <class T>
-            inline void registerWeakPtr(WeakPtr<T>* pointer)
-                { this->weakPointers_.insert(reinterpret_cast<WeakPtr<OrxonoxClass>*>(pointer)); }
-            /// Unegister a weak pointer which pointed to this object before.
-            template <class T>
-            inline void unregisterWeakPtr(WeakPtr<T>* pointer)
-                { this->weakPointers_.erase(reinterpret_cast<WeakPtr<OrxonoxClass>*>(pointer)); }
-
-            Identifier* identifier_;                            //!< The Identifier of the object
-            std::set<const Identifier*>* parents_;              //!< List of all parents of the object
-            MetaObjectList* metaList_;                          //!< MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in
-            int referenceCount_;                                //!< Counts the references from smart pointers to this object
-            bool requestedDestruction_;                         //!< Becomes true after someone called delete on this object
-            std::set<WeakPtr<OrxonoxClass>*> weakPointers_;     //!< All weak pointers which point to this object (and like to get notified if it dies)
-
-            /// 'Fast map' that holds this-pointers of all derived types
-            std::vector<std::pair<unsigned int, void*> > objectPointers_;
-    };
-
-    SUPER_FUNCTION(11, OrxonoxClass, clone, false);
-
-}
-
-#endif /* _OrxonoxClass_H__ */
Index: sandbox_qt/src/libraries/core/Resource.cc
===================================================================
--- sandbox_qt/src/libraries/core/Resource.cc	(revision 7418)
+++ 	(revision )
@@ -1,116 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "Resource.h"
-
-#include <boost/filesystem/path.hpp>
-#include <OgreException.h>
-#include <OgreFileSystem.h>
-#include <OgreResourceGroupManager.h>
-
-namespace orxonox
-{
-    std::string Resource::DEFAULT_GROUP(Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
-
-    DataStreamPtr Resource::open(const std::string& name)
-    {
-        return Ogre::ResourceGroupManager::getSingleton().openResource(name,
-            Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, true);
-    }
-
-    DataStreamListPtr Resource::openMulti(const std::string& pattern)
-    {
-        DataStreamListPtr resources(new Ogre::DataStreamList());
-        const Ogre::StringVector& groups = Ogre::ResourceGroupManager::getSingleton().getResourceGroups();
-        for (Ogre::StringVector::const_iterator it = groups.begin(); it != groups.end(); ++it)
-        {
-            DataStreamListPtr temp = Ogre::ResourceGroupManager::getSingleton().openResources(pattern, *it);
-            resources->insert(resources->end(), temp->begin(), temp->end());
-        }
-        return resources;
-    }
-
-    bool Resource::exists(const std::string& name)
-    {
-        try
-        {
-            Ogre::ResourceGroupManager::getSingleton().findGroupContainingResource(name);
-            return true;
-        }
-        catch (const Ogre::Exception&)
-        {
-            return false;
-        }
-    }
-
-    shared_ptr<ResourceInfo> Resource::getInfo(const std::string& name)
-    {
-        std::string group;
-        try
-        {
-            group = Ogre::ResourceGroupManager::getSingleton().findGroupContainingResource(name);
-        }
-        catch (const Ogre::Exception&)
-        {
-            return shared_ptr<ResourceInfo>();
-        }
-        Ogre::FileInfoListPtr infos = Ogre::ResourceGroupManager::getSingleton().findResourceFileInfo(group, name);
-        for (Ogre::FileInfoList::const_iterator it = infos->begin(); it != infos->end(); ++it)
-        {
-            if (it->filename == name)
-            {
-                shared_ptr<ResourceInfo> ptr(new ResourceInfo());
-                ptr->filename = name;
-                ptr->path = it->path;
-                ptr->basename = it->basename;
-                ptr->group = group;
-                ptr->size = it->uncompressedSize;
-                if (dynamic_cast<Ogre::FileSystemArchive*>(it->archive) != NULL)
-                {
-                    boost::filesystem::path base(it->archive->getName());
-                    base /= it->filename;
-                    ptr->fileSystemPath = base.string();
-                }
-                return ptr;
-            }
-        }
-        return shared_ptr<ResourceInfo>();
-    }
-
-    StringVectorPtr Resource::findResourceNames(const std::string& pattern)
-    {
-        StringVectorPtr resourceNames(new Ogre::StringVector());
-        const Ogre::StringVector& groups = Ogre::ResourceGroupManager::getSingleton().getResourceGroups();
-        for (Ogre::StringVector::const_iterator it = groups.begin(); it != groups.end(); ++it)
-        {
-            StringVectorPtr temp = Ogre::ResourceGroupManager::getSingleton().findResourceNames(*it, pattern);
-            resourceNames->insert(resourceNames->end(), temp->begin(), temp->end());
-        }
-        return resourceNames;
-    }
-}
Index: sandbox_qt/src/libraries/core/Resource.h
===================================================================
--- sandbox_qt/src/libraries/core/Resource.h	(revision 7418)
+++ 	(revision )
@@ -1,148 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @defgroup Resources Resources
-    @ingroup Management
-*/
-
-/**
-    @file
-    @ingroup Management Resources
-*/
-
-#ifndef _Core_Resource_H__
-#define _Core_Resource_H__
-
-#include "CorePrereqs.h"
-
-#include <boost/shared_ptr.hpp>
-#include <OgreDataStream.h>
-#include <OgreStringVector.h>
-
-namespace orxonox
-{
-    // Import the Ogre::DataStreamList
-    using Ogre::DataStreamList;
-    using Ogre::DataStreamListPtr;
-    using Ogre::StringVector;
-    using Ogre::StringVectorPtr;
-
-    //! Stores basic information about a Resource from Ogre
-    struct ResourceInfo
-    {
-        //! The file's fully qualified name
-        std::string filename;
-        //! Path name; separated by '/' and ending with '/'
-        std::string path;
-        //! Base filename
-        std::string basename;
-        //! Resource group the file is in
-        std::string group;
-        //! Uncompressed size
-        size_t size;
-        //! Absolute file path ("" for files not on filesystem)
-        std::string fileSystemPath;
-    };
-
-    /** Provides simple functions to easily access the Ogre::ResourceGroupManager.
-        The wrapper functions also avoid having to deal with resource groups.
-    */
-    class _CoreExport Resource
-    {
-        // Docs by Ogre::ResourceGroupManager.h
-    public:
-        /**
-        @brief
-            Open a single resource by name and return a DataStream
-            pointing at the source of the data.
-        @param name
-            The name of the resource to locate.
-            Even if resource locations are added recursively, you
-            must provide a fully qualified name to this method.
-        @return
-            Shared pointer to data stream containing the data. Will be
-            destroyed automatically when no longer referenced.
-        */
-        static DataStreamPtr open(const std::string& name);
-
-        //! Similar to open(string, string, bool), but with a fileInfo struct
-        static DataStreamPtr open(shared_ptr<ResourceInfo> fileInfo)
-        {
-            return open(fileInfo->filename);
-        }
-
-        /**
-        @brief
-            Open all resources matching a given pattern (which can contain
-            the character '*' as a wildcard), and return a collection of
-            DataStream objects on them.
-        @param pattern
-            The pattern to look for. If resource locations have been
-            added recursively, subdirectories will be searched too so this
-            does not need to be fully qualified.
-        @return
-            Shared pointer to a data stream list , will be
-            destroyed automatically when no longer referenced
-        */
-        static DataStreamListPtr openMulti(const std::string& pattern);
-
-        /**
-            Find out if the named file exists.
-        @param name
-            Fully qualified name of the file to test for
-        */
-        static bool exists(const std::string& name);
-
-        /**
-            Get struct with information about path and size.
-        @param name
-            Fully qualified name of the file to test for
-        */
-        static shared_ptr<ResourceInfo> getInfo(const std::string& name);
-
-        /**
-            Retrieves a list with all resources matching a certain pattern.
-        @param pattern
-            The pattern to look for. If resource locations have been
-            added recursively, subdirectories will be searched too so this
-            does not need to be fully qualified.
-        */
-        static StringVectorPtr findResourceNames(const std::string& pattern);
-
-        //! Name of the default resource group (usually "General")
-        static std::string DEFAULT_GROUP;
-
-    private:
-        Resource();
-        ~Resource();
-        Resource(const Resource& instance);
-    };
-}
-
-#endif /* _Core_Resource_H__ */
Index: sandbox_qt/src/libraries/core/SmartPtr.h
===================================================================
--- sandbox_qt/src/libraries/core/SmartPtr.h	(revision 7418)
+++ 	(revision )
@@ -1,317 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-// Inspired by boost::intrusive_ptr by Peter Dimov
-
-/**
-    @defgroup SmartPtr SmartPtr<T> and WeakPtr<T>
-    @ingroup Object
-*/
-
-/**
-    @file
-    @ingroup Object SmartPtr
-    @brief Definition of SmartPtr<T>, wraps a pointer to an object and keeps it alive.
-
-    @anchor SmartPtrExample
-
-    orxonox::SmartPtr is an implementation of a smart pointer - it wraps a pointer to an
-    object  and keeps this object alive until no SmartPtr points to this object anymore.
-    In contrast to orxonox::SharedPtr, SmartPtr works only with classes that are derived
-    from orxonox::OrxonoxClass, because it's an intrusive implementation, meaning the
-    reference counter is stored in the object itself.
-
-    It's possible to use normal pointers and smart pointers to an object simultaneously.
-    You don't have to use SmartPtr all the time, you can create a SmartPtr for an object
-    at any time and also convert it back to a normal pointer if you like. This is possible
-    because the reference counter is stored in the object itself and not in SmartPtr (in
-    contrast to SharedPtr).
-
-    @b Important: If you want to delete an object, you must not use @c delete @c object but
-    rather @c object->destroy(). This function will check if there are smart pointers
-    pointing to the object. If yes, the object will be kept alive until all smart pointes
-    are destroyed. If no, the object is deleted instantly.
-
-    If all smart pointers that point to an object are destroyed, but you never called
-    @c object->destroy() before, the object will not be deleted! All a SmartPtr will do
-    is to really just keep an object alive, but it will not delete it automatically
-    unless you tried to destroy it before.
-
-    Example:
-    @code
-    class MyClass                                           // class declaration
-    {
-        public:
-            void setObject(OtherClass* object)              // passes a normal pointer which will be stored in a SmartPtr
-                { this->object_ = object; }
-
-            OtherClass* getObject() const                   // converts the SmartPtr to a normal pointer and returns it
-                { return this->object_; }
-
-        private:
-            SmartPtr<OtherClass> object_;                   // a pointer to an instance of OtherClass is stored in a SmartPtr
-    };
-    @endcode
-    In this example we assume that OtherClass is a child of OrxonoxClass. We don't care
-    about the inheritance of MyClass though.
-
-    Now we create an instance of MyClass and assign a pointer to an instance of OtherClass:
-    @code
-    MyClass* myclass = new MyClass();                       // create an instance of MyClass
-    OtherClass* object = new OtherClass();                  // create an instance of OtherClass
-    myclass->setObject(object);                             // the object is now stored in a SmartPtr inside myclass
-
-    object->destroy();                                      // we try to destroy object, but there's still a SmartPtr pointing at it.
-
-    # object still exists at this point (because a SmartPtr points at it)
-
-    delete myclass;                                         // now we delete myclass, which also destroys the SmartPtr
-
-    # object doesn't exist anymore (because the SmartPtr is now destroyed)
-    @endcode
-
-    Now we look at the same example, but we first delete myclass, then destroy object:
-    @code
-    MyClass* myclass = new MyClass();                       // create an instance of MyClass
-    OtherClass* object = new OtherClass();                  // create an instance of OtherClass
-    myclass->setObject(object);                             // the object is now stored in a SmartPtr inside myclass
-
-    delete myclass;                                         // we delete myclass, which also destroys the SmartPtr
-
-    # object still exists at this point (because destroy() was not called yet)
-
-    object->destroy();                                      // now we try to destroy object, which works instantly
-
-    # object doesn't exist anymore (because we just destroyed it)
-    @endcode
-
-    Note that in any case @c object->destroy() has to be called to delete the object.
-    However if a SmartPtr points at it, the destruction is delayed until all SmartPtr
-    are destroyed.
-*/
-
-#ifndef _SmartPtr_H__
-#define _SmartPtr_H__
-
-#include "CorePrereqs.h"
-
-#include <cassert>
-
-#include "Identifier.h"
-#include "OrxonoxClass.h"
-#include "WeakPtr.h"
-
-namespace orxonox
-{
-    /**
-        @brief A smart pointer which wraps a pointer to an object and keeps this object alive as long as the smart pointer exists.
-
-        @see See @ref SmartPtrExample "this description" for more information and an example.
-    */
-    template <class T>
-    class SmartPtr
-    {
-        public:
-            /// Constructor: Initializes the smart pointer with a null pointer.
-            inline SmartPtr() : pointer_(0), base_(0)
-            {
-            }
-
-            /// Constructor: Used to explicitly initialize the smart pointer with a null pointer
-            inline SmartPtr(int) : pointer_(0), base_(0)
-            {
-            }
-
-            /// Constructor: Initializes the smart pointer with a pointer to an object. @param pointer The pointer @param bAddRef If true, the reference counter is increased. Don't set this to false unless you know exactly what you're doing! (for example to avoid circular references if the @c this pointer of the possessing object is stored)
-            inline SmartPtr(T* pointer, bool bAddRef = true) : pointer_(pointer), base_(pointer)
-            {
-                if (this->base_ && bAddRef)
-                    this->base_->incrementReferenceCount();
-            }
-
-            /// Copy-constructor
-            inline SmartPtr(const SmartPtr& other) : pointer_(other.pointer_), base_(other.base_)
-            {
-                if (this->base_)
-                    this->base_->incrementReferenceCount();
-            }
-
-            /// Copy-constructor for smart pointers to objects of another class.
-            template <class O>
-            inline SmartPtr(const SmartPtr<O>& other) : pointer_(other.get()), base_(other.base_)
-            {
-                if (this->base_)
-                    this->base_->incrementReferenceCount();
-            }
-
-            /// Constructor: Initializes the smart pointer with the pointer that is stored in a WeakPtr.
-            template <class O>
-            inline SmartPtr(const WeakPtr<O>& other) : pointer_(other.get()), base_(other.getBase())
-            {
-                if (this->base_)
-                    this->base_->incrementReferenceCount();
-            }
-
-            /// Destructor: Decrements the reference counter.
-            inline ~SmartPtr()
-            {
-                if (this->base_)
-                    this->base_->decrementReferenceCount();
-            }
-
-            /// Used to assign a null pointer.
-            inline SmartPtr& operator=(int)
-            {
-                SmartPtr(0).swap(*this);
-                return *this;
-            }
-
-            /// Assigns a new pointer.
-            inline SmartPtr& operator=(T* pointer)
-            {
-                SmartPtr(pointer).swap(*this);
-                return *this;
-            }
-
-            /// Assigns the wrapped pointer of another SmartPtr.
-            inline SmartPtr& operator=(const SmartPtr& other)
-            {
-                SmartPtr(other).swap(*this);
-                return *this;
-            }
-
-            /// Assigns the wrapped pointer of a SmartPtr of another class
-            template <class O>
-            inline SmartPtr& operator=(const SmartPtr<O>& other)
-            {
-                SmartPtr(other).swap(*this);
-                return *this;
-            }
-
-            /// Assigns the wrapped pointer of a WeakPtr.
-            template <class O>
-            inline SmartPtr& operator=(const WeakPtr<O>& other)
-            {
-                SmartPtr(other).swap(*this);
-                return *this;
-            }
-
-            /// Returns the wrapped pointer as @c T*
-            inline T* get() const
-            {
-                return this->pointer_;
-            }
-
-            /// Returns the wrapped pointer as @c OrxonoxClass*
-            inline OrxonoxClass* getBase() const
-            {
-                return this->base_;
-            }
-
-            /// Implicitly converts the SmartPtr to a pointer of type @c T*
-            inline operator T*() const
-            {
-                return this->pointer_;
-            }
-
-            /// Overloaded operator, returns a pointer to the stored object.
-            inline T* operator->() const
-            {
-                assert(this->pointer_ != 0);
-                return this->pointer_;
-            }
-
-            /// Overloaded operator, returns a reference to the stored object.
-            inline T& operator*() const
-            {
-                assert(this->pointer_ != 0);
-                return *this->pointer_;
-            }
-
-            /// Returns true if the wrapped pointer is NULL.
-            inline bool operator!() const
-            {
-                return (this->pointer_ == 0);
-            }
-
-            /// Swaps the contents of two smart pointers.
-            inline void swap(SmartPtr& other)
-            {
-                {
-                    T* temp = this->pointer_;
-                    this->pointer_ = other.pointer_;
-                    other.pointer_ = temp;
-                }
-                {
-                    OrxonoxClass* temp = this->base_;
-                    this->base_ = other.base_;
-                    other.base_ = temp;
-                }
-            }
-
-            /// Resets the smart pointer (equivalent to assigning a NULL pointer).
-            inline void reset()
-            {
-                SmartPtr().swap(*this);
-            }
-
-        private:
-            T* pointer_;            ///< The wrapped pointer to an object of type @a T
-            OrxonoxClass* base_;    ///< The wrapped pointer, casted up to OrxonoxClass (this is needed because with just a T* pointer, SmartPtr couln't be used with forward declarations)
-    };
-
-    /// Swaps the contents of two smart pointers.
-    template <class T>
-    void swap(SmartPtr<T>& a, SmartPtr<T>& b)
-    {
-        a.swap(b);
-    }
-
-    /// Uses a static_cast to cast a pointer of type U* to a pointer of type T* and returns it in a new SmartPtr<T>.
-    template <class T, class U>
-    SmartPtr<T> static_pointer_cast(const SmartPtr<U>& p)
-    {
-        return static_cast<T*>(p.get());
-    }
-
-    /// Uses a const_cast to cast a pointer of type U* to a pointer of type T* and returns it in a new SmartPtr<T>.
-    template <class T, class U>
-    SmartPtr<T> const_pointer_cast(const SmartPtr<U>& p)
-    {
-        return const_cast<T*>(p.get());
-    }
-
-    /// Uses a dynamic_cast to cast a pointer of type U* to a pointer of type T* and returns it in a new SmartPtr<T>.
-    template <class T, class U>
-    SmartPtr<T> dynamic_pointer_cast(const SmartPtr<U>& p)
-    {
-        return orxonox_cast<T*>(p.get());
-    }
-}
-
-#endif /* _SmartPtr_H__ */
Index: sandbox_qt/src/libraries/core/SubclassIdentifier.h
===================================================================
--- sandbox_qt/src/libraries/core/SubclassIdentifier.h	(revision 7418)
+++ 	(revision )
@@ -1,204 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup Class Identifier
-    @brief Definition of SubclassIdentifier.
-
-    @anchor SubclassIdentifierExample
-
-    SubclassIdentifier is a separated class, acting like an Identifier, but has a given class.
-    You can only assign Identifiers of exactly the given class or of a derivative to a SubclassIdentifier.
-
-    Example:
-
-    You can assign an Identifier either through the constructor or by using the assignment @c operator=:
-    @code
-    SubclassIdentifier<BaseClass> identifier = Class(SubClass);
-    @endcode
-
-    The @c operator-> is overloaded an returns the assigned Identifier. That way you can just call
-    functions of the assigned Identifier by using @c ->function():
-    @code
-    SubclassIdentifier<BaseClass> identifier = Class(SubClass);
-    identifier->getName();      // returns "SubClass"
-    @endcode
-
-    There are two possibilities to create an object out of a SubclassIdentifier: Either you just use
-    the @c fabricate() function of the assigned Identifier through the overloaded @c operator->, which
-    returns a @c BaseObject* pointer, or you use the function of SubclassIdentifier, this time by using
-    @c operator., which returns a @c BaseClass* pointer (@a BaseClass is the baseclass specified by the
-    template argument):
-    @code
-    identifier->fabricate();    // calls Identifier::fabricate(), creates a SubClass, returns a BaseObject* pointer
-
-    identifier.fabricate();     // calls SubclassIdentifier::fabricate(), creates a SubClass, returns a BaseClass* pointer
-    @endcode
-*/
-
-#ifndef _SubclassIdentifier_H__
-#define _SubclassIdentifier_H__
-
-#include "CorePrereqs.h"
-
-#include <cstdlib>
-#include "util/Debug.h"
-#include "Identifier.h"
-
-namespace orxonox
-{
-    // ###############################
-    // ###   SubclassIdentifier    ###
-    // ###############################
-    /**
-        @brief The SubclassIdentifier acts almost like an Identifier, but has some prerequisites.
-
-        You can only assign an Identifier that belongs to a class T (or derived) to a SubclassIdentifier<T>.
-        If you assign something else, the program prints an error.
-
-        Because we know the base-type, a @c dynamic_cast is done, which makes it easier to create a new object.
-
-        @see See @ref SubclassIdentifierExample "SubclassIdentifier.h" for some examples.
-    */
-    template <class T>
-    class SubclassIdentifier
-    {
-        public:
-            /// Constructor: Automaticaly assigns the Identifier of the given class.
-            SubclassIdentifier()
-            {
-                this->identifier_ = ClassIdentifier<T>::getIdentifier();
-            }
-
-            /// Constructor: Assigns the given Identifier.
-            SubclassIdentifier(Identifier* identifier)
-            {
-                this->operator=(identifier);
-            }
-
-            /// Copyconstructor: Assigns the identifier of another SubclassIdentifier.
-            template <class O>
-            SubclassIdentifier(const SubclassIdentifier<O>& identifier)
-            {
-                this->operator=(identifier.getIdentifier());
-            }
-
-            /**
-                @brief Overloading of the = operator: assigns the identifier and checks its type.
-                @param identifier The Identifier to assign
-                @return The SubclassIdentifier itself
-            */
-            SubclassIdentifier<T>& operator=(Identifier* identifier)
-            {
-                if (!identifier || !identifier->isA(ClassIdentifier<T>::getIdentifier()))
-                {
-                    COUT(1) << "An error occurred in SubclassIdentifier (Identifier.h):" << std::endl;
-                    if (identifier)
-                    {
-                        COUT(1) << "Error: Class " << identifier->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << '!' << std::endl;
-                        COUT(1) << "Error: SubclassIdentifier<" << ClassIdentifier<T>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden." << std::endl;
-                    }
-                    else
-                    {
-                        COUT(1) << "Error: Can't assign NULL identifier" << std::endl;
-                    }
-                }
-                else
-                {
-                    this->identifier_ = identifier;
-                }
-                return *this;
-            }
-
-            /// Overloading of the = operator: assigns the identifier of another SubclassIdentifier.
-            template <class O>
-            SubclassIdentifier<T>& operator=(const SubclassIdentifier<O>& identifier)
-            {
-                return this->operator=(identifier.getIdentifier());
-            }
-
-            /// Overloading of the * operator: returns the assigned identifier.
-            inline Identifier* operator*() const
-            {
-                return this->identifier_;
-            }
-
-            /// Overloading of the -> operator: returns the assigned identifier.
-            inline Identifier* operator->() const
-            {
-                return this->identifier_;
-            }
-
-            /// Returns the assigned identifier. This allows you to assign a SubclassIdentifier to a normal Identifier*.
-            inline operator Identifier*() const
-            {
-                return this->identifier_;
-            }
-
-            /// Creates a new object of the type of the assigned Identifier and dynamic_casts it to the minimal type given by T.
-            T* fabricate(BaseObject* creator) const
-            {
-                BaseObject* newObject = this->identifier_->fabricate(creator);
-
-                // Check if the creation was successful
-                if (newObject)
-                {
-                    return orxonox_cast<T*>(newObject);
-                }
-                else
-                {
-                    // Something went terribly wrong
-                    if (this->identifier_)
-                    {
-                        COUT(1) << "An error occurred in SubclassIdentifier (Identifier.h):" << std::endl;
-                        COUT(1) << "Error: Class " << this->identifier_->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << '!' << std::endl;
-                        COUT(1) << "Error: Couldn't fabricate a new Object." << std::endl;
-                    }
-                    else
-                    {
-                        COUT(1) << "An error occurred in SubclassIdentifier (Identifier.h):" << std::endl;
-                        COUT(1) << "Error: Couldn't fabricate a new Object - Identifier is undefined." << std::endl;
-                    }
-
-                    COUT(1) << "Aborting..." << std::endl;
-                    abort();
-                    return 0;
-                }
-            }
-
-            /// Returns the assigned identifier.
-            inline Identifier* getIdentifier() const
-                { return this->identifier_; }
-
-        private:
-            Identifier* identifier_;            //!< The assigned identifier
-    };
-}
-
-#endif /* _SubclassIdentifier_H__ */
Index: sandbox_qt/src/libraries/core/Super.h
===================================================================
--- sandbox_qt/src/libraries/core/Super.h	(revision 7418)
+++ 	(revision )
@@ -1,616 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @defgroup Super Super
-    @ingroup Class
-*/
-
-/**
-    @file
-    @ingroup Class Super
-    @brief Definition of all super-function related macros, used to call functions of the base class.
-
-    This file defines all macros needed to add a new "super-function". If you add
-    a super-function, you can call <tt>SUPER(myclass, functionname, arguments)</tt>
-    inside your code and the function of the parent-class gets called. This is comparable
-    to <tt>super.functionname(arguments)</tt> in Java or other languages.
-
-    This works only with virtual functions that return nothing (@c void) and belong to
-    classes that have an @ref orxonox::Identifier "Identifier". Arguments however are
-    supported, there's no limitation for their number and type, except that the type has
-    to be known in Super.h.
-
-    To add a new super-function, you have to process 4 steps:
-
-    -# Add a new @c SUPER macro <br />
-       This allows you to call the super-function in your code. <br />
-       Location: This file (Super.h), marked with "--> HERE <--" comments (1/3)
-    -# Call the @c SUPER_FUNCTION_GLOBAL_DECLARATION_PART1/2 macros. <br />
-       This defines some global classes and templates, needed to create and call the super-functions. <br />
-       Location: This file (Super.h), marked with "--> HERE <--" comments (2/3)
-    -# Call the @c SUPER_INTRUSIVE_DECLARATION macro. <br />
-       This will be included into the declaration of @c ClassIdentifier<T>. <br />
-       Location: This file (Super.h), marked with "--> HERE <--" comments (3/3)
-    -# Call the @c SUPER_FUNCTION macro. <br />
-       This defines a partially specialized template that will decide if a class is "super" to another class.
-       If the check returns true, a @c SuperFunctionCaller gets created, which will be used by the @c SUPER macro.
-       You have to add this into the header-file of the baseclass of the super-function (the class that first
-       implements the function), below the class declaration. You can't call it directly in this file, because
-       otherwise you had to include the headerfile right here, which would cause some ugly back-dependencies,
-       include loops and slower compilation. <br />
-       Dont forget to include Super.h in the header-file. <br />
-       Location: The header-file of the baseclass (Baseclass.h), below the class declaration
-*/
-
-#ifndef _Super_H__
-#define _Super_H__
-
-#include "CorePrereqs.h"
-
-#include "util/Debug.h"
-#include "Event.h"
-
-///////////////////////
-// Macro definitions //
-///////////////////////
-
-//// Common macros ////
-
-    /**
-        @brief Declares a new super-function by creating a specialized template. Add this below the class declaration of the baseclass.
-        @param functionnumber Each super-function needs a unique number, starting with zero, increasing by one
-        @param baseclass The baseclass of the super-function (~the root)
-        @param functionname The name of the super-function
-        @param purevirtualbase "true" if the function is pure virtual in the baseclass, "false" if the function is implemented (without "")
-    */
-    #define SUPER_FUNCTION(functionnumber, baseclass, functionname, purevirtualbase) \
-        template <class T, int templatehack2> \
-        struct SuperFunctionCondition<functionnumber, T, 0, templatehack2> \
-        { \
-            static void check() \
-            { \
-                SuperFunctionCondition<functionnumber, T, 0, templatehack2>::apply(static_cast<T*>(0)); \
-                SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::check(); \
-            } \
-            \
-            static void apply(void* temp) {} \
-            \
-            static void apply(baseclass* temp) \
-            { \
-                ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier(); \
-                for (std::set<const Identifier*>::iterator it = identifier->getDirectChildrenIntern().begin(); it != identifier->getDirectChildrenIntern().end(); ++it) \
-                { \
-                    if (((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_##functionname##_isFallback_ && ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_) \
-                    { \
-                        delete ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_; \
-                        ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = 0; \
-                        ((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_##functionname##_isFallback_ = false; \
-                    } \
-                    \
-                    if (!((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_) \
-                    { \
-                        COUT(5) << "Added SuperFunctionCaller for " << #functionname << ": " << ClassIdentifier<T>::getIdentifier()->getName() << " <- " << ((ClassIdentifier<T>*)(*it))->getName() << std::endl; \
-                        ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_##functionname <T>; \
-                    } \
-                } \
-            } \
-        }; \
-        \
-        SUPER_FUNCTION_PUREVIRTUAL_WORKAROUND##purevirtualbase(functionnumber, baseclass)
-
-    #define SUPER_FUNCTION_PUREVIRTUAL_WORKAROUND0(functionnumber, baseclass) SUPER_FUNCTION_PUREVIRTUAL_WORKAROUNDfalse(functionnumber, baseclass)
-    #define SUPER_FUNCTION_PUREVIRTUAL_WORKAROUND1(functionnumber, baseclass) SUPER_FUNCTION_PUREVIRTUAL_WORKAROUNDtrue(functionnumber, baseclass)
-    #define SUPER_FUNCTION_PUREVIRTUAL_WORKAROUNDfalse(functionnumber, baseclass)
-    #define SUPER_FUNCTION_PUREVIRTUAL_WORKAROUNDtrue(functionnumber, baseclass) \
-        template <int templatehack2> \
-        struct SuperFunctionCondition<functionnumber, baseclass, 0, templatehack2> \
-        { \
-            static void check() \
-            { \
-                SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::check(); \
-            } \
-        };
-
-
-    /*
-    //// Comments about the macro ////
-
-        // Partially specialized template (templatehack is now specialized too).
-        //
-        // This ensures the compiler takes THIS template if the header-file of the super-function
-        // is included. In any other case, the compiler just uses the fallback template which is
-        // defined in this file.
-        template <class T, templatehack2>
-        struct SuperFunctionCondition<functionnumber, T, 0, templatehack2>
-        {
-            static void check()
-            {
-                // This call to the apply-function is the whole check. By calling the function with
-                // a T* pointer, the right function get's called.
-                SuperFunctionCondition<functionnumber, T, 0, templatehack2>::apply(static_cast<T*>(0));
-
-                // Go go the check for of next super-function (functionnumber + 1)
-                SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::check();
-            }
-
-            // This function gets called if T is not a child of the baseclass.
-            // The function does nothing.
-            static void apply(void* temp) {}
-
-            // This function gets called if T is a child of the baseclass and can therefore be converted.
-            // The function adds a SuperFunctionCaller to the Identifier of all subclasses of T.
-            static void apply(baseclass* temp)
-            {
-                ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier();
-
-                // Iterate through all children
-                for (std::set<const Identifier*>::iterator it = identifier->getDirectChildrenIntern().begin(); it != identifier->getDirectChildrenIntern().end(); ++it)
-                {
-                    // Check if the caller is a fallback-caller
-                    if (((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_##functionname##_isFallback_ && ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_)
-                    {
-                        // Delete the fallback caller an prepare to get a real caller
-                        delete ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_;
-                        ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = 0;
-                        ((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_##functionname##_isFallback_ = false;
-                    }
-
-                    // Check if there's not already a caller
-                    if (!((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_)
-                    {
-                        // Add the SuperFunctionCaller
-                        COUT(5) << "adding functionpointer to " << ((ClassIdentifier<T>*)(*it))->getName() << std::endl;
-                        ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_##functionname <T>;
-                    }
-                }
-            }
-        };
-        SUPER_FUNCTION_PUREVIRTUAL_WORKAROUND##purevirtualbase
-
-
-        // The following piece of code is only added if purevirtualbase = true
-
-        // Explicit specialization of the Condition template for the baseclass to avoid
-        // errors if the function is pure virtual in the baseclass.
-        template <int templatehack2> \
-        struct SuperFunctionCondition<functionnumber, baseclass, 0, templatehack2> \
-        { \
-            // The check function acts like the fallback - it advances to the check for the next super-function (functionnumber + 1)
-            static void check() \
-            { \
-                SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::check(); \
-            } \
-        };
-    */
-
-    /// SUPER-macro: Calls Parent::functionname(...) where Parent is the direct parent of @a classname
-    #ifdef ORXONOX_COMPILER_MSVC
-        #define SUPER(classname, functionname, ...) \
-            __super::functionname(__VA_ARGS__)
-    #else
-        #define SUPER(classname, functionname, ...) \
-            SUPER_##functionname(classname, functionname, __VA_ARGS__)
-    #endif
-
-    // helper macro: for functions without arguments
-    #define SUPER_NOARGS(classname, functionname) \
-        (*ClassIdentifier<classname>::getIdentifier()->superFunctionCaller_##functionname##_)(this)
-
-    // helper macro: for functions with arguments
-    #define SUPER_ARGS(classname, functionname, ...) \
-        (*ClassIdentifier<classname>::getIdentifier()->superFunctionCaller_##functionname##_)(this, __VA_ARGS__)
-
-
-//// Function-specific macros ////
-
-    /*
-        Add a macro for each super-function
-
-        Example (no arguments):
-        #define SUPER_myfunction(classname, functionname, ...) \
-            SUPER_NOARGS(classname, functionname)
-
-        Example (with arguments):
-        #define SUPER_myfunction(classname, functionname, ...) \
-            SUPER_ARGS(classname, functionname, __VA_ARGS__)
-    */
-
-    // (1/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
-    #define SUPER_XMLPort(classname, functionname, ...) \
-        SUPER_ARGS(classname, functionname, __VA_ARGS__)
-
-    #define SUPER_tick(classname, functionname, ...) \
-        SUPER_ARGS(classname, functionname, __VA_ARGS__)
-
-    #define SUPER_changedActivity(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    #define SUPER_changedVisibility(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    #define SUPER_XMLEventPort(classname, functionname, ...) \
-        SUPER_ARGS(classname, functionname, __VA_ARGS__)
-
-    #define SUPER_changedScale(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    #define SUPER_changedOwner(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    #define SUPER_changedOverlayGroup(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    #define SUPER_changedName(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    #define SUPER_changedGametype(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    #define SUPER_changedUsed(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    #define SUPER_clone(classname, functionname, ...) \
-        SUPER_ARGS(classname, functionname, __VA_ARGS__)
-
-    #define SUPER_changedCarrier(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    #define SUPER_changedPickedUp(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    // (1/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
-
-
-namespace orxonox
-{
-    /////////////////////////////////////////////////////////////////////////////////////////////////////
-    // This code gets included by Identifier.h and every other header file that needs a super-function //
-    /////////////////////////////////////////////////////////////////////////////////////////////////////
-
-    //// Common code ////
-
-        // Base templates
-        /**
-            @brief Creates the SuperFunctionCaller if T is a child of the super-functions baseclass.
-        */
-        template <int functionnumber, class T, int templatehack1, int templatehack2>
-        struct SuperFunctionCondition
-        {
-            static void check() {}
-        };
-
-        /**
-            @brief Initializes the SuperFunctionCaller-pointer with zero.
-        */
-        template <int functionnumber, class T>
-        struct SuperFunctionInitialization
-        {
-            static void initialize(ClassIdentifier<T>* identifier) {}
-        };
-
-        /**
-            @brief Deletes the SuperFunctionCaller.
-        */
-        template <int functionnumber, class T>
-        struct SuperFunctionDestruction
-        {
-            static void destroy(ClassIdentifier<T>* identifier) {}
-        };
-
-
-    //// Function-specific code ////
-
-        /**
-            @brief Creates the needed objects and templates to call a super-function.
-            @param functionnumber Each super-function needs a unique number, starting with zero, increasing by one
-            @param functionname The name of the super-function
-            @param hasarguments "false" if the function doesn't take any arguments, "true" if it does (without "")
-            @param ... Variadic: If the function takes arguments, add them here with type and name. Example: int myvalue, float myothervalue
-        */
-        #define SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(functionnumber, functionname, hasarguments, ...) \
-            template <class T, int templatehack1, int templatehack2> \
-            struct SuperFunctionCondition<functionnumber, T, templatehack1, templatehack2> \
-            { \
-                static void check() \
-                { \
-                    SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::check(); \
-                } \
-            }; \
-            \
-            class _CoreExport SuperFunctionCaller_##functionname \
-            { \
-                public: \
-                    virtual void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) = 0; \
-                    virtual ~SuperFunctionCaller_##functionname () {} \
-            }; \
-            \
-            template <class T> \
-            class SuperFunctionClassCaller_purevirtualfallback_##functionname : public SuperFunctionCaller_##functionname \
-            { \
-                public: \
-                    inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) \
-                    { \
-                    } \
-            }; \
-            \
-            template <class T> \
-            struct SuperFunctionInitialization<functionnumber, T> \
-            { \
-                static void initialize(ClassIdentifier<T>* identifier) \
-                { \
-                    identifier->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_purevirtualfallback_##functionname <T>; \
-                    identifier->bSuperFunctionCaller_##functionname##_isFallback_ = true; \
-                    SuperFunctionInitialization<functionnumber + 1, T>::initialize(identifier); \
-                } \
-            }; \
-            \
-            template <class T> \
-            struct SuperFunctionDestruction<functionnumber, T> \
-            { \
-                static void destroy(ClassIdentifier<T>* identifier) \
-                { \
-                    if (identifier->superFunctionCaller_##functionname##_) \
-                        delete identifier->superFunctionCaller_##functionname##_; \
-                    SuperFunctionDestruction<functionnumber + 1, T>::destroy(identifier); \
-                } \
-            }; \
-            \
-            template <class T> \
-            class SuperFunctionClassCaller_##functionname : public SuperFunctionCaller_##functionname \
-            { \
-                public: \
-                    inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) \
-                    { \
-                        (dynamic_cast<T*>(object))->T:: functionname
-
-        /*
-            JUST ADD THE FUNCTION ARGUMENTS BETWEEN BOTH MACROS, ENCLOSED BY BRACKETS
-            EXAMPLE:
-
-              SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(0, myfunction, true, int myvalue, float myothervalue) <-- !!! DONT ADD A SEMICOLON HERE !!!
-                (myvalue, myothervalue)
-              SUPER_FUNCTION_GLOBAL_DECLARATION_PART2
-        */
-
-        #define SUPER_FUNCTION_GLOBAL_DECLARATION_PART2 \
-                                                        ; \
-                    } \
-            };
-
-        #define SUPER_CALL_ARGUMENTSfalse(...) OrxonoxClass* object
-        #define SUPER_CALL_ARGUMENTS0(...)     OrxonoxClass* object
-        #define SUPER_CALL_ARGUMENTStrue(...) OrxonoxClass* object, __VA_ARGS__
-        #define SUPER_CALL_ARGUMENTS1(...)    OrxonoxClass* object, __VA_ARGS__
-
-
-    /*
-    //// COMMENTS ABOUT THE MACRO ////
-
-        // Partially specialized template (templatehack not yet specialized, this
-        // will be done by the real condition in the header-file of the super-function)
-        // Only used as fallback
-        template <class T, int templatehack1, int templatehack2>
-        struct SuperFunctionCondition<functionnumber, T, templatehack1, templatehack2>
-        {
-            // If this function gets called, the header-file of the super function is not
-            // included, so this fallback template (templatehack not specialized) is used
-            static void check()
-            {
-                // Calls the condition-check of the next super-function (functionnumber + 1)
-                SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::check();
-            }
-        };
-
-        // Baseclass of the super-function caller. The real call will be done by a
-        // templatized subclass through the virtual () operator.
-        class _CoreExport SuperFunctionCaller_##functionname
-        {
-            public:
-                virtual void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) = 0;
-                virtual ~SuperFunctionCaller_##functionname () {}
-        };
-
-        // Fallback if the base is pure virtual
-        template <class T>
-        class SuperFunctionClassCaller_purevirtualfallback_##functionname : public SuperFunctionCaller_##functionname
-        {
-            public:
-                // Fallback does nothing
-                inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) )
-                {
-                }
-        };
-
-        // Initializes the SuperFunctionCaller-pointer with a fallback caller in case the base function is pure virtual
-        template <class T>
-        struct SuperFunctionInitialization<functionnumber, T>
-        {
-            static void initialize(ClassIdentifier<T>* identifier)
-            {
-                identifier->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_purevirtualfallback_##functionname <T>;
-                identifier->bSuperFunctionCaller_##functionname##_isFallback_ = true;
-
-                // Calls the initialization of the next super-function (functionnumber + 1)
-                SuperFunctionInitialization<functionnumber + 1, T>::initialize(identifier);
-            }
-        };
-
-        // Deletes the SuperFunctionCaller.
-        template <class T>
-        struct SuperFunctionDestruction<functionnumber, T>
-        {
-            static void destroy(ClassIdentifier<T>* identifier)
-            {
-                if (identifier->superFunctionCaller_##functionname##_)
-                    delete identifier->superFunctionCaller_##functionname##_;
-
-                // Calls the destruction of the next super-function (functionnumber + 1)
-                SuperFunctionDestruction<functionnumber + 1, T>::destroy(identifier);
-            }
-        };
-
-        // The real super-function caller: Calls T::functionname()
-        // T should be the parent, but this will be done by the spezialized condition template
-        template <class T>
-        class SuperFunctionClassCaller_##functionname : public SuperFunctionCaller_##functionname
-        {
-            public:
-                // @brief Calls the function.
-                // @param object The object to call the function on
-                // @param ... The arguments of the function
-                inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) )
-                {
-                    (dynamic_cast<T*>(object))->T:: functionname ( Call the function with it's arguments );
-                }
-        }
-    */
-
-
-    //// Execute the code for each super-function ////
-
-        // (2/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(0, XMLPort, true, Element& xmlelement, XMLPort::Mode mode)
-            (xmlelement, mode)
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(1, tick, true, float dt)
-            (dt)
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(2, changedActivity, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(3, changedVisibility, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(4, XMLEventPort, true, Element& xmlelement, XMLPort::Mode mode)
-            (xmlelement, mode)
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(5, changedScale, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(6, changedOwner, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(7, changedOverlayGroup, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(8, changedName, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(9, changedGametype, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(10, changedUsed, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(11, clone, true, OrxonoxClass* item)
-            (item)
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(12, changedCarrier, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(13, changedPickedUp, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        // (2/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
-
-}
-
-#else /* _Super_H__ */
-  #ifdef SUPER_INTRUSIVE_DECLARATION_INCLUDE
-
-//////////////////////////////////////////////////////////////////////////
-// This code gets included within the declaration of ClassIdentifier<T> //
-//////////////////////////////////////////////////////////////////////////
-
-//// Common code ////
-
-    private:
-
-        template <int functionnumber, class TT, int templatehack1, int templatehack2>
-        friend struct SuperFunctionCondition;
-
-        // Creates the super-function-callers by calling the first SuperFunctionCondition check
-        // This get's called within the initialization of an Identifier
-        virtual void createSuperFunctionCaller() const
-        {
-            SuperFunctionCondition<0, T, 0, 0>::check();
-        }
-
-
-//// Function-specific code ////
-
-    public:
-        /**
-            @brief Adds a pointer to the SuperFunctionCaller as a member of ClassIdentifier.
-            @param functionname The name of the super-function
-        */
-        #ifndef SUPER_INTRUSIVE_DECLARATION
-          #define SUPER_INTRUSIVE_DECLARATION(functionname) \
-            SuperFunctionCaller_##functionname * superFunctionCaller_##functionname##_; \
-            bool bSuperFunctionCaller_##functionname##_isFallback_
-        #endif
-
-
-//// Execute the code for each super-function ////
-
-    // (3/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
-    SUPER_INTRUSIVE_DECLARATION(XMLPort);
-    SUPER_INTRUSIVE_DECLARATION(tick);
-    SUPER_INTRUSIVE_DECLARATION(changedActivity);
-    SUPER_INTRUSIVE_DECLARATION(changedVisibility);
-    SUPER_INTRUSIVE_DECLARATION(XMLEventPort);
-    SUPER_INTRUSIVE_DECLARATION(changedScale);
-    SUPER_INTRUSIVE_DECLARATION(changedOwner);
-    SUPER_INTRUSIVE_DECLARATION(changedOverlayGroup);
-    SUPER_INTRUSIVE_DECLARATION(changedName);
-    SUPER_INTRUSIVE_DECLARATION(changedGametype);
-    SUPER_INTRUSIVE_DECLARATION(changedUsed);
-    SUPER_INTRUSIVE_DECLARATION(clone);
-    SUPER_INTRUSIVE_DECLARATION(changedCarrier);
-    SUPER_INTRUSIVE_DECLARATION(changedPickedUp);
-    // (3/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
-
-
-    #undef SUPER_INTRUSIVE_DECLARATION_INCLUDE
-  #endif /* SUPER_INTRUSIVE_DECLARATION_INCLUDE */
-#endif /* _Super_H__ */
Index: sandbox_qt/src/libraries/core/Template.cc
===================================================================
--- sandbox_qt/src/libraries/core/Template.cc	(revision 7418)
+++ 	(revision )
@@ -1,183 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "Template.h"
-
-#include <tinyxml/tinyxml.h>
-#include <tinyxml/ticpp.h>
-
-#include "util/Debug.h"
-#include "CoreIncludes.h"
-#include "XMLPort.h"
-
-namespace orxonox
-{
-    CreateFactory(Template);
-
-    Template::Template(BaseObject* creator) : BaseObject(creator)
-    {
-        this->xmlelement_ = new TiXmlElement("");
-
-        RegisterObject(Template);
-
-        this->bIsLink_ = false;
-        this->bLoadDefaults_ = true;
-        this->bIsReturningXMLElement_ = false;
-        this->baseclassIdentifier_ = 0;
-    }
-
-    Template::~Template()
-    {
-        Template::getTemplateMap().erase(this->getName());
-        delete this->xmlelement_;
-    }
-
-    void Template::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(Template, XMLPort, xmlelement, mode);
-
-        XMLPortParam(Template, "link",      setLink,         getLink,         xmlelement, mode);
-        XMLPortParam(Template, "baseclass", setBaseclass,    getBaseclass,    xmlelement, mode);
-        XMLPortParam(Template, "defaults",  setLoadDefaults, getLoadDefaults, xmlelement, mode).defaultValues(true);
-
-        Element* element = xmlelement.FirstChildElement(false);
-        if (element)
-        {
-            TiXmlElement* tixmlelement = static_cast<TiXmlElement*>(element->GetTiXmlPointer());
-            if (tixmlelement)
-                this->setXMLElement(*tixmlelement);
-        }
-    }
-
-    void Template::changedName()
-    {
-        SUPER(Template, changedName);
-
-        if (!this->getName().empty())
-        {
-            std::map<std::string, Template*>::iterator it;
-            it = Template::getTemplateMap().find(this->getOldName());
-            if (it != Template::getTemplateMap().end())
-                Template::getTemplateMap().erase(it);
-
-            it = Template::getTemplateMap().find(this->getName());
-            if (it != Template::getTemplateMap().end())
-                COUT(2) << "Warning: Template with name \"" << this->getName() << "\" already exists." << std::endl;
-            else
-                Template::getTemplateMap()[this->getName()] = this;
-        }
-    }
-
-    void Template::setXMLElement(const TiXmlElement& xmlelement)
-    {
-        *this->xmlelement_ = xmlelement;
-    }
-
-    const TiXmlElement& Template::getXMLElement()
-    {
-        if (this->bIsLink_)
-        {
-            Template* temp = Template::getTemplate(this->link_);
-            if (temp)
-            {
-                this->bLoadDefaults_ = temp->bLoadDefaults_;
-
-                if (!temp->bIsReturningXMLElement_)
-                {
-                    this->bIsReturningXMLElement_ = true;
-                    const TiXmlElement& element = temp->getXMLElement();
-                    this->bIsReturningXMLElement_ = false;
-                    return element;
-                }
-                else
-                {
-                    COUT(2) << "Warning: Linking from " << this->getName() << " to " << this->link_ << " leads to an infinite loop. Returning own element." << std::endl;
-                }
-            }
-            else
-            {
-                COUT(2) << "Warning: " << this->link_ << " is not an existing Template name. Returning own element." << std::endl;
-            }
-        }
-
-        return *this->xmlelement_;
-    }
-
-    void Template::setBaseclass(const std::string& baseclass)
-    {
-        this->baseclassIdentifier_ = ClassByString(baseclass);
-        if (this->baseclassIdentifier_)
-            this->baseclass_ = baseclass;
-    }
-
-    void Template::applyOn(BaseObject* object)
-    {
-        if (this->baseclassIdentifier_)
-        {
-            if (!object->isA(this->baseclassIdentifier_))
-            {
-                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;
-                return;
-            }
-        }
-
-        COUT(4) << object->getLoaderIndentation() << " aplying Template \"" << this->getName() << "\"..." << std::endl;
-
-        Element temp = &const_cast<TiXmlElement&>(this->getXMLElement());
-
-        if (this->bLoadDefaults_)
-            object->XMLPort(temp, XMLPort::LoadObject);
-        else
-            object->XMLPort(temp, XMLPort::ExpandObject);
-    }
-
-    std::map<std::string, Template*>& Template::getTemplateMap()
-    {
-        static std::map<std::string, Template*> templateMap;
-        return templateMap;
-    }
-
-    Template* Template::getTemplate(const std::string& name)
-    {
-        std::map<std::string, Template*>::iterator it = Template::getTemplateMap().find(name);
-        if (it != Template::getTemplateMap().end())
-            return it->second;
-        else
-        {
-            COUT(2) << "Warning: Template with name " << name << " doesn't exist." << std::endl;
-            return 0;
-        }
-    }
-
-    void Template::apply(const std::string& name, BaseObject* object)
-    {
-        std::map<std::string, Template*>::iterator it = Template::getTemplateMap().find(name);
-        if (it != Template::getTemplateMap().end())
-            it->second->applyOn(object);
-    }
-}
Index: sandbox_qt/src/libraries/core/Template.h
===================================================================
--- sandbox_qt/src/libraries/core/Template.h	(revision 7418)
+++ 	(revision )
@@ -1,97 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @defgroup Template Template
-    @ingroup XML
-*/
-
-/**
-    @file
-    @ingroup XML Template
-*/
-
-#ifndef _Template_H__
-#define _Template_H__
-
-#include "CorePrereqs.h"
-
-#include <map>
-#include <string>
-#include "BaseObject.h"
-
-namespace orxonox
-{
-    class _CoreExport Template : public BaseObject
-    {
-        public:
-            Template(BaseObject* creator);
-            virtual ~Template();
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            virtual void changedName();
-
-            inline void setLink(const std::string& link)
-                { this->link_ = link; this->bIsLink_ = !link.empty(); }
-            inline const std::string& getLink() const
-                { return this->link_; }
-            inline bool isLink() const
-                { return this->bIsLink_; }
-
-            inline void setLoadDefaults(bool bLoadDefaults)
-                { this->bLoadDefaults_ = bLoadDefaults; }
-            inline bool getLoadDefaults() const
-                { return this->bLoadDefaults_; }
-
-            void setXMLElement(const TiXmlElement& xmlelement);
-            const TiXmlElement& getXMLElement();
-
-            void setBaseclass(const std::string& baseclass);
-            inline const std::string& getBaseclass() const
-                { return this->baseclass_; }
-            inline Identifier* getBaseclassIdentifier() const
-                { return this->baseclassIdentifier_; }
-
-            void applyOn(BaseObject* object);
-
-            static std::map<std::string, Template*>& getTemplateMap();
-            static Template* getTemplate(const std::string& name);
-            static void apply(const std::string& name, BaseObject* object);
-
-        private:
-            TiXmlElement* xmlelement_;
-            std::string link_;
-            std::string baseclass_;
-            Identifier* baseclassIdentifier_;
-            bool bIsLink_;
-            bool bLoadDefaults_;
-            mutable bool bIsReturningXMLElement_;
-    };
-}
-
-#endif /* _Template_H__ */
Index: sandbox_qt/src/libraries/core/Thread.cc
===================================================================
--- sandbox_qt/src/libraries/core/Thread.cc	(revision 7418)
+++ 	(revision )
@@ -1,128 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Oliver Scheuss
- *   Co-authors:
- *      ...
- *
- */
-
-#include "Thread.h"
-
-#include <cassert>
-#include <boost/thread/thread.hpp>
-#include <boost/bind.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/thread_time.hpp>
-
-#include "util/Sleep.h"
-#include "command/Executor.h"
-
-namespace orxonox
-{
-    boost::posix_time::millisec THREAD_WAIT_BEFORE_DETACH(1000);
-
-
-    Thread::Thread():
-        executor_(0),
-        isWorking_(false),
-        stopThread_(false)
-    {
-        this->executorMutex_ = new boost::mutex;
-        this->isWorkingMutex_ = new boost::mutex;
-        this->stopThreadMutex_ = new boost::mutex;
-        this->workerThread_ = new boost::thread( boost::bind(&Thread::threadLoop, this) );
-    }
-
-    Thread::~Thread()
-    {
-        this->stopThreadMutex_->lock();
-        this->stopThread_ = true;
-        this->stopThreadMutex_->unlock();
-        if( !this->workerThread_->timed_join( THREAD_WAIT_BEFORE_DETACH ) )
-            assert(0); // this should not happen
-        delete this->workerThread_;
-        delete this->executorMutex_;
-        delete this->stopThreadMutex_;
-        delete this->isWorkingMutex_;
-    }
-
-    bool Thread::isWorking()
-    {
-      this->isWorkingMutex_->lock();
-      bool isWorking = this->isWorking_;
-      this->isWorkingMutex_->unlock();
-      return isWorking;
-    }
-
-    bool Thread::evaluateExecutor( const ExecutorPtr& executor )
-    {
-        this->isWorkingMutex_->lock();
-        this->isWorking_=true;
-        this->isWorkingMutex_->unlock();
-        this->executorMutex_->lock();
-        this->executor_ = executor;
-        this->executorMutex_->unlock();
-        return true;
-    }
-
-    void Thread::threadLoop()
-    {
-        bool stopThread = false;
-        while( !stopThread )
-        {
-            //this->executorMutex_->lock();
-            ExecutorPtr executor = this->executor_;
-            //this->executorMutex_->unlock();
-            if( executor )
-            {
-                (*executor)();
-                this->executorMutex_->lock();
-                this->executor_ = 0;
-                this->executorMutex_->unlock();
-                this->isWorkingMutex_->lock();
-                this->isWorking_=false;
-                this->isWorkingMutex_->unlock();
-            }
-            else
-            {
-                this->workerThread_->yield();
-            }
-            //this->stopThreadMutex_->lock();
-            stopThread = this->stopThread_;
-            //this->stopThreadMutex_->unlock();
-        }
-    }
-
-    void Thread::waitUntilFinished()
-    {
-        bool stillWorking = true;
-        while( stillWorking )
-        {
-            this->isWorkingMutex_->lock();
-            stillWorking = this->isWorking_;
-            this->isWorkingMutex_->unlock();
-            if( stillWorking )
-                msleep( 1 );
-        }
-    }
-}
Index: sandbox_qt/src/libraries/core/Thread.h
===================================================================
--- sandbox_qt/src/libraries/core/Thread.h	(revision 7418)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Oliver Scheuss
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup ThreadPool
-*/
-
-#ifndef _Thread_H__
-#define _Thread_H__
-
-#include "CorePrereqs.h"
-
-namespace boost{
-  class recursive_mutex;
-}
-
- namespace orxonox
-{
-    class _CoreExport Thread
-    {
-    public:
-        Thread();
-        virtual ~Thread();
-
-        bool isWorking();
-        void waitUntilFinished();
-        bool evaluateExecutor( const ExecutorPtr& executor );
-
-    private:
-        void            threadLoop();
-
-        ExecutorPtr     executor_;
-        bool            isWorking_;
-        bool            stopThread_;
-        boost::thread*  workerThread_;
-        boost::mutex*   executorMutex_;
-        boost::mutex*   isWorkingMutex_;
-        boost::mutex*   stopThreadMutex_;
-    };
-
- }
-
-#endif /* _Thread_H__ */
Index: sandbox_qt/src/libraries/core/ThreadPool.cc
===================================================================
--- sandbox_qt/src/libraries/core/ThreadPool.cc	(revision 7418)
+++ 	(revision )
@@ -1,115 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Oliver Scheuss
- *   Co-authors:
- *      ...
- *
- */
-
-#include "ThreadPool.h"
-#include "Thread.h"
-#include <cassert>
-
-namespace orxonox
-{
-
-    ThreadPool::ThreadPool()
-    {
-    }
-
-    ThreadPool::~ThreadPool()
-    {
-        unsigned int a = this->setNrOfThreads(0);
-        assert(a == 0);
-    }
-
-    void ThreadPool::addThreads( unsigned int nr )
-    {
-        for( unsigned int i=0; i<nr; i++ )
-            this->threadPool_.push_back(new Thread());
-    }
-    unsigned int ThreadPool::removeThreads( unsigned int nr )
-    {
-        unsigned int i=0;
-        std::vector<Thread*>::iterator it;
-        for( it = this->threadPool_.begin(); it != threadPool_.end() && i<nr; )
-        {
-            if( ! (*it)->isWorking() )
-            {
-                Thread* temp = *it;
-                it=this->threadPool_.erase( it );
-                delete temp;
-                ++i;
-            }
-            else
-              ++it;
-        }
-        return i;
-    }
-    unsigned int ThreadPool::setNrOfThreads( unsigned int nr )
-    {
-        unsigned int currentsize = this->threadPool_.size();
-        if ( nr < currentsize )
-            return currentsize - removeThreads( currentsize - nr );
-        else if ( nr == currentsize )
-            return currentsize;
-        else
-        {
-            addThreads( nr - currentsize );
-            return nr;
-        }
-    }
-
-    bool ThreadPool::passFunction( const ExecutorPtr& executor, bool addThread )
-    {
-        std::vector<Thread*>::iterator it;
-        for ( it=this->threadPool_.begin(); it!=this->threadPool_.end(); ++it )
-        {
-            if ( ! (*it)->isWorking() )
-            {
-                bool b = (*it)->evaluateExecutor( executor );
-                assert(b); // if b is false then there is some code error
-                return true;
-            }
-        }
-        if ( addThread )
-        {
-            addThreads( 1 );
-            bool b = this->threadPool_.back()->evaluateExecutor( executor ); // access the last element
-            assert(b);
-            return true;
-        }
-        else
-            return false;
-    }
-
-    void ThreadPool::synchronise()
-    {
-        std::vector<Thread*>::iterator it;
-        for ( it=this->threadPool_.begin(); it!=this->threadPool_.end(); ++it )
-        {
-            (*it)->waitUntilFinished();
-        }
-    }
-
-}
Index: sandbox_qt/src/libraries/core/ThreadPool.h
===================================================================
--- sandbox_qt/src/libraries/core/ThreadPool.h	(revision 7418)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Oliver Scheuss
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @defgroup ThreadPool Thread pool
-    @ingroup Core
-*/
-
-/**
-    @file
-    @ingroup ThreadPool
-*/
-
-#ifndef _ThreadPool_H__
-#define _ThreadPool_H__
-
-#include "CorePrereqs.h"
-
-#include <vector>
-
- namespace orxonox
-{
-    class _CoreExport ThreadPool
-    {
-    public:
-        ThreadPool();
-        virtual ~ThreadPool();
-
-        void addThreads( unsigned int nr );
-        unsigned int removeThreads( unsigned int nr );
-        unsigned int setNrOfThreads( unsigned int nr );
-
-        bool passFunction( const ExecutorPtr& executor, bool addThread=false );
-        void synchronise();
-
-    private:
-        std::vector<Thread*> threadPool_;
-
-    };
-}
-
-#endif /* _ThreadPool_H__ */
Index: sandbox_qt/src/libraries/core/ToluaInterface.h
===================================================================
--- sandbox_qt/src/libraries/core/ToluaInterface.h	(revision 7418)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-@file
-@ingroup Lua
-@brief
-    This is required because tolua would parse this macro in LuaState.h and fail
-*/
-
-#ifndef _ToluaInterface_H__
-#define _ToluaInterface_H__
-
-#include "CorePrereqs.h"
-#include <boost/preprocessor/cat.hpp>
-
-// Macro for declaring a tolua interface of a library/module
-#define DeclareToluaInterface(libraryName) \
-    static bool BOOST_PP_CAT(bDummy##libraryName, __LINE__) = orxonox::LuaState::addToluaInterface(&tolua_##libraryName##_open, #libraryName); \
-    static Loki::ScopeGuardImpl1<bool (*)(const std::string&), std::string> BOOST_PP_CAT(dummy##libraryName, __LINE__)(&orxonox::LuaState::removeToluaInterface, #libraryName)
-
-#endif /* _ToluaInterface_H__ */
Index: sandbox_qt/src/libraries/core/WeakPtr.h
===================================================================
--- sandbox_qt/src/libraries/core/WeakPtr.h	(revision 7418)
+++ 	(revision )
@@ -1,297 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-// Inspired by boost::intrusive_ptr by Peter Dimov
-
-/**
-    @file
-    @ingroup Object SmartPtr
-    @brief Definition of WeakPtr<T>, wraps a pointer to an object.
-
-    @anchor WeakPtrExample
-
-    A WeakPtr wraps a pointer to an object. If the object gets deleted, the WeakPtr becomes
-    NULL. This can be used to store pointers to objects without knowing when they will be
-    destroyed.
-
-    WeakPtr works only with objects that are derived from orxonox::OrxonoxClass, because
-    WeakPtr is intrusive and registers itself in the stored object, to get a notification if
-    the object is being deleted.
-
-    Example:
-    @code
-    MyClass* object = new MyClass();                    // create an instance of MyClass
-
-    WeakPtr<MyClass> pointer = object;                  // create a WeakPtr and assign the object
-
-    if (pointer)                                        // checks if pointer is not NULL (which is true)
-        pointer->someFunction();                        // calls MyClass::someFunction()
-
-    object->destroy();                                  // calls destroy() which deletes the object
-
-    if (pointer)                                        // checks if pointer is not NULL (which is now false)
-        pointer->someFunction();                        // this will not be executed
-    @endcode
-    In this example we assumed that MyClass is derived of OrxonoxClass (otherwise it couldn't
-    be used with a WeakPtr).
-
-    A callback can be registerd with the WeakPtr that will be called if the object gets deleted.
-    @code
-    void myCallback()                                   // definition of the callback function
-    {
-        COUT(0) << "Object destroyed" << std::endl;
-    }
-
-    MyClass* object = new MyClass();                    // create an instance of MyClass
-
-    WeakPtr<MyClass> pointer = object;                  // create a WeakPtr and assign the object
-
-    pointer.setCallback(createFunctor(&myCallback));    // defines a callback
-
-    object->destroy();                                  // calls destroy() which deletes the object. prints "Object destroyed" to the console
-    @endcode
-*/
-
-#ifndef _WeakPtr_H__
-#define _WeakPtr_H__
-
-#include "CorePrereqs.h"
-
-#include <cassert>
-#include "Identifier.h"
-#include "OrxonoxClass.h"
-#include "command/Functor.h"
-
-namespace orxonox
-{
-    /**
-        @brief WeakPtr wraps a pointer to an object, which becomes NULL if the object is deleted.
-
-        @see See @ref WeakPtrExample "this description" for more information and an example.
-    */
-    template <class T>
-    class WeakPtr
-    {
-        friend class OrxonoxClass;
-
-        public:
-            /// Constructor: Initializes the weak pointer with a null pointer.
-            inline WeakPtr() : pointer_(0), base_(0), callback_(0)
-            {
-            }
-
-            /// Constructor: Used to explicitly initialize the weak pointer with a null pointer
-            inline WeakPtr(int) : pointer_(0), base_(0), callback_(0)
-            {
-            }
-
-            /// Constructor: Initializes the weak pointer with a pointer to an object.
-            inline WeakPtr(T* pointer) : pointer_(pointer), base_(pointer), callback_(0)
-            {
-                if (this->base_)
-                    this->base_->registerWeakPtr(this);
-            }
-
-            /// Copy-constructor
-            inline WeakPtr(const WeakPtr& other) : pointer_(other.pointer_), base_(other.base_), callback_(0)
-            {
-                if (this->base_)
-                    this->base_->registerWeakPtr(this);
-            }
-
-            /// Copy-constructor for weak pointers to objects of another class.
-            template <class O>
-            inline WeakPtr(const WeakPtr<O>& other) : pointer_(other.get()), base_(other.base_), callback_(0)
-            {
-                if (this->base_)
-                    this->base_->registerWeakPtr(this);
-            }
-
-            /// Destructor
-            inline ~WeakPtr()
-            {
-                if (this->base_)
-                    this->base_->unregisterWeakPtr(this);
-
-            }
-
-            /// Used to assign a null pointer.
-            inline WeakPtr& operator=(int)
-            {
-                WeakPtr(0).swap(*this);
-                return *this;
-            }
-
-            /// Assigns a new pointer.
-            inline WeakPtr& operator=(T* pointer)
-            {
-                WeakPtr(pointer).swap(*this);
-                return *this;
-            }
-
-            /// Assigns the wrapped pointer of another WeakPtr.
-            inline WeakPtr& operator=(const WeakPtr& other)
-            {
-                WeakPtr(other).swap(*this);
-                return *this;
-            }
-
-            /// Assigns the wrapped pointer of a WeakPtr of another class
-            template <class O>
-            inline WeakPtr& operator=(const WeakPtr<O>& other)
-            {
-                WeakPtr(other).swap(*this);
-                return *this;
-            }
-
-            /// Returns the wrapped pointer as @c T*
-            inline T* get() const
-            {
-                return this->pointer_;
-            }
-
-            /// Returns the wrapped pointer as @c OrxonoxClass*
-            inline OrxonoxClass* getBase() const
-            {
-                return this->base_;
-            }
-
-            /// Implicitly converts the WeakPtr to a pointer of type @c T*
-            inline operator T*() const
-            {
-                return this->pointer_;
-            }
-
-            /// Overloaded operator, returns a pointer to the stored object.
-            inline T* operator->() const
-            {
-                assert(this->pointer_ != 0);
-                return this->pointer_;
-            }
-
-            /// Overloaded operator, returns a reference to the stored object.
-            inline T& operator*() const
-            {
-                assert(this->pointer_ != 0);
-                return *this->pointer_;
-            }
-
-            /// Returns true if the wrapped pointer is NULL.
-            inline bool operator!() const
-            {
-                return (this->pointer_ == 0);
-            }
-
-            /// Swaps the contents of two weak pointers.
-            inline void swap(WeakPtr& other)
-            {
-                if (this->base_)
-                    this->base_->unregisterWeakPtr(this);
-                if (other.base_)
-                    other.base_->unregisterWeakPtr(&other);
-
-                {
-                    T* temp = this->pointer_;
-                    this->pointer_ = other.pointer_;
-                    other.pointer_ = temp;
-                }
-                {
-                    OrxonoxClass* temp = this->base_;
-                    this->base_ = other.base_;
-                    other.base_ = temp;
-                }
-
-                if (this->base_)
-                    this->base_->registerWeakPtr(this);
-                if (other.base_)
-                    other.base_->registerWeakPtr(&other);
-            }
-
-            /// Resets the weak pointer (equivalent to assigning a NULL pointer).
-            inline void reset()
-            {
-                WeakPtr().swap(*this);
-            }
-
-            /// Registers a callback that will be executed if the stored object is destroyed.
-            inline void setCallback(const FunctorPtr& callback)
-            {
-                this->callback_ = callback;
-            }
-
-            /// Returns the registered callback.
-            inline const FunctorPtr& getCallback() const
-            {
-                return this->callback_;
-            }
-
-        private:
-            /// Will be called by OrxonoxClass::~OrxonoxClass() if the stored object is deleted. Resets the wrapped pointer and executes the callback.
-            inline void objectDeleted()
-            {
-                this->base_ = 0;
-                this->pointer_ = 0;
-                if (this->callback_)
-                    (*this->callback_)();
-            }
-
-            T* pointer_;            ///< The wrapped pointer to an object of type @a T
-            OrxonoxClass* base_;    ///< The wrapped pointer, casted up to OrxonoxClass (this is needed because with just a T* pointer, WeakPtr couln't be used with forward declarations)
-            FunctorPtr callback_;   ///< This callback will be executed if the stored object is deleted
-    };
-
-    /// Swaps the contents of two weak pointers.
-    template <class T>
-    void swap(WeakPtr<T>& a, WeakPtr<T>& b)
-    {
-        a.swap(b);
-    }
-
-    /// Uses a static_cast to cast a pointer of type U* to a pointer of type T* and returns it in a new WeakPtr<T>.
-    template <class T, class U>
-    WeakPtr<T> static_pointer_cast(const WeakPtr<U>& p)
-    {
-        return static_cast<T*>(p.get());
-    }
-
-    /// Uses a const_cast to cast a pointer of type U* to a pointer of type T* and returns it in a new WeakPtr<T>.
-    template <class T, class U>
-    WeakPtr<T> const_pointer_cast(const WeakPtr<U>& p)
-    {
-        return const_cast<T*>(p.get());
-    }
-
-    /// Uses a dynamic_cast to cast a pointer of type U* to a pointer of type T* and returns it in a new WeakPtr<T>.
-    template <class T, class U>
-    WeakPtr<T> dynamic_pointer_cast(const WeakPtr<U>& p)
-    {
-        return orxonox_cast<T*>(p.get());
-    }
-}
-
-#endif /* _WeakPtr_H__ */
Index: sandbox_qt/src/libraries/core/WindowEventListener.cc
===================================================================
--- sandbox_qt/src/libraries/core/WindowEventListener.cc	(revision 7418)
+++ 	(revision )
@@ -1,64 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "WindowEventListener.h"
-#include "CoreIncludes.h"
-
-namespace orxonox
-{
-    unsigned int WindowEventListener::windowWidth_s  = 0;
-    unsigned int WindowEventListener::windowHeight_s = 0;
-
-    WindowEventListener::WindowEventListener()
-    {
-        RegisterRootObject(WindowEventListener);
-    }
-
-    //! Calls all registered objects
-    /*static*/ void WindowEventListener::moveWindow()
-    {
-        for (ObjectList<WindowEventListener>::iterator it = ObjectList<WindowEventListener>::begin(); it; ++it)
-            it->windowMoved();
-    }
-
-    //! Calls all registered objects and sets the static variables
-    /*static*/ void WindowEventListener::resizeWindow(unsigned int newWidth, unsigned int newHeight)
-    {
-        windowWidth_s = newWidth;
-        windowHeight_s = newHeight;
-        for (ObjectList<WindowEventListener>::iterator it = ObjectList<WindowEventListener>::begin(); it; ++it)
-            it->windowResized(newWidth, newHeight);
-    }
-
-    //! Calls all registered objects
-    /*static*/ void WindowEventListener::changeWindowFocus()
-    {
-        for (ObjectList<WindowEventListener>::iterator it = ObjectList<WindowEventListener>::begin(); it; ++it)
-            it->windowFocusChanged();
-    }
-}
Index: sandbox_qt/src/libraries/core/WindowEventListener.h
===================================================================
--- sandbox_qt/src/libraries/core/WindowEventListener.h	(revision 7418)
+++ 	(revision )
@@ -1,76 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup Graphics
-*/
-
-#ifndef _WindowEventListener_H__
-#define _WindowEventListener_H__
-
-#include "CorePrereqs.h"
-#include "OrxonoxClass.h"
-
-namespace orxonox
-{
-    //! Interface for receiving window events like resize, moved and focusChanged
-    class _CoreExport WindowEventListener : virtual public OrxonoxClass
-    {
-        friend class OgreWindowEventListener;
-
-        protected:
-            WindowEventListener();
-            virtual ~WindowEventListener() { }
-
-            //! Returns the current render window width
-            unsigned int getWindowWidth() const { return windowWidth_s; }
-            //! Returns the current render window height
-            unsigned int getWindowHeight() const { return windowHeight_s; }
-
-        private:
-            //! Window has been moved
-            virtual void windowMoved() { }
-
-            //! Window has resized
-            virtual void windowResized(unsigned int newWidth, unsigned int newHeight) { }
-
-            //! Window has lost/gained focus
-            virtual void windowFocusChanged() { }
-
-            static void moveWindow();
-            static void resizeWindow(unsigned int newWidth, unsigned int newHeight);
-            static void changeWindowFocus();
-
-            //! Static variable that holds the latest distributed information
-            static unsigned int windowWidth_s;
-            static unsigned int windowHeight_s;
-    };
-}
-
-#endif /* _WindowEventListener_H__ */
Index: sandbox_qt/src/libraries/core/XMLFile.h
===================================================================
--- sandbox_qt/src/libraries/core/XMLFile.h	(revision 7418)
+++ 	(revision )
@@ -1,70 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup XML XMLPort
-*/
-
-#ifndef _XMLFile_H__
-#define _XMLFile_H__
-
-#include "CorePrereqs.h"
-
-#include <string>
-#include "ClassTreeMask.h"
-
-namespace orxonox
-{
-    class _CoreExport XMLFile
-    {
-        public:
-            XMLFile(const std::string& filename)
-                : filename_(filename)
-                , bLuaSupport_(true)
-            { }
-            XMLFile(const ClassTreeMask& mask, const std::string& filename)
-                : filename_(filename)
-                , mask_(mask)
-                , bLuaSupport_(true)
-            { }
-
-            void setLuaSupport(bool val) { bLuaSupport_ = val; }
-
-            const std::string& getFilename() const { return this->filename_; }
-            const ClassTreeMask& getMask() const { return this->mask_; }
-            bool getLuaSupport() const { return this->bLuaSupport_; }
-
-        private:
-            std::string filename_;
-            ClassTreeMask mask_;
-            bool bLuaSupport_; // Default is true
-    };
-}
-
-#endif /* _XMLFile_H__ */
Index: sandbox_qt/src/libraries/core/XMLNameListener.cc
===================================================================
--- sandbox_qt/src/libraries/core/XMLNameListener.cc	(revision 7418)
+++ 	(revision )
@@ -1,38 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "XMLNameListener.h"
-#include "CoreIncludes.h"
-
-namespace orxonox
-{
-    XMLNameListener::XMLNameListener()
-    {
-        RegisterRootObject(XMLNameListener);
-    }
-}
Index: sandbox_qt/src/libraries/core/XMLNameListener.h
===================================================================
--- sandbox_qt/src/libraries/core/XMLNameListener.h	(revision 7418)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup XML XMLPort
-*/
-
-#ifndef _XMLNameListener_H__
-#define _XMLNameListener_H__
-
-#include "CorePrereqs.h"
-#include "OrxonoxClass.h"
-
-namespace orxonox
-{
-    class _CoreExport XMLNameListener : virtual public OrxonoxClass
-    {
-        public:
-            XMLNameListener();
-            virtual ~XMLNameListener() {}
-
-            virtual void loadedNewXMLName(BaseObject* object) = 0;
-    };
-}
-
-#endif /* _XMLNameListener_H__ */
Index: sandbox_qt/src/libraries/core/XMLPort.cc
===================================================================
--- sandbox_qt/src/libraries/core/XMLPort.cc	(revision 7418)
+++ 	(revision )
@@ -1,138 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "XMLPort.h"
-
-#include "Loader.h"
-#include "Namespace.h"
-
-namespace orxonox
-{
-    // ################################
-    // ###  XMLPortObjectContainer  ###
-    // ################################
-    bool XMLPortObjectContainer::identifierIsIncludedInLoaderMask(const Identifier* identifier)
-    {
-        return ((!this->bApplyLoaderMask_) || identifier->isA(ClassIdentifier<Namespace>::getIdentifier()) || Loader::currentMask_s.isIncluded(identifier));
-    }
-
-    XMLPortObjectContainer& XMLPortObjectContainer::port(BaseObject* object, Element& xmlelement, XMLPort::Mode mode)
-    {
-        if ((mode == XMLPort::LoadObject) || (mode == XMLPort::ExpandObject))
-        {
-            try
-            {
-                Element* xmlsubelement;
-                if (!this->sectionname_.empty())
-                    xmlsubelement = xmlelement.FirstChildElement(this->sectionname_, false);
-                else
-                    xmlsubelement = &xmlelement;
-
-                if (!xmlsubelement)
-                    return (*this);
-
-                for (ticpp::Iterator<ticpp::Element> child = xmlsubelement->FirstChildElement(false); child != child.end(); child++)
-                {
-                    Identifier* identifier = Identifier::getIdentifierByString(child->Value());
-                    if (!identifier)
-                    {
-                        if (!this->sectionname_.empty())
-                        {
-                            COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a valid classname." << std::endl;
-                        }
-                        else
-                        {
-                            // It's probably just another subsection
-                        }
-                        continue;
-                    }
-                    if (!identifier->isA(objectIdentifier_))
-                    {
-                        COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << objectIdentifier_->getName() << "'." << std::endl;
-                        continue;
-                    }
-                    if (!identifier->isLoadable())
-                    {
-                        COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not loadable." << std::endl;
-                        continue;
-                    }
-                    if (!this->identifierIsIncludedInLoaderMask(identifier))
-                        continue;
-
-                    try
-                    {
-                        COUT(4) << object->getLoaderIndentation() << "fabricating " << child->Value() << "..." << std::endl;
-
-                        BaseObject* newObject = identifier->fabricate(object);
-                        newObject->setLoaderIndentation(object->getLoaderIndentation() + "  ");
-
-                        if (this->bLoadBefore_)
-                        {
-                            newObject->XMLPort(*child, XMLPort::LoadObject);
-                            COUT(4) << object->getLoaderIndentation() << "assigning " << child->Value() << " (objectname " << newObject->getName() << ") to " << this->identifier_->getName() << " (objectname " << static_cast<BaseObject*>(object)->getName() << ')' << std::endl;
-                        }
-                        else
-                        {
-                            COUT(4) << object->getLoaderIndentation() << "assigning " << child->Value() << " (object not yet loaded) to " << this->identifier_->getName() << " (objectname " << static_cast<BaseObject*>(object)->getName() << ')' << std::endl;
-                        }
-
-                        COUT(5) << object->getLoaderIndentation();
-
-                        this->callLoadExecutor(object, newObject);
-
-                        if (!this->bLoadBefore_)
-                            newObject->XMLPort(*child, XMLPort::LoadObject);
-
-                        COUT(5) << object->getLoaderIndentation() << "...fabricated " << child->Value() << " (objectname " << newObject->getName() << ")." << std::endl;
-                    }
-                    catch (AbortLoadingException& ex)
-                    {
-                        COUT(1) << "An error occurred while loading object, abort loading..." << std::endl;
-                        throw ex;
-                    }
-                    catch (...)
-                    {
-                        COUT(1) << "An error occurred while loading object:" << std::endl;
-                        COUT(1) << Exception::handleMessage() << std::endl;
-                    }
-                }
-            }
-            catch (ticpp::Exception& ex)
-            {
-                COUT(1) << std::endl;
-                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;
-                COUT(1) << ex.what() << std::endl;
-            }
-        }
-        else if (mode == XMLPort::SaveObject)
-        {
-        }
-
-        return (*this);
-    }
-}
Index: sandbox_qt/src/libraries/core/XMLPort.h
===================================================================
--- sandbox_qt/src/libraries/core/XMLPort.h	(revision 7418)
+++ 	(revision )
@@ -1,613 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @defgroup XMLPort XMLPort
-    @ingroup XML
-*/
-
-/**
-    @file
-    @ingroup XML XMLPort
-    @brief Declaration of the XMLPort helper classes and macros.
-
-    XMLPort is a virtual function of every BaseObject. Every object can change this function.
-    The XMLPort function gets called with an XMLElement, containing all attributes and
-    subclasses the object gets from the levelfile.
-
-    This file declares classes and macros to simplify XML-parsing.
-*/
-
-#ifndef _XMLPort_H__
-#define _XMLPort_H__
-
-#include "CorePrereqs.h"
-
-#include <cassert>
-#include <string>
-#include <tinyxml/ticpp.h>
-
-#include "util/Debug.h"
-#include "util/Exception.h"
-#include "util/MultiType.h"
-#include "util/OrxAssert.h"
-#include "util/StringUtils.h"
-#include "Identifier.h"
-#include "BaseObject.h"
-#include "command/Executor.h"
-
-// ------------
-// XMLPortParam
-
-/**
-    @brief Declares an XML attribute with a name, which will be set through load- and savefunctions.
-    @param classname The name of the class owning this param
-    @param paramname The name of the attribute
-    @param loadfunction A function to set the param in the object with a given value (~a set-function)
-    @param savefunction A function to get the value of the param from the object (~a get-function)
-    @param xmlelement The XMLElement, you get this from the XMLPort function
-    @param mode The mode (load or save), you get this from the XMLPort function
-
-    In the XML file, a param or attribute will be set like this:
-    @code
-    <classname paramname="value" />
-    @endcode
-
-    The macro will then call loadfunction(value) to set the given value (or call savefunction() to
-    write an existing value to an XML file).
-*/
-#define XMLPortParam(classname, paramname, loadfunction, savefunction, xmlelement, mode) \
-    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
-    XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, classname, this, paramname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode)
-
-/**
-    @brief Declares an XML attribute with a name, which will be set through a variable.
-    @param classname The name of the class owning this param
-    @param paramname The name of the attribute
-    @param variable Name of the variable used to save and load the value
-    @param xmlelement The XMLElement, you get this from the XMLPort function
-    @param mode The mode (load or save), you get this from the XMLPort function
-
-    In the XML file, a param or attribute will be set like this:
-    @code
-    <classname paramname="value" />
-    @endcode
-
-    The macro will then store "value" in the variable or read it when saving.
-*/
-#define XMLPortParamVariable(classname, paramname, variable, xmlelement, mode) \
-    XMLPortVariableHelperClass xmlcontainer##variable##dummy(static_cast<void*>(&variable)); \
-    static ExecutorMemberPtr<orxonox::XMLPortVariableHelperClass> xmlcontainer##variable##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(orxonox::XMLPortVariableHelperClass::getLoader(variable)), std::string( #classname ) + "::" + #variable + "loader"); \
-    static ExecutorMemberPtr<orxonox::XMLPortVariableHelperClass> xmlcontainer##variable##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(orxonox::XMLPortVariableHelperClass::getSaver (variable)), std::string( #classname ) + "::" + #variable + "saver" ); \
-    XMLPortParamGeneric(xmlcontainer##variable, classname, orxonox::XMLPortVariableHelperClass, &xmlcontainer##variable##dummy, paramname, xmlcontainer##variable##loadexecutor, xmlcontainer##variable##saveexecutor, xmlelement, mode)
-
-/**
-    @brief This is the same as XMLPortParam, but you can set the template arguments needed to store the loadfunction.
-
-    Sometimes the name of the loadfunction is ambiguous (example: setPosition(Vector3) or
-    setPosition(float, float, float)). In this case, you can choose the right function by
-    telling the types of the functionparams. In our example, this would be either
-    > XMLPortParamTemplate(classname, paramname, loadfunction, savefunction, xmlelement, mode, Vector3);
-    or
-    > XMLPortParamTemplate(classname, paramname, loadfunction, savefunction, xmlelement, mode, float, float, float);
-    You don't have to use this, if there exist only one function with the given name.
-*/
-#define XMLPortParamTemplate(classname, paramname, loadfunction, savefunction, xmlelement, mode, ...) \
-    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<void, classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
-    XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, classname, this, paramname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode)
-
-// --------------------
-// XMLPortParamLoadOnly
-
-/**
-    @brief Declares an XML attribute with a name, which can be set through a loadfunction.
-
-    This is the same as XMLPortParam, but you don't need a savefunction (get-function). Therefore,
-    this param won't be saved in an XML file, but you can add the attribute manually an it will be
-    loaded.
-
-    This might be helpful in cases, when you have several options to set a value, for example the
-    rotation. You can set the rotation with a quaternion, but you could also use three angles.
-    When saving the object, only one of both options has to be saved; this is, where this macro helps.
-*/
-#define XMLPortParamLoadOnly(classname, paramname, loadfunction, xmlelement, mode) \
-    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##0##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    XMLPortParamGeneric(xmlcontainer##loadfunction##0, classname, classname, this, paramname, xmlcontainer##loadfunction##0##loadexecutor, 0, xmlelement, mode)
-/**
-    @brief This is the same as XMLPortParamTemplate, but for load-only attributes (see XMLPortParamLoadOnly).
-*/
-#define XMLPortParamLoadOnlyTemplate(classname, paramname, loadfunction, xmlelement, mode, ...) \
-    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##0##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<void, classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    XMLPortParamGeneric(xmlcontainer##loadfunction##0, classname, classname, this, paramname, xmlcontainer##loadfunction##0##loadexecutor, 0, xmlelement, mode)
-
-// ------------------
-// XMLPortParamExtern
-
-/**
-    @brief This is the same as XMLPortParam, but for attributes in an extern class.
-    @param classname The name of the class owning the object owning the attribute
-    @param externclass The name of the extern class (the objects class)
-    @param object The name of the object of the extern class (a member of the main class)
-    @param paramname The name of the attribute
-    @param loadfunction The function to set the attribute inside of the member object.
-    @param savefunction The function to get the attribute from the member object
-    @param xmlelement The XML-element that is parsed by this macro
-    @param mode Loading or saving
-
-    Sometimes you'll have a member object in your class, which has it's own load- and savefunctions.
-    With this macro, you can simply use them instead of writing your own functions.
-
-    Example:
-    Your class is called SpaceShip and this class has an object (myPilot_) of class Pilot. Pilot has a name
-    and two functions, setName(name) and getName(). Now you want an attribute "pilotname" in your
-    SpaceShip class. Instead of writing wrapper functions, you can simply use the XMLPortParamExtern
-    macro:
-    > XMLPortParamExtern(SpaceShip, Pilot, myPilot_, "pilotname", setName, getName, xmlelement, mode);
-*/
-#define XMLPortParamExtern(classname, externclass, object, paramname, loadfunction, savefunction, xmlelement, mode) \
-    static ExecutorMemberPtr<externclass> xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&externclass::loadfunction), std::string( #externclass ) + "::" + #loadfunction); \
-    static ExecutorMemberPtr<externclass> xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&externclass::savefunction), std::string( #externclass ) + "::" + #savefunction); \
-    XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, externclass, object, paramname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode);
-/**
-    @brief This is the same as XMLPortParamTemplate, but for extern attributes (see XMLPortParamExtern).
-*/
-#define XMLPortParamExternTemplate(classname, externclass, object, paramname, loadfunction, savefunction, xmlelement, mode, ...) \
-    static ExecutorMemberPtr<externclass> xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<void, externclass, __VA_ARGS__ >(&externclass::loadfunction), std::string( #externclass ) + "::" + #loadfunction); \
-    static ExecutorMemberPtr<externclass> xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&externclass::savefunction), std::string( #externclass ) + "::" + #savefunction); \
-    XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, externclass, object, paramname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode);
-
-// -------------------
-// XMLPortParamGeneric
-
-/**
-    @brief This is the generic XMLPort param macro, which is used by all six specialized macros above.
-*/
-#define XMLPortParamGeneric(containername, classname, objectclass, object, paramname, loadexecutor, saveexecutor, xmlelement, mode) \
-    orxonox::XMLPortClassParamContainer<objectclass>* containername = static_cast<orxonox::XMLPortClassParamContainer<objectclass>*>(ClassIdentifier<classname>::getIdentifier()->getXMLPortParamContainer(paramname)); \
-    if (!containername) \
-    { \
-        containername = new orxonox::XMLPortClassParamContainer<objectclass>(std::string(paramname), ClassIdentifier<classname>::getIdentifier(), loadexecutor, saveexecutor); \
-        ClassIdentifier<classname>::getIdentifier()->addXMLPortParamContainer(paramname, containername); \
-    } \
-    containername->port(dynamic_cast<BaseObject*>(this), object, xmlelement, mode)
-
-// --------------------
-// XMLPortObjectExtended
-
-/**
-    @brief Declares a possible sub-object that can be added in the XML file.
-    @param classname The name of the class that uses this macro
-    @param objectclass The baseclass of objects that can be added
-    @param sectionname The name of the subsection in the XML file that encloses the sub-objects ("" means no subsection)
-    @param loadfunction The function to add a new object to the class
-    @param savefunction The function to get all added objects from the class
-    @param xmlelement The XMLElement (received through the XMLPort function)
-    @param mode The mode (load/save) (received through the XMLPort function)
-    @param bApplyLoaderMask If this is true, an added sub-object gets loaded only if it's class is included in the Loaders ClassTreeMask (this is usually false)
-    @param bLoadBefore If this is true, the sub-object gets loaded (through XMLPort) BEFORE it gets added to the main class (this is usually true)
-
-    bApplyLoaderMask is usually false for the following reason:
-    If the loaders mask says, for example, "load only SpaceShips" and you added weapons to the
-    SpaceShips, then the Weapons will still be loaded (which is most probably what you want).
-    Of course, if there are "standalone" weapons in the level, they wont be loaded.
-
-    If bLoadBefore is true, an added object already has all attributes set (like it's name). This is most
-    likely the best option, so this is usually true.
-
-    @details
-    The load- and savefunctions have to follow an exactly defined protocol.
-    Loadfunction:
-      The loadfunction gets a pointer to the object.
-      @code
-      void loadfunction(objectclass* pointer);
-      @endcode
-
-    Savefunction:
-      The savefunction gets an index, starting with 0. For every returnvalue != 0, the savefunction
-      gets called again, but with index + 1. It's the functions responsibility to do something smart
-      with the index and to return 0 if all objects were returned.
-      @code
-      objectclass* savefunction(unsigned int index) const;
-      @endcode
-
-      Possible implementation:
-      @code
-        objectclass* savefunction(unsigned int index) const
-        {
-          if (index < number_of_added_objects_)
-            return my_added_objects[index];
-          else
-            return 0;
-        }
-      @endcode
-
-    Example:
-    Possible usage of the macro:
-    @code
-    XMLPortObject(SpaceShip, Weapon, "weapons", addWeapon, getWeapon, xmlelement, mode, false, true);
-    @endcode
-
-    Now you can add weapons through the XML file:
-    @code
-    <SpaceShip someattribute="..." ...>
-      <weapons>
-        <Weapon someattribute="..." ... />
-        <Weapon someattribute="..." ... />
-        <Weapon someattribute="..." ... />
-      </weapons>
-    </SpaceShip>
-    @endcode
-
-    Note that "weapons" is the subsection. This allows you to add more types of sub-objects. In our example,
-    you could add pilots, blinking lights or other stuff. If you don't want a subsection, just use "" (an
-    empty string). Then you can add sub-objects directly into the mainclass.
-*/
-#define XMLPortObjectExtended(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, mode, bApplyLoaderMask, bLoadBefore) \
-    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
-    XMLPortObjectGeneric(xmlcontainer##loadfunction##savefunction, classname, objectclass, sectionname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode, bApplyLoaderMask, bLoadBefore)
-/**
-    @brief This is the same as XMLPortObjectExtended, but you can specify the loadfunction by adding the param types. See XMLPortParamTemplate for more details about the types.
-*/
-#define XMLPortObjectExtendedTemplate(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, mode, bApplyLoaderMask, bLoadBefore, ...) \
-    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<void, classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
-    XMLPortObjectGeneric(xmlcontainer##loadfunction##savefunction, classname, objectclass, sectionname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode, bApplyLoaderMask, bLoadBefore)
-
-// -------------
-// XMLPortObject
-
-/**
-    @brief This is the same as XMLPortObjectExtended, but bApplyLoaderMask is false and bLoadBefore is true by default.
-*/
-#define XMLPortObject(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, mode) \
-    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
-    XMLPortObjectGeneric(xmlcontainer##loadfunction##savefunction, classname, objectclass, sectionname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode, false, true)
-/**
-    @brief This is the same as XMLPortObject, but you can specify the loadfunction by adding the param types. See XMLPortParamTemplate for more details about the types.
-*/
-#define XMLPortObjectTemplate(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, mode, ...) \
-    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<void, classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
-    XMLPortObjectGeneric(xmlcontainer##loadfunction##savefunction, classname, objectclass, sectionname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode, false, true)
-
-// --------------------
-// XMLPortObjectGeneric
-
-/**
-    @brief Generic XMLPortObject macro, that gets called by all other XMLPortObject macros above.
-*/
-#define XMLPortObjectGeneric(containername, classname, objectclass, sectionname, loadexecutor, saveexecutor, xmlelement, mode, bApplyLoaderMask, bLoadBefore) \
-    orxonox::XMLPortClassObjectContainer<classname, objectclass>* containername = (orxonox::XMLPortClassObjectContainer<classname, objectclass>*)(ClassIdentifier<classname>::getIdentifier()->getXMLPortObjectContainer(sectionname)); \
-    if (!containername) \
-    { \
-        containername = new orxonox::XMLPortClassObjectContainer<classname, objectclass>(std::string(sectionname), ClassIdentifier<classname>::getIdentifier(), loadexecutor, saveexecutor, bApplyLoaderMask, bLoadBefore); \
-        ClassIdentifier<classname>::getIdentifier()->addXMLPortObjectContainer(sectionname, containername); \
-    } \
-    containername->port(this, xmlelement, mode)
-
-
-namespace orxonox
-{
-    // ###############################
-    // ###  XMLPortParamContainer  ###
-    // ###############################
-    class _CoreExport XMLPortParamContainer
-    {
-    public:
-        enum ParseResult
-        {
-            PR_not_started,
-            PR_finished,
-            PR_waiting_for_default_values
-        };
-
-        public:
-            XMLPortParamContainer()
-                { this->parseResult_ = PR_not_started; }
-            virtual ~XMLPortParamContainer() {}
-
-            inline const std::string& getName() const
-                { return this->paramname_; }
-
-            inline XMLPortParamContainer& description(const std::string& description)
-                { this->description_ = description; return *this; }
-            inline const std::string& getDescription() const
-                { return this->description_; }
-
-            virtual XMLPortParamContainer& defaultValue(unsigned int index, const MultiType& param) = 0;
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1) = 0;
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1, const MultiType& param2) = 0;
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3) = 0;
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4) = 0;
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) = 0;
-
-        protected:
-            std::string paramname_;
-            ParseResult parseResult_;
-            Identifier* identifier_;
-            BaseObject* owner_;
-            std::string description_;
-    };
-
-    template <class T>
-    class XMLPortClassParamContainer : public XMLPortParamContainer
-    {
-        struct ParseParams
-        {
-            T* object;
-            Element* xmlelement;
-            XMLPort::Mode mode;
-        };
-
-        public:
-            XMLPortClassParamContainer(const std::string& paramname, Identifier* identifier, const ExecutorMemberPtr<T>& loadexecutor, const ExecutorMemberPtr<T>& saveexecutor)
-            {
-                this->paramname_ = paramname;
-                this->identifier_ = identifier;
-                this->loadexecutor_ = loadexecutor;
-                this->saveexecutor_ = saveexecutor;
-            }
-
-            ~XMLPortClassParamContainer()
-            {
-            }
-
-            XMLPortParamContainer& port(BaseObject* owner, T* object, Element& xmlelement, XMLPort::Mode mode)
-            {
-                OrxAssert(owner, "XMLPortParamContainer must have a BaseObject as owner.");
-                this->owner_ = owner;
-                this->parseParams_.object = object;
-                this->parseParams_.xmlelement = &xmlelement;
-                this->parseParams_.mode = mode;
-
-                if ((mode == XMLPort::LoadObject) || (mode == XMLPort::ExpandObject))
-                {
-                    try
-                    {
-                        if (this->owner_->lastLoadedXMLElement_ != &xmlelement)
-                        {
-                            this->owner_->xmlAttributes_.clear();
-                            // Iterate through the attributes manually in order to make them case insensitive
-                            ticpp::Attribute* attribute = xmlelement.FirstAttribute(false);
-                            while (attribute != 0)
-                            {
-                                this->owner_->xmlAttributes_[getLowercase(attribute->Name())] = attribute->Value();
-                                attribute = attribute->Next(false);
-                            }
-                            this->owner_->lastLoadedXMLElement_ = &xmlelement;
-                        }
-                        std::map<std::string, std::string>::const_iterator it = this->owner_->xmlAttributes_.find(getLowercase(this->paramname_));
-                        std::string attributeValue;
-                        if (it != this->owner_->xmlAttributes_.end())
-                            attributeValue = it->second;
-
-                        // TODO: Checking the iterator would be better since then we can have strings with value "" as well.
-                        //       Unfortunately this does not seem to work with the Executor parser yet.
-                        if ((!attributeValue.empty()) || ((mode != XMLPort::ExpandObject) && this->loadexecutor_->allDefaultValuesSet()))
-                        {
-                            COUT(5) << this->owner_->getLoaderIndentation() << "Loading parameter " << this->paramname_ << " in " << this->identifier_->getName() << " (objectname " << this->owner_->getName() << ")." << std::endl << this->owner_->getLoaderIndentation();
-                            int error;
-                            this->loadexecutor_->parse(object, attributeValue, &error, ",");
-                            if (!error || (mode  == XMLPort::ExpandObject))
-                                this->parseResult_ = PR_finished;
-                            else
-                                this->parseResult_ = PR_waiting_for_default_values;
-                        }
-                        else if (mode == XMLPort::ExpandObject)
-                            this->parseResult_ = PR_finished;
-                        else
-                            this->parseResult_ = PR_waiting_for_default_values;
-                    }
-                    catch (ticpp::Exception& ex)
-                    {
-                        COUT(1) << std::endl;
-                        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;
-                        COUT(1) << ex.what() << std::endl;
-                    }
-                }
-                else if (mode == XMLPort::SaveObject)
-                {
-                    if (this->saveexecutor_)
-                    {
-//                        xmlelement.SetAttribute(this->paramname_, "...");
-                    }
-                }
-
-                return (*this);
-            }
-
-            XMLPortParamContainer& port(BaseObject* owner, const ParseParams& parseParams)
-            {
-                return this->port(owner, parseParams.object, *parseParams.xmlelement, parseParams.mode);
-            }
-
-            XMLPortParamContainer& portIfWaitingForDefaultValues(const ParseResult& result, const ParseParams& params)
-            {
-                if (result == PR_waiting_for_default_values)
-                    return this->port(this->owner_, params);
-                else
-                    return (*this);
-            }
-
-            virtual XMLPortParamContainer& defaultValue(unsigned int index, const MultiType& param)
-            {
-                if (!this->loadexecutor_->defaultValueSet(index))
-                    this->loadexecutor_->setDefaultValue(index, param);
-                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
-            }
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1)
-            {
-                if (!this->loadexecutor_->defaultValueSet(0))
-                    this->loadexecutor_->setDefaultValues(param1);
-                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
-            }
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1, const MultiType& param2)
-            {
-                if ((!this->loadexecutor_->defaultValueSet(0)) || (!this->loadexecutor_->defaultValueSet(1)))
-                    this->loadexecutor_->setDefaultValues(param1, param2);
-                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
-            }
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3)
-            {
-                if ((!this->loadexecutor_->defaultValueSet(0)) || (!this->loadexecutor_->defaultValueSet(1)) || (!this->loadexecutor_->defaultValueSet(2)))
-                    this->loadexecutor_->setDefaultValues(param1, param2, param3);
-                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
-            }
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4)
-            {
-                if ((!this->loadexecutor_->defaultValueSet(0)) || (!this->loadexecutor_->defaultValueSet(1)) || (!this->loadexecutor_->defaultValueSet(2)) || (!this->loadexecutor_->defaultValueSet(3)))
-                    this->loadexecutor_->setDefaultValues(param1, param2, param3, param4);
-                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
-            }
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5)
-            {
-                if ((!this->loadexecutor_->defaultValueSet(0)) || (!this->loadexecutor_->defaultValueSet(1)) || (!this->loadexecutor_->defaultValueSet(2)) || (!this->loadexecutor_->defaultValueSet(3)) || (!this->loadexecutor_->defaultValueSet(4)))
-                    this->loadexecutor_->setDefaultValues(param1, param2, param3, param4, param5);
-                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
-            }
-
-        private:
-            ExecutorMemberPtr<T> loadexecutor_;
-            ExecutorMemberPtr<T> saveexecutor_;
-            ParseParams parseParams_;
-    };
-
-
-    // ################################
-    // ###  XMLPortObjectContainer  ###
-    // ################################
-    class _CoreExport XMLPortObjectContainer
-    {
-        public:
-            XMLPortObjectContainer()
-                { this->bApplyLoaderMask_ = false; }
-            virtual ~XMLPortObjectContainer() {}
-
-            XMLPortObjectContainer& port(BaseObject* object, Element& xmlelement, XMLPort::Mode mode);
-
-            virtual void callLoadExecutor(BaseObject* object, BaseObject* newObject) = 0;
-
-            inline const std::string& getName() const
-                { return this->sectionname_; }
-
-            inline XMLPortObjectContainer& description(const std::string& description)
-                { this->description_ = description; return *this; }
-            const std::string& getDescription() const
-                { return this->description_; }
-
-            bool identifierIsIncludedInLoaderMask(const Identifier* identifier);
-
-        protected:
-            std::string sectionname_;
-            bool bApplyLoaderMask_;
-            bool bLoadBefore_;
-            Identifier* identifier_;
-            Identifier* objectIdentifier_;
-            std::string description_;
-    };
-
-    template <class T, class O>
-    class XMLPortClassObjectContainer : public XMLPortObjectContainer
-    {
-        public:
-            XMLPortClassObjectContainer(const std::string& sectionname, Identifier* identifier, const ExecutorMemberPtr<T>& loadexecutor, const ExecutorMemberPtr<T>& saveexecutor, bool bApplyLoaderMask, bool bLoadBefore)
-            {
-                this->sectionname_ = sectionname;
-                this->identifier_ = identifier;
-                assert(identifier->isA(ClassIdentifier<T>::getIdentifier()));
-                this->objectIdentifier_ = ClassIdentifier<O>::getIdentifier();
-                this->loadexecutor_ = loadexecutor;
-                this->saveexecutor_ = saveexecutor;
-                this->bApplyLoaderMask_ = bApplyLoaderMask;
-                this->bLoadBefore_ = bLoadBefore;
-            }
-
-            ~XMLPortClassObjectContainer()
-            {
-            }
-
-            void callLoadExecutor(BaseObject* object, BaseObject* newObject)
-            {
-                T* castObject = orxonox_cast<T*>(object);
-                assert(castObject);
-                O* castNewObject = orxonox_cast<O*>(newObject);
-                assert(castNewObject);
-
-                (*this->loadexecutor_)(castObject, castNewObject);
-            }
-
-        private:
-            ExecutorMemberPtr<T> loadexecutor_;
-            ExecutorMemberPtr<T> saveexecutor_;
-    };
-
-
-    // ####################################
-    // ###  XMLPortVariableHelperClass  ###
-    // ####################################
-    /**
-    @brief
-        Helper class to load and save simple variables with XMLPort.
-
-        getLoader and getSaver were necessary to get the type T with
-        the help of template function type deduction (const T& is unused).
-        These functions return the adress of save<T> or load<T>.
-    */
-    class XMLPortVariableHelperClass
-    {
-        public:
-            XMLPortVariableHelperClass(void* var)
-                : variable_(var)
-                { }
-
-            template <class T>
-            void load(const T& value)
-                { *static_cast<T*>(this->variable_) = value; }
-
-            template <class T>
-            const T& save()
-                { return *static_cast<T*>(this->variable_); }
-
-            template <class T>
-            static void (XMLPortVariableHelperClass::*getLoader(const T& var))(const T& value)
-                { return &XMLPortVariableHelperClass::load<T>; }
-
-            template <class T>
-            static const T& (XMLPortVariableHelperClass::*getSaver(const T& var))()
-                { return &XMLPortVariableHelperClass::save<T>; }
-
-        private:
-            void* variable_;
-    };
-}
-
-#endif /* _XMLPort_H__ */
