Deluge Firmware 1.3.0
Build date: 2026.11.28
Loading...
Searching...
No Matches
SampleFolderIndex::Space Class Reference

#include <sample_folder_index.h>

Public Member Functions

constexpr Space (size_t start, size_t blockSize)
 For a block of blockSize bytes whose first start bytes are taken.
constexpr std::optional< uint16_t > take (size_t entrySize, size_t namesSize)

Private Attributes

size_t entriesEnd_
size_t namesStart_
size_t blockSize_

Detailed Description

The room left in a block. Its files' Entries fill it from the front and their names from the back, so it holds as many files as their names leave room for.

Member Function Documentation

◆ take()

std::optional< uint16_t > SampleFolderIndex::Space::take ( size_t entrySize,
size_t namesSize )
inlineconstexpr

Takes room for one more Entry and for namesSize bytes of names, if there's that much left. Returns where the names go, as a distance back from the end of the block, which always fits in 16 bits.


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