|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
A token representing an action in a computational sequence. More...
#include <Chain.hpp>
Collaboration diagram for MayaFlux::Kriya::ActionToken:Public Member Functions | |
| ActionToken (std::shared_ptr< Nodes::Node > _node) | |
| Constructs an ActionToken representing a node connection. | |
| ActionToken (double _seconds) | |
| Constructs an ActionToken representing a time delay. | |
| ActionToken (std::function< void()> _func) | |
| Constructs an ActionToken representing a function call. | |
Public Attributes | |
| Utils::ActionType | type |
| The type of action this token represents. | |
| std::shared_ptr< Nodes::Node > | node |
| The processing node to connect (for NODE type tokens) | |
| std::function< void()> | func |
| The function to call (for FUNCTION type tokens) | |
| double | seconds = 0.F |
| The delay duration in seconds (for TIME type tokens) | |
A token representing an action in a computational sequence.
The ActionToken class represents a single action in a sequence, which can be a node connection, a time delay, or a function call. It's designed to be used with the Sequence class to create expressive sequences of computational operations.
This approach is inspired by dataflow programming and reactive systems, which use similar concepts to represent sequences of computational events. It allows for a more intuitive, declarative way of expressing sequences compared to traditional imperative programming.
ActionTokens are typically created implicitly through conversions from nodes, time values, or functions, making the API more concise and expressive.