Toast Engine
Loading...
Searching...
No Matches
assets::Action Class Reference

Asset representing one input action loaded from a .taction file. More...

#include <input_action.hpp>

Inheritance diagram for assets::Action:
Collaboration diagram for assets::Action:

Public Member Functions

 Action (const toml::table &table, Handle< Schema > schema={})
auto type () const -> std::string_view override
auto get () const -> toml::table
auto name () const noexcept -> std::string_view
auto functionName () const noexcept -> std::string_view
auto description () const noexcept -> std::string_view
auto valueType () const noexcept -> ActionValueType
auto accumulation () const noexcept -> AccumulationType
Public Member Functions inherited from assets::Data
 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 type () const -> std::string_view override
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.
Public Member Functions inherited from assets::Asset
 Asset (const Asset &)=delete
auto operator= (const Asset &) -> Asset &=delete
auto refCount () const noexcept -> uint32_t

Protected Member Functions

void onReloaded () override
Protected Member Functions inherited from assets::Asset
void addRef () noexcept
void release () noexcept

Additional Inherited Members

Static Public Attributes inherited from assets::Data
static constexpr KeepAllKeysTag keep_all_keys {}
Protected Attributes inherited from assets::Data
DataValue m_root
 Object DataValue holding all fields.
Handle< Schema > m_schema
 optional
bool m_keep_all_keys = false

Detailed Description

Asset representing one input action loaded from a .taction file.

Member Function Documentation

◆ accumulation()

auto assets::Action::accumulation ( ) const -> AccumulationType
nodiscardnoexcept
Returns
How values from multiple binds are combined
Here is the caller graph for this function:

◆ description()

auto assets::Action::description ( ) const -> std::string_view
nodiscardnoexcept
Returns
The action's human-readable description
Here is the caller graph for this function:

◆ functionName()

auto assets::Action::functionName ( ) const -> std::string_view
nodiscardnoexcept
Returns
The reflected function this action invokes
Here is the caller graph for this function:

◆ get()

auto assets::Action::get ( ) const -> toml::table
nodiscard
Returns
A reconstructed TOML table preserving all bind, trigger and modifier entries
Here is the caller graph for this function:

◆ name()

auto assets::Action::name ( ) const -> std::string_view
nodiscardnoexcept
Returns
The action's display name
Here is the caller graph for this function:

◆ onReloaded()

void assets::Action::onReloaded ( )
overrideprotectedvirtual

Reimplemented from assets::Data.

◆ type()

auto assets::Action::type ( ) const -> std::string_view
inlinenodiscardoverridevirtual

Implements assets::Asset.

◆ valueType()

auto assets::Action::valueType ( ) const -> ActionValueType
nodiscardnoexcept
Returns
The value domain (0D, 1D or 2D)
Here is the caller graph for this function:

The documentation for this class was generated from the following files:
  • engine/src/toast/input/assets/input_action.hpp
  • engine/src/toast/input/assets/input_assets.cpp