Unravel Engine C++ Reference
Loading...
Searching...
No Matches
seq::seq_action Struct Reference

Represents an action within the sequence management system. Contains lifecycle events and management functions. More...

#include <seq_action.h>

Public Types

using updater_t = std::function<state_t(duration_t, seq_action&)>
 Type alias for an updater function that defines the action's behavior.
 
using creator_t = std::function<updater_t()>
 Type alias for a creator function that generates an updater function for the action.
 

Public Member Functions

 seq_action ()=default
 
 ~seq_action ()=default
 
 seq_action (creator_t &&creator, duration_t duration, sentinel_t sentinel)
 Constructs a seq_action.
 
 seq_action (const seq_action &)=default
 
 seq_action (seq_action &&)=default
 
auto operator= (const seq_action &) -> seq_action &=default
 
auto operator= (seq_action &&) -> seq_action &=default
 
auto get_id () const -> seq_id_t
 Gets the unique ID of the action.
 
 operator seq_id_t () const
 Converts the action to its unique ID.
 
auto is_valid () const noexcept -> bool
 Checks if the action is valid.
 

Public Attributes

hpp::event< void()> on_begin
 Event emitted when the action is started.
 
hpp::event< void()> on_step
 Event emitted every time the action value is updated.
 
hpp::event< void()> on_update
 Event emitted every frame while the action is running.
 
hpp::event< void()> on_end
 Event emitted when the action is finished. Not emitted if the action is stopped prematurely.
 
seq_inspect_info::ptr info
 Gets a pointer to the action's inspection information.
 

Friends

struct seq_private
 

Detailed Description

Represents an action within the sequence management system. Contains lifecycle events and management functions.

Definition at line 17 of file seq_action.h.

Member Typedef Documentation

◆ creator_t

using seq::seq_action::creator_t = std::function<updater_t()>

Type alias for a creator function that generates an updater function for the action.

Returns
An updater function.

Definition at line 33 of file seq_action.h.

◆ updater_t

Type alias for an updater function that defines the action's behavior.

Parameters
deltaThe time delta since the last update.
actionReference to the current action.
Returns
The current state of the action.

Definition at line 27 of file seq_action.h.

Constructor & Destructor Documentation

◆ seq_action() [1/4]

seq::seq_action::seq_action ( )
default

◆ ~seq_action()

seq::seq_action::~seq_action ( )
default

◆ seq_action() [2/4]

seq::seq_action::seq_action ( creator_t && creator,
duration_t duration,
sentinel_t sentinel )

Constructs a seq_action.

Parameters
creatorA function that creates an updater for the action.
durationThe total duration of the action.
sentinelA sentinel value for internal state management.

Definition at line 8 of file seq_action.cpp.

◆ seq_action() [3/4]

seq::seq_action::seq_action ( const seq_action & )
default

◆ seq_action() [4/4]

seq::seq_action::seq_action ( seq_action && )
default

Member Function Documentation

◆ get_id()

auto seq::seq_action::get_id ( ) const -> seq_id_t

Gets the unique ID of the action.

Returns
The unique ID of the action.

Definition at line 20 of file seq_action.cpp.

◆ is_valid()

auto seq::seq_action::is_valid ( ) const -> bool
noexcept

Checks if the action is valid.

Returns
True if the action is valid, false otherwise.

Definition at line 30 of file seq_action.cpp.

◆ operator seq_id_t()

seq::seq_action::operator seq_id_t ( ) const

Converts the action to its unique ID.

Returns
The unique ID of the action.

Definition at line 25 of file seq_action.cpp.

◆ operator=() [1/2]

auto seq::seq_action::operator= ( const seq_action & ) -> seq_action &=default
default

◆ operator=() [2/2]

auto seq::seq_action::operator= ( seq_action && ) -> seq_action &=default
default

Friends And Related Symbol Documentation

◆ seq_private

friend struct seq_private
friend

Definition at line 19 of file seq_action.h.

Member Data Documentation

◆ info

seq_inspect_info::ptr seq::seq_action::info

Gets a pointer to the action's inspection information.

Definition at line 75 of file seq_action.h.

◆ on_begin

hpp::event<void()> seq::seq_action::on_begin

Event emitted when the action is started.

Definition at line 55 of file seq_action.h.

◆ on_end

hpp::event<void()> seq::seq_action::on_end

Event emitted when the action is finished. Not emitted if the action is stopped prematurely.

Definition at line 70 of file seq_action.h.

◆ on_step

hpp::event<void()> seq::seq_action::on_step

Event emitted every time the action value is updated.

Definition at line 60 of file seq_action.h.

◆ on_update

hpp::event<void()> seq::seq_action::on_update

Event emitted every frame while the action is running.

Definition at line 65 of file seq_action.h.


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