|
HikoGUI
A low latency retained GUI
|
#include <ttauri/static_resource_view.hpp>
Public Member Functions | |
| static_resource_view (std::string const &filename) | |
| static_resource_view (static_resource_view const &other)=default | |
| static_resource_view & | operator= (static_resource_view const &other)=default |
| static_resource_view (static_resource_view &&other)=default | |
| static_resource_view & | operator= (static_resource_view &&other)=default |
| size_t | offset () const noexcept override |
| Offset into the resource file. | |
| size_t | size () const noexcept override |
| Size of the memory mapping. | |
| std::byte const * | data () const noexcept override |
| Pointer to the memory mapping. | |
| std::span< std::byte const > | bytes () const noexcept override |
| Get a span to the memory mapping. | |
| std::string_view | string_view () const noexcept override |
| Get a span to the memory mapping. | |
Public Member Functions inherited from tt::resource_view | |
| resource_view (resource_view const &other)=default | |
| resource_view (resource_view &&other)=default | |
| resource_view & | operator= (resource_view const &other)=default |
| resource_view & | operator= (resource_view &&other)=default |
| operator std::span< std::byte const > () const noexcept | |
Static Public Member Functions | |
| static std::unique_ptr< resource_view > | loadView (std::string const &location) |
| static std::span< std::byte const > | get_static_resource (std::string const &key) |
| Get the data of a static resource. | |
| static void | add_static_resource (std::string const &key, std::span< std::byte const > value) noexcept |
| Add static resource. | |
A resource that was included in the executable.
|
staticnoexcept |
Add static resource.
This function should only be called on resources that are linked into the executable and therefor only be called by the application class.
| key | Name of the resource. |
| value | A span to the constant byte array |
|
inlineoverridevirtualnoexcept |
Get a span to the memory mapping.
Implements tt::resource_view.
|
inlineoverridevirtualnoexcept |
Pointer to the memory mapping.
Implements tt::resource_view.
|
static |
Get the data of a static resource.
These are resources that where linked into the exectuable.
| key | Name of the resource. |
| key_error | Thrown when static resource could not be found. |
|
inlineoverridevirtualnoexcept |
|
inlineoverridevirtualnoexcept |
Size of the memory mapping.
Implements tt::resource_view.
|
inlineoverridevirtualnoexcept |
Get a span to the memory mapping.
Implements tt::resource_view.