fw4spl
fwRuntime::dl::LibraryBridge< Implementor > Struct Template Reference

Defines the module class.This class is only a bridge to a native module implementor. More...

#include <Library.hpp>

Public Member Functions

 LibraryBridge (const boost::filesystem::path &modulePath) noexcept
 Constructor. More...
 
 ~LibraryBridge () noexcept
 Destructor : does nothing.
 
bool isLoaded () const noexcept
 Tells if the module is loaded. More...
 
const boost::filesystem::path getFullPath () 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 library. More...
 
void * getSymbol (const std::string &name) const
 Retrieves the address of a symbol specified by its name. More...
 
void load ()
 Loads the module.
 
void setBundle (const ::fwRuntime::Bundle *bundle) noexcept
 Sets the bundle the library is attached to. More...
 
void unload ()
 Undloads the module.
 

Detailed Description

template<typename Implementor>
struct fwRuntime::dl::LibraryBridge< Implementor >

Defines the module class.

This class is only a bridge to a native module implementor.

Definition at line 30 of file Library.hpp.

Constructor & Destructor Documentation

template<typename Implementor >
fwRuntime::dl::LibraryBridge< Implementor >::LibraryBridge ( const boost::filesystem::path &  modulePath)
inlinenoexcept

Constructor.

Parameters
[in]modulePatha path pointing the module to load without any extension information

Definition at line 39 of file Library.hpp.

Member Function Documentation

template<typename Implementor >
const boost::filesystem::path fwRuntime::dl::LibraryBridge< Implementor >::getFullPath ( ) const
inline

Retrieves the file path of the library including the owning bundle's path.

Returns
a file path
See also
getPath

Definition at line 69 of file Library.hpp.

template<typename Implementor >
const boost::filesystem::path fwRuntime::dl::LibraryBridge< Implementor >::getPath ( ) const
inline

Retrieves the file path of the library.

Remarks
This path is relative to the owning bundle's path.
Returns
a file path
See also
getFullPath

Definition at line 83 of file Library.hpp.

template<typename Implementor >
void* fwRuntime::dl::LibraryBridge< Implementor >::getSymbol ( const std::string &  name) const
inline

Retrieves the address of a symbol specified by its name.

Parameters
[in]namea string containing the symbol name.
Returns
a pointer to the found symbol or null if none has been found

Definition at line 95 of file Library.hpp.

template<typename Implementor >
bool fwRuntime::dl::LibraryBridge< Implementor >::isLoaded ( ) const
inlinenoexcept

Tells if the module is loaded.

Returns
true or false

Definition at line 57 of file Library.hpp.

template<typename Implementor >
void fwRuntime::dl::LibraryBridge< Implementor >::setBundle ( const ::fwRuntime::Bundle bundle)
inlinenoexcept

Sets the bundle the library is attached to.

Parameters
[in]bundlea pointer to a bundle instance

Definition at line 113 of file Library.hpp.

Referenced by fwRuntime::Bundle::addLibrary().

+ Here is the caller graph for this function:


The documentation for this struct was generated from the following file: