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

◆ repeat()

EventChain & MayaFlux::Kriya::EventChain::repeat ( size_t  count)

Repeat the last event N times.

Parameters
countNumber of times to repeat
Returns
Reference to this EventChain for method chaining

Definition at line 25 of file Chain.cpp.

26{
27 if (m_events.empty() || count == 0)
28 return *this;
29
30 auto last_event = m_events.back();
31
32 for (size_t i = 0; i < count; ++i) {
33 m_events.push_back(last_event);
34 }
35
36 return *this;
37}
size_t count
std::vector< TimedEvent > m_events
Collection of events in this chain.
Definition Chain.hpp:180

References count, and m_events.