HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
hi::v1::const_resource_view Class Reference

#include <hikogui/file/resource_view.hpp>

Public Member Functions

 const_resource_view (const_resource_view const &other)=default
 const_resource_view (const_resource_view &&other)=default
const_resource_view & operator= (const_resource_view const &other)=default
const_resource_view & operator= (const_resource_view &&other)=default
template<typename T>
requires requires { std::declval<std::decay_t<T>>().const_void_span(); }
 const_resource_view (T &&view) noexcept
 const_resource_view (std::filesystem::path const &path)
bool empty () const noexcept
 operator bool () const noexcept
hi::const_void_span const_void_span () const noexcept
 Get a span to the memory mapping.

Friends

template<typename T>
std::span< T > as_span (const_resource_view const &view) noexcept
std::string_view as_string_view (const_resource_view const &view) noexcept
bstring_view as_bstring_view (const_resource_view const &view) noexcept

Detailed Description

A read-only view of a resource.

This is a type erased object which holds a view to a resource and exposes a common interface to access the bytes using as_span(), as_string_view() or as_bstring_view().

Member Function Documentation

◆ const_void_span()

hi::const_void_span hi::v1::const_resource_view::const_void_span ( ) const
inlinenodiscardnoexcept

Get a span to the memory mapping.


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