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

◆ materialize_next()

bool MayaFlux::Kakshya::CompositeContainer::materialize_next ( )

Copy the next bounded window into independent storage.

Returns
True if a nonempty window was copied; false at the end or if an element could not be copied. On failure, the prior window and current position are preserved.
Note
Selected text is copied into the window's own text store.

Definition at line 46 of file CompositeContainer.cpp.

47{
48 if (at_end())
49 return false;
50
51 auto traversal = traverse(m_batch_size);
52 traversal.seek(m_next_element);
53 const auto window = traversal.current();
54 if (!window || window->size() == 0)
55 return false;
56
57 auto next = copy_slice(*window);
58 if (!next)
59 return false;
60
61 m_materialized_data = std::move(*next);
62 m_next_element += window->size();
63 return true;
64}
std::weak_ptr< Core::Window > window
Definition Picker.cpp:23
DataFieldTraversal< CompositeArray > traverse(size_t batch_size=1) const noexcept
Create an independent traversal over elements.
bool at_end() const noexcept
Whether materialize_next() has no more elements.

References at_end(), m_batch_size, m_materialized_data, m_next_element, traverse(), and window.

+ Here is the call graph for this function: