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*

Retrieve the address of an exported symbol.

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

Load a dynamic library.

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

Unload the dynamic library.

Return values
trueSucceeded to unload.
falseFailed to unload.