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

Library Object. More...

#include <LibraryLoader.h>

Public Types

using Ptr = std::shared_ptr<LibraryObject>
 
using Module = void *
 

Public Member Functions

 ~LibraryObject () noexcept
 
const void * findFunctionByName (const std::string &name) const
 Return a function pointer from the library by name.
 

Static Public Member Functions

static LibraryObject::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 LibraryObject::Ptr createWithPath (const system::Path &path) noexcept
 Load an external library.
 

Private Member Functions

 LibraryObject (Module module) noexcept
 

Private Attributes

Module module
 

Detailed Description

Library Object.

Member Typedef Documentation

◆ Module

◆ Ptr

Constructor & Destructor Documentation

◆ ~LibraryObject()

LibraryObject::~LibraryObject ( )
noexcept

References module.

◆ LibraryObject()

LibraryObject::LibraryObject ( Module module)
explicitprivatenoexcept

Member Function Documentation

◆ create()

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

Load an external library.

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

References MAKE_SHARED_PRIVATE.

Referenced by createWithPath().

◆ createEx()

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

Load an external library.

Parameters
nameLibrary name
Returns
Result

◆ createWithPath()

LibraryObject::Ptr LibraryObject::createWithPath ( const system::Path & path)
staticnoexcept

Load an external library.

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

References create().

◆ findFunctionByName()

const void * LibraryObject::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 module.

Member Data Documentation

◆ module

Module sese::system::LibraryObject::module
private

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