The SharedLib class.
More...
#include <lib.h>
|
| operator bool () const noexcept |
| Checks if the library has been correctly opened.
|
|
template<typename F > |
F * | sym (const std::string &name) |
| Retrieves a data pointer from a dynamic library.
|
|
const char * | error () const noexcept |
| Returns the last error message, if any.
|
|
Loop & | loop () const noexcept |
| Gets the loop from which the resource was originated.
|
|
const uv_lib_t * | raw () const noexcept |
| Gets the underlying raw data structure.
|
|
uv_lib_t * | raw () noexcept |
| Gets the underlying raw data structure.
|
|
|
static std::shared_ptr< SharedLib > | create (Args &&...args) |
| Creates a new resource of the given type.
|
|
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 19 of file lib.h.
◆ error()
const char * uvw::SharedLib::error |
( |
| ) |
const |
|
noexcept |
Returns the last error message, if any.
- Returns
- The last error message, if any.
◆ operator bool()
uvw::SharedLib::operator bool |
( |
| ) |
const |
|
explicitnoexcept |
Checks if the library has been correctly opened.
- Returns
- True if the library is opened, false otherwise.
◆ sym()
template<typename F >
F * uvw::SharedLib::sym |
( |
const 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 41 of file lib.h.
The documentation for this class was generated from the following file: