- Fixed plugin interface. Now both plugins are loaded. Not tried calling the exported functions, though...
- To make sure libraries are not loaded multiple times, only .so files are considered. Beware that this is not portable git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@731 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
f181c93527
commit
45cc6733e4
5 changed files with 70 additions and 73 deletions
|
@ -23,47 +23,45 @@
|
|||
#include "plugin.hh"
|
||||
#include "python_policy_manager.hh"
|
||||
|
||||
#include <glibmm/ustring.h>
|
||||
|
||||
using namespace sgpem;
|
||||
|
||||
// Is this OK? If not, we must use a function with a local static variable...
|
||||
PythonPolicyManager* _policy_manager = NULL;
|
||||
|
||||
void
|
||||
Plugin::on_init()
|
||||
sgpem__Plugin__on_init()
|
||||
{
|
||||
if(_policy_manager == NULL)
|
||||
_policy_manager = new sgpem::PythonPolicyManager();
|
||||
}
|
||||
|
||||
void
|
||||
Plugin::on_exit()
|
||||
sgpem__Plugin__on_exit()
|
||||
{
|
||||
delete _policy_manager;
|
||||
_policy_manager = NULL;
|
||||
}
|
||||
|
||||
Glib::ustring
|
||||
Plugin::describe()
|
||||
const char*
|
||||
sgpem__Plugin__describe()
|
||||
{
|
||||
return "This plugin manages policies written in the Python scripting language";
|
||||
}
|
||||
|
||||
Glib::ustring
|
||||
Plugin::get_name()
|
||||
const char*
|
||||
sgpem__Plugin__get_name()
|
||||
{
|
||||
return "Pyloader";
|
||||
}
|
||||
|
||||
Glib::ustring
|
||||
Plugin::get_author()
|
||||
const char*
|
||||
sgpem__Plugin__get_author()
|
||||
{
|
||||
return "Copyright 2005, 2006, University of Padova, dept. of Pure and Applied Mathematics";
|
||||
}
|
||||
|
||||
float
|
||||
Plugin::get_version()
|
||||
sgpem__Plugin__get_version()
|
||||
{
|
||||
return 1.0f;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue