|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
A sequence of computational operations with a fluent, declarative API. More...
#include <Chain.hpp>
Collaboration diagram for MayaFlux::Kriya::Sequence:Public Member Functions | |
| Sequence & | operator>> (const ActionToken &token) |
| Adds an action to the sequence. | |
| void | execute () |
| Executes the sequence using the global managers. | |
| void | execute (const std::shared_ptr< Nodes::NodeGraphManager > &node_manager, const std::shared_ptr< Vruta::TaskScheduler > &scheduler) |
| Executes the sequence with explicit managers. | |
Private Attributes | |
| std::vector< ActionToken > | tokens |
| Collection of actions in this sequence. | |
A sequence of computational operations with a fluent, declarative API.
The Sequence class provides a way to create sequences of computational operations using a fluent, declarative API with the stream operator (>>). It's designed for creating expressive sequences of node connections, time delays, and function calls.
This approach is inspired by dataflow programming and reactive systems, which use similar operators to express both data flow and temporal sequencing. It allows for a more intuitive, declarative way of expressing sequences compared to traditional imperative programming.
Example usage:
This creates a sequence that:
The Sequence is part of a broader pattern of using operator overloading to create a domain-specific language for computational flow programming within C++.