Contains a shared library handle and provides a way to get symbols from it, can only be created through DLL::Create()
More...
#include <DLL.h>
|
void * | GetFunction (const char *name) |
| Gets a function from the DLL.
|
|
Error | LoadDLL (const char *path) |
|
Error | ReloadDLL (const char *path) |
|
void | UnloadDLL () const |
|
|
static DLL * | Create () |
| Forces user to use dynamic allocation.
|
|
static DLL * | GetFromCache (const std::string &path) |
| Searched for DLL in cache, if not found creates a new one.
|
|
|
template<typename ReturnType , typename... Args> |
ReturnType(*)(Args...) | GetFunction (const char *name) |
| Gets a function from the DLL and casts it to the correct type.
|
|
Contains a shared library handle and provides a way to get symbols from it, can only be created through DLL::Create()
◆ Create()
DLL * venom::common::DLL::Create |
( |
| ) |
|
|
static |
Forces user to use dynamic allocation.
- Returns
- new DLL
◆ GetFromCache()
DLL * venom::common::DLL::GetFromCache |
( |
const std::string & | path | ) |
|
|
static |
Searched for DLL in cache, if not found creates a new one.
- Returns
- existing or new DLL
◆ GetFunction()
void * venom::common::DLL::GetFunction |
( |
const char * | name | ) |
|
Gets a function from the DLL.
- Parameters
-
- Returns
- sym address
◆ GetFunction
template<typename ReturnType , typename... Args>
ReturnType(*)(Args...) venom::common::DLL::GetFunction(const char *name) |
|
inline |
Gets a function from the DLL and casts it to the correct type.
- Template Parameters
-
ReturnType | return type of the function |
Args | types of each args |
- Parameters
-
- Returns
- sym address in the form ReturnType(*)(Args...)
The documentation for this class was generated from the following files:
- /Users/kevinpruvost/Bossing/Perso/VenomEngine/lib/common/include/venom/common/DLL.h
- /Users/kevinpruvost/Bossing/Perso/VenomEngine/lib/common/src/DLL.cc