Index: branches/new_class_id/src/lib/util/loading/new_resource_manager.cc
===================================================================
--- branches/new_class_id/src/lib/util/loading/new_resource_manager.cc	(revision 9834)
+++ 	(revision )
@@ -1,182 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   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, or (at your option)
-   any later version.
-
-   ### File Specific:
-   main-programmer: Benjamin Grauer
-   co-programmer: Patrick Boenzli
-*/
-
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOAD
-
-#include "new_resource_manager.h"
-#include "debug.h"
-
-#include <algorithm>
-#include <cassert>
-
-
-namespace Resources
-{
-  ObjectListDefinition(NewResourceManager);
-  //! Singleton Reference to the NewResourceManager
-  NewResourceManager* NewResourceManager::_singletonRef = NULL;
-
-
-  /**
-   * @brief standard constructor
-  */
-  NewResourceManager::NewResourceManager ()
-  {
-    this->registerObject(this, NewResourceManager::_objectList);
-    this->setName("NewResourceManager");
-    this->_mainGlobalPath = Directory("./");
-  }
-
-
-  /**
-   * @brief standard destructor
-  */
-  NewResourceManager::~NewResourceManager ()
-  {
-    // deleting the Resources-List
-    //this->unloadAllByPriority(RP_GAME);
-
-    //   if (!this->resourceList.empty())
-    //     PRINTF(1)("Not removed all Resources, since there are still %d resources registered\n", this->resourceList.size());
-
-    NewResourceManager::_singletonRef = NULL;
-  }
-
-
-
-
-  void NewResourceManager::registerType(Resources::Type* type)
-  {
-    if(type->id() == -1)
-    {
-      type->setID(this->_resourceTypes.size());
-      this->_resourceTypes.push_back(type);
-      PRINTF(5)("ResourceType '%s' with ID %d added\n", type->storedClassName().c_str(), type->id());
-    }
-  }
-
-  void NewResourceManager::unregisterType(Resources::Type* type)
-  {
-    std::vector<Resources::Type*>::iterator it = std::find (this->_resourceTypes.begin(), this->_resourceTypes.end(), type);
-    if (it != this->_resourceTypes.end())
-    {
-      this->_resourceTypes.erase(it);
-      PRINTF(5)("ResourceType '%s' with ID %d removed\n", type->storedClassName().c_str(), type->id());
-    }
-  }
-
-
-  void NewResourceManager::setMainGlobalPath(const Directory& directory)
-  {
-    this->_mainGlobalPath = directory;
-    this->_mainGlobalPath.open();
-  }
-
-  void NewResourceManager::addGlobalPath(const Directory& directory)
-  {
-    std::vector<Directory>::const_iterator it = std::find(this->_globalPaths.begin(), this->_globalPaths.end(), directory);
-    if (it == this->_globalPaths.end())
-      this->_globalPaths.push_back(directory);
-  }
-
-
-  bool NewResourceManager::addResourcePath(const std::string& resourceName, const std::string& pathName)
-  {
-    std::vector<Resources::Type*>::iterator it;
-    for (it = this->_resourceTypes.begin(); it != this->_resourceTypes.end(); ++it)
-      if (*(*it) == resourceName)
-        return (*it)->addResourcePath(pathName);
-    PRINTF(2)("ResourcePath %s could not be added to the ResourceType %s\n", pathName.c_str(), resourceName.c_str());
-    return false;
-  }
-
-  bool NewResourceManager::addResourceSubPath(const std::string& resourceName, const std::string& pathName)
-  {
-    std::vector<Resources::Type*>::iterator it;
-    for (it = this->_resourceTypes.begin(); it != this->_resourceTypes.end(); ++it)
-      if (*(*it) == resourceName)
-        return (*it)->addResourceSubPath(pathName);
-    PRINTF(2)("ResourceSubPath %s could not be added to the ResourceType %s\n", pathName.c_str(), resourceName.c_str());
-    return false;
-  }
-
-
-
-  bool NewResourceManager::checkFileInMainPath(const File& fileInside)
-  {
-    return (this->_mainGlobalPath + fileInside).exists();
-  }
-
-  std::string NewResourceManager::prependAbsoluteMainPath(const std::string& fileName)
-  {
-    return (this->_mainGlobalPath + File(fileName)).name();
-  }
-
-
-  unsigned int NewResourceManager::addKeepLevelName(const std::string& keepLevelName)
-  {
-    this->_keepLevelNames.push_back(keepLevelName);
-    return _keepLevelNames.size()-1;
-  }
-
-  unsigned int NewResourceManager::getKeepLevelID(const std::string& keepLevelName) const
-  {
-    for (unsigned int i = 0; i < this->_keepLevelNames.size(); ++i)
-      if (this->_keepLevelNames[i] == keepLevelName)
-        return i;
-
-    PRINTF(2)("KeepLevel '%s' not found. Using 0 instead\n", keepLevelName.c_str());
-    return 0;
-  }
-
-  const std::string& NewResourceManager::getKeepLevelName(unsigned int keepLevelID) const
-  {
-    assert(keepLevelID < this->_keepLevelNames.size());
-    return this->_keepLevelNames[keepLevelID];
-  }
-
-
-  /**
-   * @brief outputs debug information about the NewResourceManager
-   */
-  void NewResourceManager::debug() const
-  {
-    PRINT(0)("=RM===================================\n");
-    PRINT(0)("= RESOURCE-MANAGER DEBUG INFORMATION =\n");
-    PRINT(0)("======================================\n");
-    PRINT(0)(" MainGlobal search path is %s\n", this->_mainGlobalPath.name().c_str());
-    if(!this->_globalPaths.empty())
-    {
-      PRINT(0)(" Additional Global search Paths are: ");
-      for (unsigned int i = 0; i < this->_globalPaths.size(); ++i)
-        PRINT(0)("'%s' ", this->_globalPaths[i].name().c_str());
-      PRINT(0)("\n");
-    }
-    PRINT(0)(" Listing %d Types: \n", this->_resourceTypes.size());
-    std::vector<Resources::Type*>::const_iterator it;
-    for (it = this->_resourceTypes.begin(); it != this->_resourceTypes.end(); ++it)
-    {
-      (*it)->debug();
-      if (it != --this->_resourceTypes.end())
-        PRINT(0)(" ------------------------------------\n ");
-    }
-
-    PRINT(0)("KeepLevels are: ");
-    for (unsigned int i = 0; i < this->_keepLevelNames.size(); ++i)
-      PRINT(0)("%d:'%s'  ", i, this->_keepLevelNames[i].c_str());
-    PRINT(0)("\n");
-    PRINT(0)("==================================RM==\n");
-  }
-}
Index: branches/new_class_id/src/lib/util/loading/new_resource_manager.h
===================================================================
--- branches/new_class_id/src/lib/util/loading/new_resource_manager.h	(revision 9834)
+++ 	(revision )
@@ -1,71 +1,0 @@
-/*!
- * @file new_resource_manager.h
- */
-
-#ifndef _NEW_RESOURCE_MANAGER_H
-#define _NEW_RESOURCE_MANAGER_H
-
-#include "resource.h"
-#include "filesys/file.h"
-#include "filesys/directory.h"
-
-namespace Resources
-{
-
-  class NewResourceManager : public BaseObject
-  {
-    ObjectListDeclaration(NewResourceManager);
-  public:
-    /** @returns a Pointer to the only object of this Class */
-    inline static NewResourceManager* getInstance() { if (!_singletonRef) _singletonRef = new NewResourceManager();  return _singletonRef; };
-    /** @brief deletes the Instance if it exists. */
-    inline static void deleteInstance() { if (_singletonRef) delete _singletonRef; };
-
-
-    void setMainGlobalPath(const Directory& directory);
-    void addGlobalPath(const Directory& directory);
-
-    bool addResourcePath(const std::string& resourceName, const std::string& pathName);
-    bool addResourceSubPath(const std::string& resourceName, const std::string& pathName);
-    void registerType(Resources::Type* type);
-    void unregisterType(Resources::Type* type);
-
-    unsigned int addKeepLevelName(const std::string& keepLevelName);
-    unsigned int getKeepLevelID(const std::string& keepLevelName) const;
-    const std::string& getKeepLevelName(unsigned int keepLevelID) const;
-
-    /** @returns the Types of Resources */
-    const std::vector<Resources::Type*> resourceTypes() const { return _resourceTypes; };
-    /** @returns the main global search Path */
-    const Directory& mainGlobalPath() const { return _mainGlobalPath; };
-    /** @returns all global paths without mainGlobalPath */
-    const std::vector<Directory>& globalPaths() const { return _globalPaths; };
-
-
-    bool checkFileInMainPath(const File& fileInside);
-    std::string prependAbsoluteMainPath(const std::string& fileName);
-
-    bool unloadAllByKeepLevel(const Resources::KeepLevel& keepLevel);
-
-    void debug() const;
-
-    // utility functions for handling files in and around the data-directory
-    static std::string getFullName(const std::string& fileName);
-    static bool isInDataDir(const std::string& fileName);
-  private:
-    NewResourceManager();
-    virtual ~NewResourceManager();
-
-  private:
-    static NewResourceManager*         _singletonRef;       //!< singleton Reference
-
-    Directory                          _mainGlobalPath;     //!< The main include directory (default at "./")
-    std::vector<Directory>             _globalPaths;        //!< Additional Global include directories.
-
-    std::vector<Resources::Type*>      _resourceTypes;      //!< A Vector of all the stored ResourceTypes @see Resources::Type
-    std::vector<std::string>           _keepLevelNames;     //!< Names of KeepLevels @see Resources::KeepLevel
-  };
-
-}
-
-#endif /* _RESOURCE_MANAGER_H */
Index: branches/new_class_id/src/lib/util/loading/resource_manager.cc
===================================================================
--- branches/new_class_id/src/lib/util/loading/resource_manager.cc	(revision 9835)
+++ branches/new_class_id/src/lib/util/loading/resource_manager.cc	(revision 9835)
@@ -0,0 +1,182 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   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, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Grauer
+   co-programmer: Patrick Boenzli
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOAD
+
+#include "new_resource_manager.h"
+#include "debug.h"
+
+#include <algorithm>
+#include <cassert>
+
+
+namespace Resources
+{
+  ObjectListDefinition(NewResourceManager);
+  //! Singleton Reference to the NewResourceManager
+  NewResourceManager* NewResourceManager::_singletonRef = NULL;
+
+
+  /**
+   * @brief standard constructor
+  */
+  NewResourceManager::NewResourceManager ()
+  {
+    this->registerObject(this, NewResourceManager::_objectList);
+    this->setName("NewResourceManager");
+    this->_mainGlobalPath = Directory("./");
+  }
+
+
+  /**
+   * @brief standard destructor
+  */
+  NewResourceManager::~NewResourceManager ()
+  {
+    // deleting the Resources-List
+    //this->unloadAllByPriority(RP_GAME);
+
+    //   if (!this->resourceList.empty())
+    //     PRINTF(1)("Not removed all Resources, since there are still %d resources registered\n", this->resourceList.size());
+
+    NewResourceManager::_singletonRef = NULL;
+  }
+
+
+
+
+  void NewResourceManager::registerType(Resources::Type* type)
+  {
+    if(type->id() == -1)
+    {
+      type->setID(this->_resourceTypes.size());
+      this->_resourceTypes.push_back(type);
+      PRINTF(5)("ResourceType '%s' with ID %d added\n", type->storedClassName().c_str(), type->id());
+    }
+  }
+
+  void NewResourceManager::unregisterType(Resources::Type* type)
+  {
+    std::vector<Resources::Type*>::iterator it = std::find (this->_resourceTypes.begin(), this->_resourceTypes.end(), type);
+    if (it != this->_resourceTypes.end())
+    {
+      this->_resourceTypes.erase(it);
+      PRINTF(5)("ResourceType '%s' with ID %d removed\n", type->storedClassName().c_str(), type->id());
+    }
+  }
+
+
+  void NewResourceManager::setMainGlobalPath(const Directory& directory)
+  {
+    this->_mainGlobalPath = directory;
+    this->_mainGlobalPath.open();
+  }
+
+  void NewResourceManager::addGlobalPath(const Directory& directory)
+  {
+    std::vector<Directory>::const_iterator it = std::find(this->_globalPaths.begin(), this->_globalPaths.end(), directory);
+    if (it == this->_globalPaths.end())
+      this->_globalPaths.push_back(directory);
+  }
+
+
+  bool NewResourceManager::addResourcePath(const std::string& resourceName, const std::string& pathName)
+  {
+    std::vector<Resources::Type*>::iterator it;
+    for (it = this->_resourceTypes.begin(); it != this->_resourceTypes.end(); ++it)
+      if (*(*it) == resourceName)
+        return (*it)->addResourcePath(pathName);
+    PRINTF(2)("ResourcePath %s could not be added to the ResourceType %s\n", pathName.c_str(), resourceName.c_str());
+    return false;
+  }
+
+  bool NewResourceManager::addResourceSubPath(const std::string& resourceName, const std::string& pathName)
+  {
+    std::vector<Resources::Type*>::iterator it;
+    for (it = this->_resourceTypes.begin(); it != this->_resourceTypes.end(); ++it)
+      if (*(*it) == resourceName)
+        return (*it)->addResourceSubPath(pathName);
+    PRINTF(2)("ResourceSubPath %s could not be added to the ResourceType %s\n", pathName.c_str(), resourceName.c_str());
+    return false;
+  }
+
+
+
+  bool NewResourceManager::checkFileInMainPath(const File& fileInside)
+  {
+    return (this->_mainGlobalPath + fileInside).exists();
+  }
+
+  std::string NewResourceManager::prependAbsoluteMainPath(const std::string& fileName)
+  {
+    return (this->_mainGlobalPath + File(fileName)).name();
+  }
+
+
+  unsigned int NewResourceManager::addKeepLevelName(const std::string& keepLevelName)
+  {
+    this->_keepLevelNames.push_back(keepLevelName);
+    return _keepLevelNames.size()-1;
+  }
+
+  unsigned int NewResourceManager::getKeepLevelID(const std::string& keepLevelName) const
+  {
+    for (unsigned int i = 0; i < this->_keepLevelNames.size(); ++i)
+      if (this->_keepLevelNames[i] == keepLevelName)
+        return i;
+
+    PRINTF(2)("KeepLevel '%s' not found. Using 0 instead\n", keepLevelName.c_str());
+    return 0;
+  }
+
+  const std::string& NewResourceManager::getKeepLevelName(unsigned int keepLevelID) const
+  {
+    assert(keepLevelID < this->_keepLevelNames.size());
+    return this->_keepLevelNames[keepLevelID];
+  }
+
+
+  /**
+   * @brief outputs debug information about the NewResourceManager
+   */
+  void NewResourceManager::debug() const
+  {
+    PRINT(0)("=RM===================================\n");
+    PRINT(0)("= RESOURCE-MANAGER DEBUG INFORMATION =\n");
+    PRINT(0)("======================================\n");
+    PRINT(0)(" MainGlobal search path is %s\n", this->_mainGlobalPath.name().c_str());
+    if(!this->_globalPaths.empty())
+    {
+      PRINT(0)(" Additional Global search Paths are: ");
+      for (unsigned int i = 0; i < this->_globalPaths.size(); ++i)
+        PRINT(0)("'%s' ", this->_globalPaths[i].name().c_str());
+      PRINT(0)("\n");
+    }
+    PRINT(0)(" Listing %d Types: \n", this->_resourceTypes.size());
+    std::vector<Resources::Type*>::const_iterator it;
+    for (it = this->_resourceTypes.begin(); it != this->_resourceTypes.end(); ++it)
+    {
+      (*it)->debug();
+      if (it != --this->_resourceTypes.end())
+        PRINT(0)(" ------------------------------------\n ");
+    }
+
+    PRINT(0)("KeepLevels are: ");
+    for (unsigned int i = 0; i < this->_keepLevelNames.size(); ++i)
+      PRINT(0)("%d:'%s'  ", i, this->_keepLevelNames[i].c_str());
+    PRINT(0)("\n");
+    PRINT(0)("==================================RM==\n");
+  }
+}
Index: branches/new_class_id/src/lib/util/loading/resource_manager.h
===================================================================
--- branches/new_class_id/src/lib/util/loading/resource_manager.h	(revision 9835)
+++ branches/new_class_id/src/lib/util/loading/resource_manager.h	(revision 9835)
@@ -0,0 +1,71 @@
+/*!
+ * @file new_resource_manager.h
+ */
+
+#ifndef _NEW_RESOURCE_MANAGER_H
+#define _NEW_RESOURCE_MANAGER_H
+
+#include "resource.h"
+#include "filesys/file.h"
+#include "filesys/directory.h"
+
+namespace Resources
+{
+
+  class NewResourceManager : public BaseObject
+  {
+    ObjectListDeclaration(NewResourceManager);
+  public:
+    /** @returns a Pointer to the only object of this Class */
+    inline static NewResourceManager* getInstance() { if (!_singletonRef) _singletonRef = new NewResourceManager();  return _singletonRef; };
+    /** @brief deletes the Instance if it exists. */
+    inline static void deleteInstance() { if (_singletonRef) delete _singletonRef; };
+
+
+    void setMainGlobalPath(const Directory& directory);
+    void addGlobalPath(const Directory& directory);
+
+    bool addResourcePath(const std::string& resourceName, const std::string& pathName);
+    bool addResourceSubPath(const std::string& resourceName, const std::string& pathName);
+    void registerType(Resources::Type* type);
+    void unregisterType(Resources::Type* type);
+
+    unsigned int addKeepLevelName(const std::string& keepLevelName);
+    unsigned int getKeepLevelID(const std::string& keepLevelName) const;
+    const std::string& getKeepLevelName(unsigned int keepLevelID) const;
+
+    /** @returns the Types of Resources */
+    const std::vector<Resources::Type*> resourceTypes() const { return _resourceTypes; };
+    /** @returns the main global search Path */
+    const Directory& mainGlobalPath() const { return _mainGlobalPath; };
+    /** @returns all global paths without mainGlobalPath */
+    const std::vector<Directory>& globalPaths() const { return _globalPaths; };
+
+
+    bool checkFileInMainPath(const File& fileInside);
+    std::string prependAbsoluteMainPath(const std::string& fileName);
+
+    bool unloadAllByKeepLevel(const Resources::KeepLevel& keepLevel);
+
+    void debug() const;
+
+    // utility functions for handling files in and around the data-directory
+    static std::string getFullName(const std::string& fileName);
+    static bool isInDataDir(const std::string& fileName);
+  private:
+    NewResourceManager();
+    virtual ~NewResourceManager();
+
+  private:
+    static NewResourceManager*         _singletonRef;       //!< singleton Reference
+
+    Directory                          _mainGlobalPath;     //!< The main include directory (default at "./")
+    std::vector<Directory>             _globalPaths;        //!< Additional Global include directories.
+
+    std::vector<Resources::Type*>      _resourceTypes;      //!< A Vector of all the stored ResourceTypes @see Resources::Type
+    std::vector<std::string>           _keepLevelNames;     //!< Names of KeepLevels @see Resources::KeepLevel
+  };
+
+}
+
+#endif /* _RESOURCE_MANAGER_H */
