|
MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
|
Represents a timed activation operation for processing nodes, buffers, or networks. More...
#include <Temporal.hpp>
Collaboration diagram for MayaFlux::TimeSpec:Public Member Functions | |
| TimeSpec (double s) | |
| Constructs a TimeSpec with the specified duration. | |
| TimeSpec (double s, std::vector< uint32_t > ch) | |
| Constructs a TimeSpec with the specified duration and channels. | |
| TimeSpec (double s, uint32_t ch) | |
| Constructs a TimeSpec with the specified duration and a single channel. | |
Public Attributes | |
| double | seconds |
| std::optional< std::vector< uint32_t > > | channels |
Represents a timed activation operation for processing nodes, buffers, or networks.
The TimeSpec struct encapsulates the concept of activating a processing entity for a specific duration and (optionally) on specific channels. It's designed to be used with the stream operator (>>) and TemporalWrapper 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 TimeSpec 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 31 of file Temporal.hpp.