- Fix compilation and loading of XmlSave plugin

- Fix throwing of exceptions from sgpem::Module
- **THOU SHALL ALWAYS UPDATE THY MAKEFILES, OR THE WRATH OF GOD
WILL DESCEND UPON THEE**


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@827 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-08-07 15:16:27 +00:00
parent 96728edfce
commit a7fc644043
7 changed files with 14 additions and 16 deletions

View File

@ -181,6 +181,8 @@ src_backend_libbackend_la_SOURCES = \
src/backend/schedulable.cc \
src/backend/scheduler.cc \
src/backend/serialize_visitor.cc \
src/backend/serializer.cc \
src/backend/serializer_error.cc \
src/backend/serializers_gatekeeper.cc \
src/backend/simulation.cc \
src/backend/static_process.cc \
@ -223,6 +225,8 @@ pkginclude_HEADERS += \
src/backend/schedulable.hh \
src/backend/scheduler.hh \
src/backend/serialize_visitor.hh \
src/backend/serializer.hh \
src/backend/serializer_error.hh \
src/backend/serializers_gatekeeper.hh \
src/backend/simulation.hh \
src/backend/sub_request.hh \

View File

@ -35,6 +35,8 @@ Module::Module(const Glib::ustring& identifier) throw(InvalidPluginException) :
get_author_ptr(NULL),
get_version_ptr(NULL)
{
if(!*this) throw InvalidPluginException(Module::get_last_error());
// Type-safeness here is an optional, as always. :-)
std::string prefix = "sgpem__Plugin__";
if(!(get_symbol(prefix + "on_init", (void*&) on_init_ptr) &&

View File

@ -70,23 +70,13 @@ PluginManager::rescan_dirs()
{
std::string module_path = Module::build_path(*it, *dir_it);
std::cout << "Attempting to load module at path " << module_path << std::endl;
std::cerr << "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 << "\tFailed: " << Glib::Module::get_last_error() << std::endl;
delete module;
}
_modules.push_back(module);
std::cerr << "\tSuccess" << std::endl;
}
catch(InvalidPluginException e)
{

View File

@ -48,7 +48,7 @@ namespace sgpem
This class is a virtual class and each method must be reimplemented
in derived classes to have effective serialization.
*/
class SerializeVisitor
class SG_DLLEXPORT SerializeVisitor
{
public:
virtual ~SerializeVisitor() = 0;

View File

@ -20,6 +20,8 @@
#include "serializer.hh"
#include "serializers_gatekeeper.hh"
using namespace sgpem;
Serializer::Serializer()

View File

@ -31,7 +31,7 @@ namespace sgpem
{
class Serializer;
class Serializer
class SG_DLLEXPORT Serializer
{
public:
Serializer();

View File

@ -27,7 +27,7 @@
namespace sgpem
{
class SerializerError : public std::runtime_error
class SG_DLLEXPORT SerializerError : public std::runtime_error
{
public:
SerializerError(const std::string& what);