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

A Fenwick tree of slot occupancy: how many occupied slots precede a slot. More...

#include <view_change.hpp>

Public Member Functions

 SlotCounter (std::size_t size)
 An empty counter over size slots.
void occupy (std::size_t slot)
 Marks a slot occupied.
void release (std::size_t slot)
 Marks a slot free.
std::size_t before (std::size_t slot) const
 Occupied slots before slot.

Detailed Description

A Fenwick tree of slot occupancy: how many occupied slots precede a slot.

Definition at line 83 of file view_change.hpp.

Constructor & Destructor Documentation

◆ SlotCounter()

morph::table::detail::SlotCounter::SlotCounter ( std::size_t size)
inlineexplicit

An empty counter over size slots.

Parameters
sizeSlot count.

Definition at line 87 of file view_change.hpp.

Member Function Documentation

◆ occupy()

void morph::table::detail::SlotCounter::occupy ( std::size_t slot)
inline

Marks a slot occupied.

Parameters
slotThe slot.

Definition at line 91 of file view_change.hpp.

◆ release()

void morph::table::detail::SlotCounter::release ( std::size_t slot)
inline

Marks a slot free.

Parameters
slotThe slot.

Definition at line 95 of file view_change.hpp.

◆ before()

std::size_t morph::table::detail::SlotCounter::before ( std::size_t slot) const
inlinenodiscard

Occupied slots before slot.

Parameters
slotThe slot.
Returns
The count.

Definition at line 100 of file view_change.hpp.


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