|  | Deluge Firmware 1.3.0
    Build date: 2025.10.27 | 
#include <cluster.h>


| Public Types | |
| enum class | Type { EMPTY , SAMPLE , GENERAL_MEMORY , SAMPLE_CACHE , PERC_CACHE_FORWARDS , PERC_CACHE_REVERSED , OTHER } | 
| Public Types inherited from Stealable | |
| using | link_type = etl::bidirectional_link<0> | 
| Public Member Functions | |
| void | destroy () | 
| Cluster ()=default | |
| void | convertDataIfNecessary () | 
| This function goes through the contents of the cluster, and converts them to the Deluge's native PCM 24-bit format if needed. | |
| bool | mayBeStolen (void *thingNotToStealFrom) override | 
| void | steal (char const *errorCode) override | 
| StealableQueue | getAppropriateQueue () const override | 
| void | addReason () | 
| Public Member Functions inherited from Stealable | |
| bool | operator== (const Stealable &other) const | 
| Object equality is based on pointer equality. | |
| Static Public Member Functions | |
| static Cluster * | create (Cluster::Type type=Cluster::Type::SAMPLE, bool shouldAddReasons=true, void *dontStealFromThing=nullptr) | 
| static void | setSize (size_t size) | 
| Public Attributes | |
| Cluster::Type | type | 
| uint32_t | clusterIndex = 0 | 
| int32_t | numReasonsToBeLoaded = 0 | 
| int8_t | numReasonsHeldBySampleRecorder = 0 | 
| bool | extraBytesAtStartConverted = false | 
| bool | extraBytesAtEndConverted = false | 
| Sample * | sample = nullptr | 
| SampleCache * | sampleCache = nullptr | 
| char | firstThreeBytesPreDataConversion [3] | 
| bool | loaded = false | 
| char | dummy [CACHE_LINE_SIZE] | 
| char | data [CACHE_LINE_SIZE] | 
| Public Attributes inherited from Stealable | |
| uint32_t | lastTraversalNo = 0xFFFFFFFF | 
| Static Public Attributes | |
| static constexpr size_t | kSizeFAT16Max = 32768 | 
| static size_t | size = 32768 | 
| static size_t | size_magnitude = 15 | 
Header data for a cluster. The actual cluster data is expected to be in the same allocation, after this class member. To correctly allocate an instance of this class, you must also allocate Cluster::size bytes with enough padding to safely absorb an offset of at least CACHE_LINE_SIZE.
| 
 | default | 
Warning! do not call this constructor directly! It must be called via placement new after allocating a region with the General Memory Allocator!
| 
 | nodiscardoverridevirtual | 
Implements Stealable.
| 
 | overridevirtual | 
Implements Stealable.
| 
 | overridevirtual | 
Implements Stealable.