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

A transfer's share of its screen's pending count. More...

#include <interpreter.hpp>

Public Member Functions

 TransferHold (ScreenCore &core, std::weak_ptr< bool > alive)
 A hold that counts nothing yet.
void take ()
 Counts the transfer, unless it has already settled.
void release ()
 Gives the count back, if one was taken and the screen is still there; the transfer counts no more.

Detailed Description

A transfer's share of its screen's pending count.

A transfer is pending from the host accepting it to its settle: its completion carries on the command list that started it, which the close protocol and save-and-close wait for. The count is taken once the host accepts, so a refused transfer never counts, and a host that settles before it returns leaves nothing taken. It is given back once, also when the transfer settles after its scope is gone, but not after the screen itself is gone, since the count went with it.

Definition at line 5075 of file interpreter.hpp.

Constructor & Destructor Documentation

◆ TransferHold()

morph::ui::detail::TransferHold::TransferHold ( ScreenCore & core,
std::weak_ptr< bool > alive )
inline

A hold that counts nothing yet.

Parameters
coreThe screen whose count it moves.
aliveExpires with the screen.

Definition at line 5080 of file interpreter.hpp.

Member Function Documentation

◆ take()

void morph::ui::detail::TransferHold::take ( )
inline

Counts the transfer, unless it has already settled.

Definition at line 5083 of file interpreter.hpp.

◆ release()

void morph::ui::detail::TransferHold::release ( )
inline

Gives the count back, if one was taken and the screen is still there; the transfer counts no more.

Definition at line 5091 of file interpreter.hpp.


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