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

◆ for_each_in_window()

template<FieldArray Array>
template<typename Fn >
void MayaFlux::Kakshya::DataFieldTraversal< Array >::for_each_in_window ( Fn &&  fn) const
inline

Apply a callable to each available element in the current window.

Template Parameters
FnCallable accepting a borrowed element.
Parameters
fnOperation to apply in slice order.
Note
An index where at() returns disengaged is skipped entirely, not visited with a default value. fn may be called fewer than the window's size() times.

Definition at line 164 of file DataFieldTraversal.hpp.

165 {
166 auto window = current();
167 if (!window)
168 return;
169
170 for (size_t i = 0; i < window->size(); ++i) {
171 if (auto element = window->at(i))
172 std::invoke(fn, *element);
173 }
174 }
std::weak_ptr< Core::Window > window
Definition Picker.cpp:23
auto current() const
Borrow the current window, including a short final window.

References MayaFlux::Kakshya::DataFieldTraversal< Array >::current(), and window.

+ Here is the call graph for this function: