DynamicLibrary Class Reference

Dynamic library. More...

#include <static.h>

Public Member Functions

auto Load (const std::string &path) -> bool
 Load a dynamic library. More...
 
auto Unload () -> bool
 Unload the dynamic library. More...
 
auto GetFuncPointer (const std::string &symbol) const -> void *
 Retrieve the address of an exported symbol. More...
 

Detailed Description

Dynamic library.

Platform independent dynamic library class.

Member Function Documentation

auto DynamicLibrary::GetFuncPointer ( const std::string &  symbol) const -> void*
inline

Retrieve the address of an exported symbol.

Return values
nullptrFailed to get address.
auto DynamicLibrary::Load ( const std::string &  path) -> bool
inline

Load a dynamic library.

Parameters
pathPath to a library file.
Return values
trueSucceeded to load.
falseFailed to load.
auto DynamicLibrary::Unload ( ) -> bool
inline

Unload the dynamic library.

Return values
trueSucceeded to unload.
falseFailed to unload.