12#include "../void_span.hpp"
20namespace hi {
inline namespace v1 {
28 [[nodiscard]]
virtual hi::const_void_span const_void_span()
const noexcept = 0;
39 [[nodiscard]] hi::const_void_span const_void_span()
const noexcept override
41 return _value.const_void_span();
71 } : _pimpl(
std::make_shared<detail::resource_view_impl<std::decay_t<T>>>(std::forward<T>(view))) {}
75 [[nodiscard]]
bool empty()
const noexcept
77 return _pimpl ==
nullptr;
80 explicit operator bool()
const noexcept
90 return _pimpl->const_void_span();
96 static_assert(std::is_const_v<T>);
97 return as_span<T>(view.const_void_span());
100 [[nodiscard]]
friend std::string_view as_string_view(
const_resource_view const& view)
noexcept
102 return as_string_view(view.const_void_span());
105 [[nodiscard]]
friend bstring_view as_bstring_view(const_resource_view
const& view)
noexcept
107 return as_bstring_view(view.const_void_span());
#define hi_assert_not_null(x,...)
Assert if an expression is not nullptr.
Definition assert.hpp:118
Defines the file_view class.
@ other
The gui_event does not have associated data.
DOXYGEN BUG.
Definition algorithm.hpp:15
geometry/margins.hpp
Definition assert.hpp:18
Map a file into virtual memory.
Definition file_view.hpp:97
Definition resource_view.hpp:24
Definition resource_view.hpp:32
A read-only view of a resource.
Definition resource_view.hpp:58
hi::const_void_span const_void_span() const noexcept
Get a span to the memory mapping.
Definition resource_view.hpp:87