morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::ui::detail::ForEachSession Class Referenceabstract

One mount's use of a ForEach: the latest snapshot of the rows, and a way to make row slots from it. More...

#include <view.hpp>

Public Member Functions

 ForEachSession (ForEachSession const &)=delete
ForEachSession & operator= (ForEachSession const &)=delete
 ForEachSession (ForEachSession &&)=delete
ForEachSession & operator= (ForEachSession &&)=delete
virtual std::vector< Key > pull ()=0
 Reads the rows (tracked, inside the mount's Effect), keeps them as the snapshot, and returns their keys.
virtual std::unique_ptr< RowSlot > makeRow (std::size_t index)=0
 Makes the slot for one snapshot entry, building its view. The mount calls it untracked.

Detailed Description

One mount's use of a ForEach: the latest snapshot of the rows, and a way to make row slots from it.

Definition at line 739 of file view.hpp.

Member Function Documentation

◆ pull()

virtual std::vector< Key > morph::ui::detail::ForEachSession::pull ( )
nodiscardpure virtual

Reads the rows (tracked, inside the mount's Effect), keeps them as the snapshot, and returns their keys.

Returns
One key per row, in order, duplicates included.

◆ makeRow()

virtual std::unique_ptr< RowSlot > morph::ui::detail::ForEachSession::makeRow ( std::size_t index)
nodiscardpure virtual

Makes the slot for one snapshot entry, building its view. The mount calls it untracked.

Parameters
indexA position in the latest snapshot.
Returns
The slot. It refers to this session, which must outlive it.

The documentation for this class was generated from the following file: