12#include "../container/container.hpp"
13#include "../utility/utility.hpp"
14#include "../macros.hpp"
24hi_export_module(hikogui.file.resource_view);
26hi_export
namespace hi {
inline namespace v1 {
34 [[
nodiscard]]
virtual hi::const_void_span const_void_span()
const noexcept = 0;
45 [[
nodiscard]] hi::const_void_span const_void_span()
const noexcept override
47 return _value.const_void_span();
77 } : _pimpl(
std::make_shared<detail::resource_view_impl<std::decay_t<T>>>(std::forward<T>(view))) {}
83 return _pimpl ==
nullptr;
86 explicit operator bool()
const noexcept
95 hi_assert_not_null(_pimpl);
96 return _pimpl->const_void_span();
102 static_assert(std::is_const_v<T>);
108 return as_string_view(view.const_void_span());
111 [[
nodiscard]]
friend bstring_view as_bstring_view(const_resource_view
const& view)
noexcept
113 return as_bstring_view(view.const_void_span());
Defines the file_view class.
@ other
The gui_event does not have associated data.
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
The HikoGUI namespace.
Definition recursive_iterator.hpp:15
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:378
Map a file into virtual memory.
Definition file_view.hpp:39
Definition resource_view.hpp:30
Definition resource_view.hpp:38
A read-only view of a resource.
Definition resource_view.hpp:64
hi::const_void_span const_void_span() const noexcept
Get a span to the memory mapping.
Definition resource_view.hpp:93