Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9797 in orxonox.OLD for branches/new_class_id


Ignore:
Timestamp:
Sep 24, 2006, 11:34:19 AM (18 years ago)
Author:
bensch
Message:

cleaner deletion of NewResourceManager

Location:
branches/new_class_id/src
Files:
3 edited

Legend:

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

    r9795 r9797  
    2020
    2121#include <algorithm>
    22 #include <assert.h>
     22#include <cassert>
    2323
    2424ObjectListDefinition(NewResourceManager);
  • branches/new_class_id/src/lib/util/loading/new_resource_manager.h

    r9795 r9797  
    1414  ObjectListDeclaration(NewResourceManager);
    1515public:
    16   virtual ~NewResourceManager();
    1716  /** @returns a Pointer to the only object of this Class */
    1817  inline static NewResourceManager* getInstance() { if (!_singletonRef) _singletonRef = new NewResourceManager();  return _singletonRef; };
     18  inline static void deleteInstance() { if (_singletonRef) delete _singletonRef; };
    1919
    2020
     
    2626  void registerType(Resources::Type* type);
    2727
     28  void addKeepLevel(unsigned int i, const std::string& keepLevel);
    2829
    2930  const std::vector<Resources::Type*> resourceTypes() const { return _resourceTypes; };
     
    4445private:
    4546  NewResourceManager();
     47  virtual ~NewResourceManager();
    4648
    4749private:
    48   static NewResourceManager*       _singletonRef;       //!< singleton Reference
     50  static NewResourceManager*         _singletonRef;       //!< singleton Reference
    4951
    50   std::vector<Resources::Type*>    _resourceTypes;
     52  std::vector<Resources::Type*>      _resourceTypes;
    5153  //! GLOBALS
    52   Directory                        _mainGlobalPath;
    53   std::vector<Directory>           _globalPaths;
     54  Directory                          _mainGlobalPath;
     55  std::vector<Directory>             _globalPaths;
    5456
    55 
     57  std::vector<Resources::KeepLevel>  _keepLevels;
    5658};
    5759
  • branches/new_class_id/src/orxonox.cc

    r9796 r9797  
    4141#include "sound_engine.h"
    4242#include "util/loading/resource_manager.h"
     43#include "util/loading/new_resource_manager.h"
     44
    4345#include "cd_engine.h"
    44 #include "text_engine.h"
    4546#include "event_handler.h"
    4647
     
    128129
    129130  // handlers
    130   delete ResourceManager::getInstance(); // deletes the Resource Manager
     131  NewResourceManager::deleteInstance(); // deletes the Resource Manager
    131132
    132133  // engines
     
    327328
    328329//#include "util/loading/dynamic_loader.h"
    329 #include "loading/new_resource_manager.h"
    330330/**
    331331 * initializes and loads resource files
     
    352352    PRINTF(1)("The DataDirectory %s could not be verified\n\nh" \
    353353              "!!!  Please Change in File %s Section %s Entry %s to a suitable value !!!\n",
    354               NewResourceManager::getInstance()->mainGlobalPath().c_str(),
     354              NewResourceManager::getInstance()->mainGlobalPath().name().c_str(),
    355355              this->configFileName.c_str(),
    356356              CONFIG_SECTION_GENERAL,
Note: See TracChangeset for help on using the changeset viewer.