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 9799)
+++ branches/new_class_id/src/lib/util/loading/new_resource_manager.h	(revision 9800)
@@ -10,54 +10,59 @@
 #include "filesys/directory.h"
 
-class NewResourceManager : public BaseObject
+namespace Resources
 {
-  ObjectListDeclaration(NewResourceManager);
-public:
-  /** @returns a Pointer to the only object of this Class */
-  inline static NewResourceManager* getInstance() { if (!_singletonRef) _singletonRef = new NewResourceManager();  return _singletonRef; };
+
+  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; };
   inline static void deleteInstance() { if (_singletonRef) delete _singletonRef; };
 
 
-  void setMainGlobalPath(const Directory& directory);
-  void addGlobalPath(const Directory& directory);
+    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);
+    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;
+    unsigned int addKeepLevelName(const std::string& keepLevelName);
+    unsigned int getKeepLevelID(const std::string& keepLevelName) const;
+    const std::string& getKeepLevelName(unsigned int keepLevelID) const;
 
   const std::vector<Resources::Type*> resourceTypes() const { return _resourceTypes; };
-  const Directory& mainGlobalPath() const { return _mainGlobalPath; };
-  /** @returns all global paths without mainGlobalPath */
-  const std::vector<Directory>& globalPaths() const { return _globalPaths; };
+    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);
+    bool checkFileInMainPath(const File& fileInside);
 
-  bool unloadAllByPriority();
+    bool unloadAllByKeepLevel(const Resources::KeepLevel& keepLevel);
 
-  void debug() const;
+    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();
+    // 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
+  private:
+    static NewResourceManager*         _singletonRef;       //!< singleton Reference
 
-  std::vector<Resources::Type*>      _resourceTypes;
-  //! GLOBALS
-  Directory                          _mainGlobalPath;
-  std::vector<Directory>             _globalPaths;
+    std::vector<Resources::Type*>      _resourceTypes;
+    //! GLOBALS
+    Directory                          _mainGlobalPath;
+    std::vector<Directory>             _globalPaths;
 
-  std::vector<std::string>           _keepLevelNames;
-};
+    std::vector<std::string>           _keepLevelNames;
+  };
+
+}
 
 #endif /* _RESOURCE_MANAGER_H */
