diff options
Diffstat (limited to 'src/Common/ModuleManager.h')
-rw-r--r-- | src/Common/ModuleManager.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Common/ModuleManager.h b/src/Common/ModuleManager.h index eb8c800..9d722c4 100644 --- a/src/Common/ModuleManager.h +++ b/src/Common/ModuleManager.h @@ -23,14 +23,12 @@ #include "Module.h" #include <Core/Configurable.h> -#include <boost/noncopyable.hpp> +#include <boost/thread/shared_mutex.hpp> #include <map> #include <stack> #include <string> -#include <ltdl.h> - namespace Mad { namespace Common { @@ -40,14 +38,15 @@ class ModuleManager : public Core::Configurable, private boost::noncopyable { private: friend class Application; - typedef Module* (*ModuleLoadFunc)(Application*); + typedef void *ModuleHandle; + typedef Module *(*ModuleLoadFunc)(Application*); Application *application; - std::map<std::string, std::pair<lt_dlhandle, Module*> > modules; + std::map<std::string, std::pair<ModuleHandle, Module*> > modules; std::stack<std::string> moduleOrder; - //static int preopenCallback(lt_dlhandle handle); + boost::shared_mutex mutex; ModuleManager(Application *application0); ~ModuleManager(); @@ -58,7 +57,7 @@ class ModuleManager : public Core::Configurable, private boost::noncopyable { virtual bool handleConfigEntry(const Core::ConfigEntry &entry, bool handled); public: - lt_dlhandle loadModule(const std::string &name); + bool loadModule(const std::string &name); }; } |