Class for loading a single shared library.
More...
#include <utils/SharedLibrary.h>
Class for loading a single shared library.
The library is loaded/opened on construction and closed on destruction.
◆ Handle
◆ Symbol
◆ SharedLibrary()
Loads the specified library.
Afterwards its symbols can be accessed using the getSymbol() method.
- Parameters
-
[in] | library | The relative or absolute path of the shared library. |
- Exceptions
-
XIO | If the library can not be found or loaded. |
◆ ~SharedLibrary()
◆ getLibPrefix()
static const char* getLibPrefix |
( |
| ) |
|
|
static |
Return the name prefix of libraries (e.g.
'lib' for unix shared libraries). The full library name is: <prefix>NAME<postfix><extension>
◆ getLibPostfix()
static const char* getLibPostfix |
( |
| ) |
|
|
static |
Returns the name postfix of libraries (e.g.
'_d' for windows debug libraries) The full library name is: <prefix>NAME<postfix><extension>
◆ getLibExtension()
static const char* getLibExtension |
( |
| ) |
|
|
static |
Return library extension (e.g.
".dll" for windows libraries) The full library name is: <prefix>NAME<postfix><extension>
◆ isOpen()
Return true if the shared library is currently open.
- Returns
- true if open
◆ close()
Close the shared library.
◆ getSymbol() [1/2]
Symbol getSymbol |
( |
const std::string & |
symbol | ) |
|
|
inline |
Get a symbol from the library.
- Exceptions
-
XIO | when obtaining the symbol failed. |
- Parameters
-
[in] | symbol | The name of the symbol |
- Returns
- Handle to the symbol
◆ loadSharedLibrary()
low level opening of libraries without using the class wrapper
◆ getSymbol() [2/2]
low level getting symbols from libraries without using the class wrapper
◆ closeSharedLibrary()
low level closing of libraries without using the class wrapper
The documentation for this class was generated from the following file: