morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::reactive::InvalidationLink Class Referencefinal

A query's registration with the mutations that invalidate it. More...

#include <control.hpp>

Public Member Functions

 InvalidationLink (Refetchable &target) noexcept
void refetch () const
 Refetches the query, or does nothing once it is gone.
void clear () noexcept
 Unregisters the query; called by its destructor.
bool live () const noexcept
 Whether the query is still registered.

Detailed Description

A query's registration with the mutations that invalidate it.

The query owns the link and clears it when it is destroyed; a mutation holds it shared (MutationOptions::invalidates). So a mutation never refetches a query that is gone, and the two may be destroyed in either order.

Definition at line 71 of file control.hpp.

Constructor & Destructor Documentation

◆ InvalidationLink()

morph::reactive::InvalidationLink::InvalidationLink ( Refetchable & target)
inlineexplicitnoexcept
Parameters
targetThe query to refetch. Borrowed until clear().

Definition at line 74 of file control.hpp.

Member Function Documentation

◆ refetch()

void morph::reactive::InvalidationLink::refetch ( ) const
inline

Refetches the query, or does nothing once it is gone.

Definition at line 77 of file control.hpp.

◆ clear()

void morph::reactive::InvalidationLink::clear ( )
inlinenoexcept

Unregisters the query; called by its destructor.

Definition at line 84 of file control.hpp.

◆ live()

bool morph::reactive::InvalidationLink::live ( ) const
inlinenodiscardnoexcept

Whether the query is still registered.

Returns
False once the query has been destroyed.

Definition at line 88 of file control.hpp.


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