Changeset 11692 for code/trunk/src/libraries/core/module/PluginManager.cc
- Timestamp:
- Jan 3, 2018, 1:43:20 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/module/PluginManager.cc
r11071 r11692 28 28 29 29 #include "PluginManager.h" 30 31 #include <fstream>32 30 33 31 #include "SpecialConfig.h" … … 95 93 void PluginManager::findPlugins() 96 94 { 97 const std:: vector<std::string>& pluginPaths = ApplicationPaths::getInstance().getPluginPaths();98 for (const std:: string& libraryName: pluginPaths)95 const std::map<std::string, std::string>& pluginPaths = ApplicationPaths::getInstance().getPluginPaths(); 96 for (const std::pair<std::string, std::string>& pluginPath : pluginPaths) 99 97 { 100 std::string name; 101 std::string filename = libraryName + + specialConfig::pluginExtension; 102 std::ifstream infile(filename.c_str()); 103 if (infile >> name) 104 { 105 orxout(internal_info) << "Found plugin with name '" << name << "' in module " << libraryName << endl; 106 this->plugins_[name] = new Plugin(name, libraryName); 107 } 108 else 109 { 110 orxout(internal_warning) << "Could not read plugin file " << filename << endl; 111 } 98 const std::string& name = pluginPath.first; 99 const std::string& libraryName = pluginPath.second; 100 101 orxout(internal_info) << "Found plugin with name '" << name << "' in module " << libraryName << endl; 102 this->plugins_[name] = new Plugin(name, libraryName); 112 103 } 113 104 }
Note: See TracChangeset
for help on using the changeset viewer.