Changeset 9797 in orxonox.OLD for branches/new_class_id
- Timestamp:
- Sep 24, 2006, 11:34:19 AM (18 years ago)
- 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 20 20 21 21 #include <algorithm> 22 #include < assert.h>22 #include <cassert> 23 23 24 24 ObjectListDefinition(NewResourceManager); -
branches/new_class_id/src/lib/util/loading/new_resource_manager.h
r9795 r9797 14 14 ObjectListDeclaration(NewResourceManager); 15 15 public: 16 virtual ~NewResourceManager();17 16 /** @returns a Pointer to the only object of this Class */ 18 17 inline static NewResourceManager* getInstance() { if (!_singletonRef) _singletonRef = new NewResourceManager(); return _singletonRef; }; 18 inline static void deleteInstance() { if (_singletonRef) delete _singletonRef; }; 19 19 20 20 … … 26 26 void registerType(Resources::Type* type); 27 27 28 void addKeepLevel(unsigned int i, const std::string& keepLevel); 28 29 29 30 const std::vector<Resources::Type*> resourceTypes() const { return _resourceTypes; }; … … 44 45 private: 45 46 NewResourceManager(); 47 virtual ~NewResourceManager(); 46 48 47 49 private: 48 static NewResourceManager* _singletonRef; //!< singleton Reference50 static NewResourceManager* _singletonRef; //!< singleton Reference 49 51 50 std::vector<Resources::Type*> _resourceTypes;52 std::vector<Resources::Type*> _resourceTypes; 51 53 //! GLOBALS 52 Directory _mainGlobalPath;53 std::vector<Directory> _globalPaths;54 Directory _mainGlobalPath; 55 std::vector<Directory> _globalPaths; 54 56 55 57 std::vector<Resources::KeepLevel> _keepLevels; 56 58 }; 57 59 -
branches/new_class_id/src/orxonox.cc
r9796 r9797 41 41 #include "sound_engine.h" 42 42 #include "util/loading/resource_manager.h" 43 #include "util/loading/new_resource_manager.h" 44 43 45 #include "cd_engine.h" 44 #include "text_engine.h"45 46 #include "event_handler.h" 46 47 … … 128 129 129 130 // handlers 130 delete ResourceManager::getInstance(); // deletes the Resource Manager131 NewResourceManager::deleteInstance(); // deletes the Resource Manager 131 132 132 133 // engines … … 327 328 328 329 //#include "util/loading/dynamic_loader.h" 329 #include "loading/new_resource_manager.h"330 330 /** 331 331 * initializes and loads resource files … … 352 352 PRINTF(1)("The DataDirectory %s could not be verified\n\nh" \ 353 353 "!!! 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(), 355 355 this->configFileName.c_str(), 356 356 CONFIG_SECTION_GENERAL,
Note: See TracChangeset
for help on using the changeset viewer.