corelib/include/ebcl/inline/DynLib.hh

30 lines
817 B
C++

/******************************************************************************/
/* DYNAMIC LIBRARIES - INLINE CODE ********************************************/
/******************************************************************************/
#ifndef _H_LW_LIB_INLINE_DYNLIB
#define _H_LW_LIB_INLINE_DYNLIB
#include <lw/lib/DynLib.hh>
namespace lw {
/*= T_DynLib =================================================================*/
template< typename T >
inline T* T_DynLib::getPointer(
char const* const name ) const noexcept
{
return reinterpret_cast< T* >( getRawSymbol( name ) );
}
template< typename T >
inline std::function< T > T_DynLib::getFunction(
char const* const name ) const noexcept
{
return std::function< T >{ (F_CFunc< T >) getRawSymbol( name ) };
}
}
#endif // _H_LW_LIB_INLINE_DYNLIB