7#include "resource_view.hpp"
11#include <unordered_map>
13namespace hi::inline v1 {
38 [[nodiscard]] std::byte
const *
data() const noexcept
override
43 [[nodiscard]] std::span<std::byte const>
bytes() const noexcept
override
48 [[nodiscard]] std::string_view
string_view() const noexcept
override
50 return {
reinterpret_cast<char const *
>(data()), size()};
55 return std::make_unique<static_resource_view>(location);
69 std::span<std::byte const> _bytes;
This file includes required definitions.
A read-only memory mapping of a resource.
Definition resource_view.hpp:18
A resource that was included in the executable.
Definition static_resource_view.hpp:17
std::span< std::byte const > bytes() const noexcept override
Get a span to the memory mapping.
Definition static_resource_view.hpp:43
std::byte const * data() const noexcept override
Pointer to the memory mapping.
Definition static_resource_view.hpp:38
static std::span< std::byte const > get_static_resource(std::string const &filename)
Get the data of a static resource.
std::size_t size() const noexcept override
Size of the memory mapping.
Definition static_resource_view.hpp:33
std::size_t offset() const noexcept override
Offset into the resource file.
Definition static_resource_view.hpp:28
std::string_view string_view() const noexcept override
Get a span to the memory mapping.
Definition static_resource_view.hpp:48