GGUI::SnapshotOrder class

Draw order: slots of GGSnapshot::Primitives, back to front. Shared between snapshots while the set of visible things and their order doesn't change.

Constructors, destructors, conversion operators

SnapshotOrder() defaulted
Empty.
~SnapshotOrder()
SnapshotOrder(const SnapshotOrder& other)
A copy of the list, shared with nothing.

Public functions

auto operator=(const SnapshotOrder& other) -> SnapshotOrder&
The same, assigned.
auto Slots() const -> std::span<const uint32_t>
The slots, back to front.
auto Shares(const SnapshotOrder& other) const -> bool
True if both hold the same list object.
auto Bytes() const -> size_t
Memory held.
void ShareFrom(const SnapshotOrder* other)
Writer: share other's list (null: none).
void Take(std::vector<uint32_t>& slots)
Writer: take ownership of slots as a new list. slots is left empty.