7 #ifndef __FWRUNTIME_DL_LIBRARY_HPP__ 8 #define __FWRUNTIME_DL_LIBRARY_HPP__ 10 #include "fwRuntime/RuntimeException.hpp" 11 #include "fwRuntime/dl/Posix.hpp" 12 #include "fwRuntime/dl/Win32.hpp" 14 #include <boost/filesystem/path.hpp> 29 template<
typename Implementor >
40 : m_implementor( modulePath )
59 return m_implementor.isLoaded();
71 return m_implementor.getFullPath();
83 const boost::filesystem::path
getPath()
const 85 return m_implementor.getPath();
97 return m_implementor.getSymbol(name);
105 m_implementor.load();
113 void setBundle(const ::fwRuntime::Bundle* bundle) noexcept
115 m_implementor.setBundle(bundle);
123 m_implementor.unload();
132 Implementor m_implementor;
146 #if defined(linux) || defined(__linux) || defined(__MACOSX__) 158 #endif // __FWRUNTIME_DL_LIBRARY_HPP__ void unload()
Undloads the module.
The namespace fwRuntime contains classes to manage bundle, configuration element, extension point in ...
LibraryBridge(const boost::filesystem::path &modulePath) noexcept
Constructor.
~LibraryBridge() noexcept
Destructor : does nothing.
void * getSymbol(const std::string &name) const
Retrieves the address of a symbol specified by its name.
const boost::filesystem::path getFullPath() const
Retrieves the file path of the library including the owning bundle's path.
const boost::filesystem::path getPath() const
Retrieves the file path of the library.
Defines the module class.This class is only a bridge to a native module implementor.
void load()
Loads the module.
bool isLoaded() const noexcept
Tells if the module is loaded.
void setBundle(const ::fwRuntime::Bundle *bundle) noexcept
Sets the bundle the library is attached to.