|
DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
|
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 159 of file StateBlob.h.
|
inline |
Definition at line 162 of file StateBlob.h.
|
inlinenoexcept |
Definition at line 246 of file StateBlob.h.
|
inlinenoexcept |
Definition at line 198 of file StateBlob.h.
|
inlinenoexcept |
Definition at line 199 of file StateBlob.h.
|
inlinenoexcept |
Definition at line 200 of file StateBlob.h.
|
inline |
Reads a bool, or defaultValue when the key is absent.
Definition at line 223 of file StateBlob.h.
|
inline |
Reads a float, or defaultValue when the key is absent.
Definition at line 203 of file StateBlob.h.
|
inline |
Reads an int32, or defaultValue when the key is absent.
Definition at line 215 of file StateBlob.h.
|
inline |
Reads a nested blob; empty when the key is absent.
Definition at line 231 of file StateBlob.h.