GGUI::SnapshotRead class

A read lock on a snapshot: it can't change or be reused while this exists.

Constructors, destructors, conversion operators

SnapshotRead() defaulted
No snapshot.
~SnapshotRead()
Lets the snapshot go.
SnapshotRead(SnapshotRead&& other) noexcept
Takes other's lock.
SnapshotRead(const SnapshotRead&) deleted
operator bool() const explicit
False if nothing has been published.

Public functions

auto operator=(SnapshotRead&& other) -> SnapshotRead& noexcept
Lets its own snapshot go and takes other's lock.
auto operator=(const SnapshotRead&) -> SnapshotRead& deleted
auto operator->() const -> const GGSnapshot*
The snapshot.
auto operator*() const -> const GGSnapshot&
The snapshot.
auto Again() const -> SnapshotRead
A second lock on the same snapshot.