Asset representing an input layout loaded from a .tlayout file.
More...
#include <input_layout.hpp>
|
| | InputLayout (const toml::table &table, Handle< Schema > schema={}) |
| | Parses the layout from a TOML table, keeping all keys for round-trip serialization.
|
| auto | type () const -> std::string_view override |
| auto | name () const noexcept -> std::string_view |
| auto | layers () const noexcept -> const std::vector< std::string > & |
| auto | entries () const noexcept -> const std::vector< Entry > & |
|
| Data (const toml::table &table, Handle< Schema > schema={}) |
|
| Data (const toml::table &table, Handle< Schema > schema, KeepAllKeysTag) |
| | Stores the schema handle for round-trip serialization but runs free-form buildRoot, keeping every TOML key.
|
|
auto | operator[] (std::string_view k) -> DataValue & |
|
auto | operator[] (std::string_view k) const -> const DataValue & |
|
auto | contains (std::string_view k) const -> bool |
|
auto | root () const -> const DataValue & |
|
auto | schema () const -> const Handle< Schema > & |
| auto | serialize (SaveMode mode) const -> std::vector< uint8_t > override |
| virtual void | reload (const toml::table &table) |
| | Re-parses the asset contents in place.
|
|
| Asset (const Asset &)=delete |
|
auto | operator= (const Asset &) -> Asset &=delete |
|
auto | refCount () const noexcept -> uint32_t |
|
| static auto | isActiveForLayer (const Entry &entry, std::string_view layer) noexcept -> bool |
| | Whether an action is active for a given layer under this layout.
|
|
|
static constexpr std::string_view | default_layer = "default" |
| | Hidden layer that is always present in every layout.
|
|
static constexpr KeepAllKeysTag | keep_all_keys {} |
|
| void | onReloaded () override |
|
void | addRef () noexcept |
|
void | release () noexcept |
Asset representing an input layout loaded from a .tlayout file.
◆ InputLayout()
| assets::InputLayout::InputLayout |
( |
const toml::table & | table, |
|
|
Handle< Schema > | schema = {} ) |
|
explicit |
Parses the layout from a TOML table, keeping all keys for round-trip serialization.
- Parameters
-
| table | Parsed contents of the .tlayout file |
◆ entries()
| auto assets::InputLayout::entries |
( |
| ) |
const -> const std::vector< Entry > & |
|
nodiscardnoexcept |
- Returns
- The action entries declared by this layout
◆ isActiveForLayer()
| auto assets::InputLayout::isActiveForLayer |
( |
const Entry & | entry, |
|
|
std::string_view | layer ) -> bool |
|
staticnodiscardnoexcept |
Whether an action is active for a given layer under this layout.
- Parameters
-
| entry | The action entry to test |
| layer | The active layer name |
- Returns
- true when the layer passes the entry's included/excluded rules
◆ layers()
| auto assets::InputLayout::layers |
( |
| ) |
const -> const std::vector< std::string > & |
|
nodiscardnoexcept |
- Returns
- Every layer in the layout
◆ name()
| auto assets::InputLayout::name |
( |
| ) |
const -> std::string_view |
|
nodiscardnoexcept |
- Returns
- The layout's display name
◆ onReloaded()
| void assets::InputLayout::onReloaded |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ type()
| auto assets::InputLayout::type |
( |
| ) |
const -> std::string_view |
|
inlinenodiscardoverridevirtual |
The documentation for this class was generated from the following files:
- engine/src/toast/input/assets/input_layout.hpp
- engine/src/toast/input/assets/input_assets.cpp