Sese Framework  3.0.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::system::Library Class Reference

Library Object. More...

#include <Library.h>

Classes

class  Impl
 

Public Types

using Ptr = std::unique_ptr<Library>
 
using Module = void *
 

Public Member Functions

 ~Library () noexcept
 
const void * findFunctionByName (const std::string &name) const
 Return a function pointer from the library by name.
 
template<typename T >
T * findFunctionByNameAs (const std::string &name) const
 

Static Public Member Functions

static Ptr create (const std::string &name) noexcept
 Load an external library.
 
static Result< Ptr, ErrorCodecreateEx (const std::string &name) noexcept
 Load an external library.
 
static Ptr createWithPath (const Path &path) noexcept
 Load an external library.
 

Private Member Functions

 Library (std::unique_ptr< Impl > impl) noexcept
 

Private Attributes

std::unique_ptr< Implimpl
 

Detailed Description

Library Object.

Member Typedef Documentation

◆ Module

◆ Ptr

using sese::system::Library::Ptr = std::unique_ptr<Library>

Constructor & Destructor Documentation

◆ ~Library()

Library::~Library ( )
noexcept

◆ Library()

Library::Library ( std::unique_ptr< Impl > impl)
explicitprivatenoexcept

Member Function Documentation

◆ create()

Library::Ptr Library::create ( const std::string & name)
staticnoexcept

Load an external library.

Parameters
nameLibrary name
Returns
Library object, returns nullptr if loading fails

References MAKE_UNIQUE_PRIVATE.

◆ createEx()

static Result< Ptr, ErrorCode > sese::system::Library::createEx ( const std::string & name)
staticnoexcept

Load an external library.

Parameters
nameLibrary name
Returns
Result

◆ createWithPath()

Library::Ptr Library::createWithPath ( const Path & path)
staticnoexcept

Load an external library.

Parameters
pathLibrary path
Returns
Library object, returns nullptr if loading fails

◆ findFunctionByName()

const void * Library::findFunctionByName ( const std::string & name) const
nodiscard

Return a function pointer from the library by name.

Parameters
nameFunction name
Returns
Function pointer, returns nullptr if not found

References impl.

Referenced by findFunctionByNameAs().

◆ findFunctionByNameAs()

template<typename T >
T * sese::system::Library::findFunctionByNameAs ( const std::string & name) const
inlinenodiscard

References findFunctionByName().

Member Data Documentation

◆ impl

std::unique_ptr<Impl> sese::system::Library::impl
private

Referenced by findFunctionByName().


The documentation for this class was generated from the following files: