MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ operator>>() [2/2]

template<typename T >
TemporalWrapper< T > MayaFlux::operator>> ( std::shared_ptr< T >  entity,
const TimeSpec spec 
)

Creates a TemporalWrapper for an entity and a TimeSpec.

This operator overload implements the entity >> Time(seconds) syntax, which wraps the entity with a TimeSpec for subsequent temporal activation.

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++.

Template Parameters
TThe type of the entity to wrap.
Parameters
entityThe entity to activate.
specThe TimeSpec specifying the duration and channels.
Returns
A TemporalWrapper<T> representing the timed activation.

Definition at line 164 of file Temporal.hpp.

165{
166 return TemporalWrapper<T>(entity, spec);
167}
Wraps an entity with a TimeSpec for temporal activation.
Definition Temporal.hpp:83