- Completed plugin management system. Now we should start using it...
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@703 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
9856a86c87
commit
9a7b39ed82
4 changed files with 47 additions and 13 deletions
|
@ -59,22 +59,28 @@ PluginManager::rescan_dirs()
|
|||
for(Glib::DirIterator dir_it = dir.begin(); dir_it != dir.end(); ++dir_it)
|
||||
{
|
||||
std::string module_path = Module::build_path(*it, *dir_it);
|
||||
|
||||
std::cout << "Attempting to load module at path " << module_path << std::endl;
|
||||
|
||||
try
|
||||
{
|
||||
module = new Module(module_path);
|
||||
|
||||
if(*module)
|
||||
{
|
||||
_modules.push_back(module);
|
||||
std::cerr << "\tSuccess" << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << Glib::Module::get_last_error() << std::endl;
|
||||
std::cerr << "\tFailed: " << Glib::Module::get_last_error() << std::endl;
|
||||
delete module;
|
||||
}
|
||||
|
||||
}
|
||||
catch(InvalidPluginException e)
|
||||
{
|
||||
std::cerr << "\tFailed, invalid plugin: " << e.what() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue