MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::TimeSpec Class Reference

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
 

Detailed Description

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:

// Activate a processing node for 2 seconds
process_node >> Time(2.0);
TimeSpec Time(double seconds, uint32_t channel)
Creates a TimeSpec with the specified duration and a single channel.
Definition Temporal.cpp:9

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.


The documentation for this class was generated from the following file: