OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::shared_executable_module Class Reference

Reference counting handle to dynamically linkable executable module. More...

#include <eagine/dynamic_library.hpp>

Public Member Functions

 shared_executable_module () noexcept=default
 Default constructor. More...
 
 shared_executable_module (nothing_t)
 Constructor which opens the current executable as a module. More...
 
 shared_executable_module (string_view filename)
 Construction which tries to open executable module with specified filename. More...
 
auto open_self () -> auto &
 Opens the current executable module. Closes the previous one, if any. More...
 
auto open (string_view filename) -> auto &
 Opens the specified executable module. Closes the previous one, if any. More...
 
auto is_open () const noexcept -> bool
 Indicates if this executable module is open. More...
 
 operator bool () const noexcept
 Indicates if this executable module is open. More...
 
auto error_message () const noexcept -> string_view
 Returns a human-readable error message from the last failed operation.
 
auto exports (string_view name) const noexcept -> bool
 Tests if this executable module exports the specified symbol. More...
 
template<typename Signature >
auto find (string_view name) const noexcept -> std::enable_if_t< std::is_function_v< std::remove_pointer_t< Signature >>, callable_ref< std::remove_pointer_t< Signature >>>
 Finds and returns pointer to exported function with the specified name. More...
 

Detailed Description

Reference counting handle to dynamically linkable executable module.

Constructor & Destructor Documentation

◆ shared_executable_module() [1/3]

eagine::shared_executable_module::shared_executable_module ( )
defaultnoexcept

Default constructor.

Postcondition
!is_open()

◆ shared_executable_module() [2/3]

eagine::shared_executable_module::shared_executable_module ( nothing_t  )
inline

Constructor which opens the current executable as a module.

See also
open_self

◆ shared_executable_module() [3/3]

eagine::shared_executable_module::shared_executable_module ( string_view  filename)
inline

Construction which tries to open executable module with specified filename.

See also
open

Member Function Documentation

◆ exports()

auto eagine::shared_executable_module::exports ( string_view  name) const -> bool
inlinenoexcept

Tests if this executable module exports the specified symbol.

See also
is_open
find

◆ find()

template<typename Signature >
auto eagine::shared_executable_module::find ( string_view  name) const -> std::enable_if_t< std::is_function_v<std::remove_pointer_t<Signature>>, callable_ref<std::remove_pointer_t<Signature>>>
inlinenoexcept

Finds and returns pointer to exported function with the specified name.

See also
is_open
exports

◆ is_open()

auto eagine::shared_executable_module::is_open ( ) const -> bool
inlinenoexcept

Indicates if this executable module is open.

See also
open
open_self

Referenced by exports(), find(), and operator bool().

◆ open()

auto eagine::shared_executable_module::open ( string_view  filename) -> auto&
inline

Opens the specified executable module. Closes the previous one, if any.

See also
open_self
is_open

◆ open_self()

auto eagine::shared_executable_module::open_self ( ) -> auto&
inline

Opens the current executable module. Closes the previous one, if any.

See also
open
is_open

◆ operator bool()

eagine::shared_executable_module::operator bool ( ) const
inlineexplicitnoexcept

Indicates if this executable module is open.

See also
is_open

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

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).