Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 27, 2006, 11:13:17 PM (18 years ago)
Author:
bensch
Message:

some more functionality for the unloading of resources

File:
1 edited

Legend:

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

    r9836 r9845  
    6060  void ResourceManager::registerType(Resources::Type* type)
    6161  {
    62     if(type->id() == -1)
    63     {
    64       type->setID(this->_resourceTypes.size());
    65       this->_resourceTypes.push_back(type);
    66       PRINTF(5)("ResourceType '%s' with ID %d added\n", type->storedClassName().c_str(), type->id());
    67     }
     62    this->_resourceTypes.push_back(type);
     63    PRINTF(5)("ResourceType '%s' added\n", type->storedClassName().c_str());
    6864  }
    6965
     
    7470    {
    7571      this->_resourceTypes.erase(it);
    76       PRINTF(5)("ResourceType '%s' with ID %d removed\n", type->storedClassName().c_str(), type->id());
     72      PRINTF(5)("ResourceType '%s' removed\n", type->storedClassName().c_str());
    7773    }
    7874  }
     
    149145
    150146
     147  void ResourceManager::unloadAllBelowKeepLevel(const Resources::KeepLevel& keepLevel)
     148  {
     149    std::vector<Resources::Type*>::const_iterator it;
     150    for (it = this->_resourceTypes.begin(); it != this->_resourceTypes.end(); ++it)
     151    {
     152      (*it)->unloadAllBelowKeepLevel(keepLevel);
     153    }
     154  }
     155
     156
    151157  /**
    152158   * @brief outputs debug information about the ResourceManager
Note: See TracChangeset for help on using the changeset viewer.