HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Static Public Member Functions | Data Fields
tt::static_resource_item Struct Reference

Static Public Member Functions

static std::span< std::byte const > find (std::string_view filename) noexcept
 Search for a static resource item.
 
static tt_no_inline static_resource_item const * add (static_resource_item *new_item) noexcept
 Add a resource item to the list.
 

Data Fields

static_resource_item const * next
 
char const * filename
 
std::span< std::byte const > bytes
 

Member Function Documentation

◆ add()

static tt_no_inline static_resource_item const * tt::static_resource_item::add ( static_resource_item * new_item)
inlinestaticnoexcept

Add a resource item to the list.

This function should be used to initialize a static global variable which will modify the static_resource_list.

Example:

static static_resource_item tmp1 = {nullptr, "foo", foo_bytes};
static static_resource_item const *tmp2 = static_resource_item::add(&tmp1);
Definition static_resource_list.hpp:22
static tt_no_inline static_resource_item const * add(static_resource_item *new_item) noexcept
Add a resource item to the list.
Definition static_resource_list.hpp:53
Parameters
new_itemA pointer to the new item to be added to the list.
Returns
A pointer to the previous item, should be stored into a static global variable.

◆ find()

static std::span< std::byte const > tt::static_resource_item::find ( std::string_view filename)
inlinestaticnoexcept

Search for a static resource item.

Parameters
filenameThe filename of the resource to search for.
Returns
A byte-span, or an empty byte-span when not found.

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