MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::TemporalWrapper< T > Class Template Reference

Wraps an entity with a TimeSpec for temporal activation. More...

#include <Temporal.hpp>

+ Collaboration diagram for MayaFlux::TemporalWrapper< T >:

Public Member Functions

 TemporalWrapper (const std::shared_ptr< T > &entity, TimeSpec spec)
 
template<typename U >
requires std::derived_from<U, T>
 TemporalWrapper (const TemporalWrapper< U > &other)
 
std::shared_ptr< T > entity () const
 
const TimeSpecspec () const
 

Private Attributes

std::shared_ptr< T > m_entity
 
TimeSpec m_spec
 

Detailed Description

template<typename T>
class MayaFlux::TemporalWrapper< T >

Wraps an entity with a TimeSpec for temporal activation.

The TemporalWrapper class enables a fluent, expressive syntax for activating processing entities (nodes, buffers, networks) for a specific duration, using the stream operator (>>).

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

This 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 83 of file Temporal.hpp.


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