|
DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
|
Tolerant reader: missing keys yield defaults, unknown keys are skipped. More...
#include <StateBlob.h>
Classes | |
| struct | Entry |
| Access for generic tooling (JSON rendering, preset browsers). More... | |
Public Member Functions | |
| StateReader (const uint8_t *data, size_t size) | |
| bool | isValid () const noexcept |
| uint32_t | processorId () const noexcept |
| uint16_t | processorVersion () const noexcept |
| float | read (const char *key, float defaultValue) const |
Reads a float, or defaultValue when the key is absent. | |
| int32_t | read (const char *key, int32_t defaultValue) const |
Reads an int32, or defaultValue when the key is absent. | |
| bool | read (const char *key, bool defaultValue) const |
Reads a bool, or defaultValue when the key is absent. | |
| std::vector< uint8_t > | readBlob (const char *key) const |
| Reads a nested blob; empty when the key is absent. | |
| const std::vector< Entry > & | entries () const noexcept |
Tolerant reader: missing keys yield defaults, unknown keys are skipped.
A truncated or corrupt blob parses as far as it stays consistent: entries decoded before the damage remain readable, and isValid() reports whether the FULL blob parsed. Bounds are checked entry by entry, so no input can read outside [data, data+size).
Definition at line 160 of file StateBlob.h.
|
inline |
Definition at line 163 of file StateBlob.h.
|
inlinenoexcept |
Definition at line 247 of file StateBlob.h.
|
inlinenoexcept |
Definition at line 199 of file StateBlob.h.
|
inlinenoexcept |
Definition at line 200 of file StateBlob.h.
|
inlinenoexcept |
Definition at line 201 of file StateBlob.h.
|
inline |
Reads a bool, or defaultValue when the key is absent.
Definition at line 224 of file StateBlob.h.
|
inline |
Reads a float, or defaultValue when the key is absent.
Definition at line 204 of file StateBlob.h.
|
inline |
Reads an int32, or defaultValue when the key is absent.
Definition at line 216 of file StateBlob.h.
|
inline |
Reads a nested blob; empty when the key is absent.
Definition at line 232 of file StateBlob.h.