Class providing access to a const resource block embedded into the executable. More...
#include <eagine/embed.hpp>
Public Member Functions | |
constexpr | embedded_resource () noexcept=default |
Default constructor. | |
constexpr auto | source_path () const noexcept -> string_view |
Returns the path of the file this resource data comes from. | |
constexpr auto | is_packed () const noexcept -> bool |
Indicates if the resource is packed and needs to be decompressed. More... | |
constexpr | operator memory::const_block () const noexcept |
Implicit conversion to const block. | |
auto | unpack (data_compressor &comp, memory::buffer &buf) const -> memory::const_block |
Unpacks this resource into a buffer using the provided compressor. More... | |
auto | unpack (main_ctx &ctx) const -> memory::const_block |
Unpacks this resource into a buffer using compressor from main context. More... | |
auto | unpack (main_ctx_object &mco) const -> memory::const_block |
Unpacks this resource using compressor from a main context object. More... | |
Related Functions | |
(Note that these are not member functions.) | |
static auto | as_chars (const embedded_resource &res) noexcept |
Converts the embedded resource block to a const span of characters. | |
Class providing access to a const resource block embedded into the executable.
|
inlineconstexprnoexcept |
Indicates if the resource is packed and needs to be decompressed.
Referenced by unpack().
|
inline |
|
inline |
Unpacks this resource into a buffer using compressor from main context.
|
inline |
Unpacks this resource using compressor from a main context object.