Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::format::reload::ReloadLibrary Class Reference

#include <reload_library.hpp>

Public Member Functions

 ReloadLibrary ()=default
 ReloadLibrary (const std::string &path, LeakPolicy policy=LeakPolicy::Retain)
 Load path.
 ReloadLibrary (ReloadLibrary &&other) noexcept
ReloadLibrary & operator= (ReloadLibrary &&other) noexcept
 ReloadLibrary (const ReloadLibrary &)=delete
ReloadLibrary & operator= (const ReloadLibrary &)=delete
 ~ReloadLibrary ()
bool valid () const noexcept
 operator bool () const noexcept
const std::string & error () const noexcept
const std::string & path () const noexcept
void * native_handle () const noexcept
LeakPolicy leak_policy () const noexcept
void set_leak_policy (LeakPolicy policy) noexcept
 Promote/demote the unload decision after construction (e.g.
void * raw_symbol (const char *name) const noexcept
 Resolve a symbol. Returns nullptr if absent or the image isn't loaded.
template<typename T>
T symbol (const char *name) const noexcept
 Typed convenience over raw_symbol (typically a factory function pointer).
bool close () noexcept
 Explicitly unload now, regardless of policy.

Constructor & Destructor Documentation

◆ ReloadLibrary() [1/4]

pulp::format::reload::ReloadLibrary::ReloadLibrary ( )
default

◆ ReloadLibrary() [2/4]

pulp::format::reload::ReloadLibrary::ReloadLibrary ( const std::string & path,
LeakPolicy policy = LeakPolicy::Retain )
inlineexplicit

Load path.

On failure, valid() is false and error() explains why. The default policy retains (never unloads) the image — see file header.

◆ ReloadLibrary() [3/4]

pulp::format::reload::ReloadLibrary::ReloadLibrary ( ReloadLibrary && other)
inlinenoexcept

◆ ReloadLibrary() [4/4]

pulp::format::reload::ReloadLibrary::ReloadLibrary ( const ReloadLibrary & )
delete

◆ ~ReloadLibrary()

pulp::format::reload::ReloadLibrary::~ReloadLibrary ( )
inline

Member Function Documentation

◆ close()

bool pulp::format::reload::ReloadLibrary::close ( )
inlinenoexcept

Explicitly unload now, regardless of policy.

Returns true on success. ONLY call when the image is provably quiesced (see file header) — this is the unsafe escape hatch, used by tests and quiesced-probe teardown.

◆ error()

const std::string & pulp::format::reload::ReloadLibrary::error ( ) const
inlinenoexcept

◆ leak_policy()

LeakPolicy pulp::format::reload::ReloadLibrary::leak_policy ( ) const
inlinenoexcept

◆ native_handle()

void * pulp::format::reload::ReloadLibrary::native_handle ( ) const
inlinenoexcept

◆ operator bool()

pulp::format::reload::ReloadLibrary::operator bool ( ) const
inlineexplicitnoexcept

◆ operator=() [1/2]

ReloadLibrary & pulp::format::reload::ReloadLibrary::operator= ( const ReloadLibrary & )
delete

◆ operator=() [2/2]

ReloadLibrary & pulp::format::reload::ReloadLibrary::operator= ( ReloadLibrary && other)
inlinenoexcept

◆ path()

const std::string & pulp::format::reload::ReloadLibrary::path ( ) const
inlinenoexcept

◆ raw_symbol()

void * pulp::format::reload::ReloadLibrary::raw_symbol ( const char * name) const
inlinenoexcept

Resolve a symbol. Returns nullptr if absent or the image isn't loaded.

◆ set_leak_policy()

void pulp::format::reload::ReloadLibrary::set_leak_policy ( LeakPolicy policy)
inlinenoexcept

Promote/demote the unload decision after construction (e.g.

flip a probe to Retain once it is about to contribute a live processor).

◆ symbol()

template<typename T>
T pulp::format::reload::ReloadLibrary::symbol ( const char * name) const
inlinenoexcept

Typed convenience over raw_symbol (typically a factory function pointer).

◆ valid()

bool pulp::format::reload::ReloadLibrary::valid ( ) const
inlinenoexcept

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