[Orxonox-commit 6360] r11017 - code/trunk/src/libraries/core/module
landauf at orxonox.net
landauf at orxonox.net
Sat Jan 2 18:13:28 CET 2016
Author: landauf
Date: 2016-01-02 18:13:28 +0100 (Sat, 02 Jan 2016)
New Revision: 11017
Modified:
code/trunk/src/libraries/core/module/PluginManager.cc
code/trunk/src/libraries/core/module/PluginManager.h
Log:
write warning to console if unloading of plugins is disabled
Modified: code/trunk/src/libraries/core/module/PluginManager.cc
===================================================================
--- code/trunk/src/libraries/core/module/PluginManager.cc 2016-01-02 15:06:30 UTC (rev 11016)
+++ code/trunk/src/libraries/core/module/PluginManager.cc 2016-01-02 17:13:28 UTC (rev 11017)
@@ -80,9 +80,18 @@
void PluginManager::setConfigValues()
{
- SetConfigValue(bMerelyDeactivatePlugins_, MERELY_DEACTIVATE_PLUGINS);
+ SetConfigValue(bMerelyDeactivatePlugins_, MERELY_DEACTIVATE_PLUGINS).callback(this, &PluginManager::changedConfigValue);
}
+ void PluginManager::changedConfigValue()
+ {
+ if (this->bMerelyDeactivatePlugins_)
+ {
+ orxout(internal_warning) << "Orxonox is configured to NOT completely unload plugins."
+ " This means that it's not possible to re-compile and reload a plugin at runtime." << endl;
+ }
+ }
+
void PluginManager::findPlugins()
{
const std::vector<std::string>& pluginPaths = ApplicationPaths::getInstance().getPluginPaths();
Modified: code/trunk/src/libraries/core/module/PluginManager.h
===================================================================
--- code/trunk/src/libraries/core/module/PluginManager.h 2016-01-02 15:06:30 UTC (rev 11016)
+++ code/trunk/src/libraries/core/module/PluginManager.h 2016-01-02 17:13:28 UTC (rev 11017)
@@ -58,6 +58,8 @@
void unloadPlugin(const std::string& name);
private:
+ void changedConfigValue();
+
std::map<std::string, Plugin*> plugins_;
std::map<std::string, PluginReference*> references_; // references that were created by console command
bool bMerelyDeactivatePlugins_;
More information about the Orxonox-commit
mailing list