7 #if defined(linux) || defined(__linux) || defined (__MACOSX__) 9 #include "fwRuntime/Bundle.hpp" 10 #include "fwRuntime/dl/Posix.hpp" 20 Posix::Posix(
const boost::filesystem::path & modulePath ) noexcept :
28 Posix::~Posix() noexcept
34 bool Posix::isLoaded() const noexcept
41 void * Posix::getSymbol(
const std::string & name )
const 44 if(isLoaded() ==
true)
47 result = dlsym(m_handle, name.c_str());
50 std::string message(dlerror());
51 if(message.empty() ==
false)
53 throw RuntimeException(
"Symbol retrieval failed. " + message);
67 m_handle = dlopen(getFullPath(
true).
string().c_str(), RTLD_LAZY|RTLD_GLOBAL);
70 std::string message(dlerror());
71 throw RuntimeException(
"Module load failed. " + message);
83 result = dlclose(m_handle);
86 std::string message(dlerror());
87 throw RuntimeException(
"Module unload failed. " + message);
100 #endif // #if defined(linux) || defined(__linux) || defined (__MACOSX__) The namespace fwRuntime contains classes to manage bundle, configuration element, extension point in ...