Spicy
Public Member Functions | List of all members
hilti::rt::Library Class Reference

#include <library.h>

Public Member Functions

 Library (const hilti::rt::filesystem::path &path)
 
 Library (const Library &)=delete
 
Libraryoperator= (const Library &)=delete
 
 Library (Library &&)=default
 
Libraryoperator= (Library &&)=default
 
hilti::rt::Result< hilti::rt::library::Versionopen () const
 
hilti::rt::Result< Nothingsave (const hilti::rt::filesystem::path &path) const
 
hilti::rt::Result< void * > symbol (std::string_view name) const
 
hilti::rt::Result< Nothingremove () const
 

Detailed Description

Container for storing code compiled into a native shared library.

This class loads the underlying library it wraps into its internal store on construction and subsequently does not depend on it anymore.

Constructor & Destructor Documentation

◆ Library()

hilti::rt::Library::Library ( const hilti::rt::filesystem::path &  path)

Makes a library available for opening.

Parameters
pathfull path to the library file
Exceptions
<em>std::runtime_error</em>if library does not exist, or any other I/O operation failed

Member Function Documentation

◆ open()

hilti::rt::Result< hilti::rt::library::Version > hilti::rt::Library::open ( ) const

Load the library into the current process

Returns
version information extracted from loaded library

◆ save()

hilti::rt::Result< hilti::rt::Nothing > hilti::rt::Library::save ( const hilti::rt::filesystem::path &  path) const

Save this library under a different path.

path the path where this library should be stored

Returns
nothing or an error

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