Changeset 11016 for code/trunk/src/libraries/core/module/PluginManager.cc
- Timestamp:
- Jan 2, 2016, 4:06:30 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/module/PluginManager.cc
r11015 r11016 34 34 #include "Plugin.h" 35 35 #include "PluginReference.h" 36 #include "core/CoreIncludes.h" 36 37 #include "core/ApplicationPaths.h" 37 38 #include "core/command/ConsoleCommandIncludes.h" 39 #include "core/config/ConfigValueIncludes.h" 38 40 #include "core/object/Context.h" 41 42 #ifdef DO_NOT_UNLOAD_PLUGINS 43 # define MERELY_DEACTIVATE_PLUGINS true 44 #else 45 # define MERELY_DEACTIVATE_PLUGINS false 46 #endif 39 47 40 48 namespace orxonox … … 48 56 PluginManager* PluginManager::singletonPtr_s = 0; 49 57 58 RegisterAbstractClass(PluginManager).inheritsFrom<Configurable>(); 59 50 60 PluginManager::PluginManager() 51 61 { 62 RegisterObject(PluginManager); 63 52 64 ModifyConsoleCommand("PluginManager", __CC_PluginManager_load_name).setObject(this); 53 65 ModifyConsoleCommand("PluginManager", __CC_PluginManager_unload_name).setObject(this); 66 67 this->setConfigValues(); 54 68 } 55 69 … … 63 77 for (std::map<std::string, Plugin*>::iterator it = this->plugins_.begin(); it != this->plugins_.end(); ++it) 64 78 delete it->second; 79 } 80 81 void PluginManager::setConfigValues() 82 { 83 SetConfigValue(bMerelyDeactivatePlugins_, MERELY_DEACTIVATE_PLUGINS); 65 84 } 66 85 … … 99 118 Plugin* plugin = this->plugins_[name]; 100 119 if (plugin != NULL) 101 plugin->dereference( false);120 plugin->dereference(this->bMerelyDeactivatePlugins_); 102 121 else 103 122 orxout(internal_warning) << "Cannot find plugin with name " << name << endl;
Note: See TracChangeset
for help on using the changeset viewer.