|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
Represents a timed activation operation for processing nodes. More...
#include <Operators.hpp>
Collaboration diagram for MayaFlux::Kriya::NodeTimeSpec:Public Member Functions | |
| NodeTimeSpec (double seconds, std::optional< std::vector< uint32_t > > channels=std::nullopt) | |
| Constructs a NodeTimeSpec with the specified duration. | |
| NodeTimeSpec (double seconds, Vruta::TaskScheduler &scheduler, Nodes::NodeGraphManager &graph_manager) | |
| Constructs a NodeTimeSpec with explicit scheduler and graph manager. | |
| double | get_seconds () const |
| Gets the duration of this operation. | |
| bool | has_explicit_channels () const |
| Checks if explicit channels were specified. | |
| const std::vector< uint32_t > & | get_channels () const |
| Gets the list of channels to activate. | |
Private Attributes | |
| double | m_seconds |
| Duration of the operation in seconds. | |
| Vruta::TaskScheduler & | m_scheduler |
| Reference to the scheduler that will manage timing. | |
| Nodes::NodeGraphManager & | m_graph_manager |
| Reference to the graph manager that will manage node connections. | |
| std::optional< std::vector< uint32_t > > | m_channels |
Friends | |
| void | operator>> (std::shared_ptr< Nodes::Node >, const NodeTimeSpec &) |
| Grants the stream operator access to private members. | |
Represents a timed activation operation for processing nodes.
The NodeTimeSpec class encapsulates the concept of activating a processing node for a specific duration. It's designed to be used with the stream operator (>>) to create a fluent, expressive syntax for computational flow programming.
This approach is inspired by flow-based programming paradigms, which use operators to express data flow and timing relationships. It allows for a more intuitive, declarative way of expressing temporal operations compared to traditional function calls.
Example usage:
The NodeTimeSpec is part of a broader pattern of using operator overloading to create a domain-specific language for computational flow programming within C++.
Definition at line 33 of file Operators.hpp.