43#ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_DYNAMIC_LIBRARY_H
44#define LASS_GUARDIAN_OF_INCLUSION_UTIL_DYNAMIC_LIBRARY_H
48#if (LASS_PLATFORM_TYPE == LASS_PLATFORM_TYPE_WIN32) || LASS_HAVE_DLOPEN
49# define LASS_HAVE_DYNAMIC_LIBRARY 1
57#ifdef LASS_HAVE_DYNAMIC_LIBRARY
77 DynamicLibrary(
const std::string& path);
80 template <
typename FunPtr>
81 FunPtr resolveFunction(
const std::string& functionName)
const
85 return reinterpret_cast<FunPtr
>(resolveFunctionImpl(functionName));
90#if LASS_PLATFORM_TYPE == LASS_PLATFORM_TYPE_WIN32
91 typedef int (*TFunctionPtr)(void);
97 typedef void* TFunctionPtr;
99# error missing implementation
102 TFunctionPtr resolveFunctionImpl (
const std::string& functionName)
const;
110class DynamicLibraryError:
public ExceptionMixin<DynamicLibraryError>
113 DynamicLibraryError(std::string msg, std::string loc):
114 ExceptionMixin<DynamicLibraryError>(std::move(msg), std::move(loc))
117 ~DynamicLibraryError() noexcept {}
use as base class if derived should not be copyable
#define LASS_DLL
DLL interface: import or export symbols?
general utility, debug facilities, ...
Library for Assembled Shared Sources.