mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Add template-like get method in class SharedLibrary
This commit is contained in:
parent
d450ce8636
commit
d8e8deb031
|
@ -478,6 +478,13 @@ namespace MiniEngine
|
|||
~SharedLibrary();
|
||||
int load(const std::string& Filename);
|
||||
int unload();
|
||||
|
||||
template<typename ReturnType,typename... Arguments>
|
||||
std::function<ReturnType(Arguments...)> get(const std::string& FunctionName)
|
||||
{
|
||||
return std::function<ReturnType(Arguments...)>(reinterpret_cast<ReturnType(*)(Arguments...)>(get(FunctionName)));
|
||||
}
|
||||
|
||||
void* get(const std::string& FunctionName);
|
||||
void release();
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue
Block a user