Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 26, 2006, 5:16:10 PM (18 years ago)
Author:
bensch
Message:

orxonox/new_class_id: Taken out the old ResourceManager.
On the way, i had to desintegrate the old MD3-model loading process (via ResourceManager) MD3 is untouched, but also not loaded anymore neither from ResourceMangers nor from the WorldEntity

@patrick: MD3-ModelLoading class must be implemented… this should be quite easy, with the way MD3 is, and the new Resource-paradigm
cheers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/util/loading/resource_manager.cc

    r9835 r9836  
    1616#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOAD
    1717
    18 #include "new_resource_manager.h"
     18#include "resource_manager.h"
    1919#include "debug.h"
    2020
     
    2525namespace Resources
    2626{
    27   ObjectListDefinition(NewResourceManager);
    28   //! Singleton Reference to the NewResourceManager
    29   NewResourceManager* NewResourceManager::_singletonRef = NULL;
     27  ObjectListDefinition(ResourceManager);
     28  //! Singleton Reference to the ResourceManager
     29  ResourceManager* ResourceManager::_singletonRef = NULL;
    3030
    3131
     
    3333   * @brief standard constructor
    3434  */
    35   NewResourceManager::NewResourceManager ()
     35  ResourceManager::ResourceManager ()
    3636  {
    37     this->registerObject(this, NewResourceManager::_objectList);
    38     this->setName("NewResourceManager");
     37    this->registerObject(this, ResourceManager::_objectList);
     38    this->setName("ResourceManager");
    3939    this->_mainGlobalPath = Directory("./");
    4040  }
     
    4444   * @brief standard destructor
    4545  */
    46   NewResourceManager::~NewResourceManager ()
     46  ResourceManager::~ResourceManager ()
    4747  {
    4848    // deleting the Resources-List
     
    5252    //     PRINTF(1)("Not removed all Resources, since there are still %d resources registered\n", this->resourceList.size());
    5353
    54     NewResourceManager::_singletonRef = NULL;
     54    ResourceManager::_singletonRef = NULL;
    5555  }
    5656
     
    5858
    5959
    60   void NewResourceManager::registerType(Resources::Type* type)
     60  void ResourceManager::registerType(Resources::Type* type)
    6161  {
    6262    if(type->id() == -1)
     
    6868  }
    6969
    70   void NewResourceManager::unregisterType(Resources::Type* type)
     70  void ResourceManager::unregisterType(Resources::Type* type)
    7171  {
    7272    std::vector<Resources::Type*>::iterator it = std::find (this->_resourceTypes.begin(), this->_resourceTypes.end(), type);
     
    7979
    8080
    81   void NewResourceManager::setMainGlobalPath(const Directory& directory)
     81  void ResourceManager::setMainGlobalPath(const Directory& directory)
    8282  {
    8383    this->_mainGlobalPath = directory;
     
    8585  }
    8686
    87   void NewResourceManager::addGlobalPath(const Directory& directory)
     87  void ResourceManager::addGlobalPath(const Directory& directory)
    8888  {
    8989    std::vector<Directory>::const_iterator it = std::find(this->_globalPaths.begin(), this->_globalPaths.end(), directory);
     
    9393
    9494
    95   bool NewResourceManager::addResourcePath(const std::string& resourceName, const std::string& pathName)
     95  bool ResourceManager::addResourcePath(const std::string& resourceName, const std::string& pathName)
    9696  {
    9797    std::vector<Resources::Type*>::iterator it;
     
    103103  }
    104104
    105   bool NewResourceManager::addResourceSubPath(const std::string& resourceName, const std::string& pathName)
     105  bool ResourceManager::addResourceSubPath(const std::string& resourceName, const std::string& pathName)
    106106  {
    107107    std::vector<Resources::Type*>::iterator it;
     
    115115
    116116
    117   bool NewResourceManager::checkFileInMainPath(const File& fileInside)
     117  bool ResourceManager::checkFileInMainPath(const File& fileInside)
    118118  {
    119119    return (this->_mainGlobalPath + fileInside).exists();
    120120  }
    121121
    122   std::string NewResourceManager::prependAbsoluteMainPath(const std::string& fileName)
     122  std::string ResourceManager::prependAbsoluteMainPath(const std::string& fileName)
    123123  {
    124124    return (this->_mainGlobalPath + File(fileName)).name();
     
    126126
    127127
    128   unsigned int NewResourceManager::addKeepLevelName(const std::string& keepLevelName)
     128  unsigned int ResourceManager::addKeepLevelName(const std::string& keepLevelName)
    129129  {
    130130    this->_keepLevelNames.push_back(keepLevelName);
     
    132132  }
    133133
    134   unsigned int NewResourceManager::getKeepLevelID(const std::string& keepLevelName) const
     134  unsigned int ResourceManager::getKeepLevelID(const std::string& keepLevelName) const
    135135  {
    136136    for (unsigned int i = 0; i < this->_keepLevelNames.size(); ++i)
     
    142142  }
    143143
    144   const std::string& NewResourceManager::getKeepLevelName(unsigned int keepLevelID) const
     144  const std::string& ResourceManager::getKeepLevelName(unsigned int keepLevelID) const
    145145  {
    146146    assert(keepLevelID < this->_keepLevelNames.size());
     
    150150
    151151  /**
    152    * @brief outputs debug information about the NewResourceManager
     152   * @brief outputs debug information about the ResourceManager
    153153   */
    154   void NewResourceManager::debug() const
     154  void ResourceManager::debug() const
    155155  {
    156156    PRINT(0)("=RM===================================\n");
Note: See TracChangeset for help on using the changeset viewer.