The SharedLib class.
More...
#include <lib.hpp>
|
| | operator bool () const noexcept |
| | Checks if the library has been correctly opened. More...
|
| |
| template<typename F > |
| F * | sym (std::string name) |
| | Retrieves a data pointer from a dynamic library. More...
|
| |
| const char * | error () const noexcept |
| | Returns the last error message, if any. More...
|
| |
| Loop & | loop () const noexcept |
| | Gets the loop from which the resource was originated. More...
|
| |
|
| static std::shared_ptr< SharedLib > | create (Args &&... args) |
| | Creates a new resource of the given type. More...
|
| |
The SharedLib class.
uvw provides cross platform utilities for loading shared libraries and retrieving symbols from them, by means of the API offered by libuv.
Definition at line 22 of file lib.hpp.
◆ error()
| const char* uvw::SharedLib::error |
( |
| ) |
const |
|
inlinenoexcept |
Returns the last error message, if any.
- Returns
- The last error message, if any.
Definition at line 62 of file lib.hpp.
◆ operator bool()
| uvw::SharedLib::operator bool |
( |
| ) |
const |
|
inlineexplicitnoexcept |
Checks if the library has been correctly opened.
- Returns
- True if the library is opened, false otherwise.
Definition at line 38 of file lib.hpp.
◆ sym()
template<typename F >
| F* uvw::SharedLib::sym |
( |
std::string |
name | ) |
|
|
inline |
Retrieves a data pointer from a dynamic library.
F shall be a valid function type (as an example, void(int)).
It is legal for a symbol to map to nullptr.
- Parameters
-
| name | The symbol to be retrieved. |
- Returns
- A valid function pointer in case of success,
nullptr otherwise.
Definition at line 50 of file lib.hpp.
The documentation for this class was generated from the following file: