fw4spl
|
Defines the abstract class for native module implementors. More...
#include <Native.hpp>
Public Member Functions | |
Native (const boost::filesystem::path &modulePath) noexcept | |
Constructor. More... | |
virtual | ~Native () noexcept |
Destructor : does nothing. | |
virtual bool | isLoaded () const noexcept=0 |
Tells if the module is loaded. More... | |
virtual void * | getSymbol (const std::string &name) const =0 |
Retrieves the address of a symbol specified by its name. More... | |
virtual void | load ()=0 |
Loads the module. | |
virtual void | unload ()=0 |
Undloads the module. | |
const boost::filesystem::path | getFullPath (const bool _bMustBeFile=false) const |
Retrieves the file path of the library including the owning bundle's path. More... | |
const boost::filesystem::path | getPath () const |
Retrieves the file path of the native library. More... | |
void | setBundle (const ::fwRuntime::Bundle *bundle) noexcept |
Set the bundle the library is attached to. More... | |
const ::boost::regex | getNativeName () const |
Retrieves the pattern of the dynamic library file name given the host OS. More... | |
Friends | |
struct | ::fwRuntime::Bundle |
Defines the abstract class for native module implementors.
Definition at line 31 of file Native.hpp.
|
noexcept |
Constructor.
[in] | modulePath | a path to the module to manage |
Definition at line 27 of file Native.cpp.
const ::boost::filesystem::path fwRuntime::dl::Native::getFullPath | ( | const bool | _bMustBeFile = false | ) | const |
Retrieves the file path of the library including the owning bundle's path.
[in] | _bMustBeFile | if true : bundle is a dynamic library and we want return an exception if is not a file |
Definition at line 52 of file Native.cpp.
References getPath(), and SLM_ASSERT.
const ::boost::regex fwRuntime::dl::Native::getNativeName | ( | ) | const |
Retrieves the pattern of the dynamic library file name given the host OS.
Definition at line 79 of file Native.cpp.
References fwRuntime::Bundle::getVersion(), and fwRuntime::Version::string().
Referenced by getPath().
const ::boost::filesystem::path fwRuntime::dl::Native::getPath | ( | ) | const |
Retrieves the file path of the native library.
Definition at line 103 of file Native.cpp.
References getNativeName(), and SLM_ASSERT.
Referenced by getFullPath().
|
pure virtual |
Retrieves the address of a symbol specified by its name.
[in] | name | a string containing the symbol name. |
|
pure virtualnoexcept |
Tells if the module is loaded.
|
noexcept |
Set the bundle the library is attached to.
[in] | bundle | a pointer to a bundle instance |
Definition at line 131 of file Native.cpp.
References SLM_ASSERT.