MayaFlux 0.3.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 26 of file Chain.cpp.

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

References count, and m_events.