API Reference — dna/layers/HeaderReader
class HeaderReader
Read the file format generation and version numbers from a DNA rig's header block.
When to use this
Query this interface when you need to determine the DNA file format version before deciding how to parse or validate a rig. Both accessors together identify the exact format revision — use getFileFormatGeneration() to distinguish major, structurally incompatible revisions and getFileFormatVersion() to distinguish minor revisions within a generation. Do not inherit from this class directly; inherit from Reader instead.
Example
// reader is a concrete Reader instance (e.g. BinaryStreamReader)
HeaderReader* hdr = reader;
std::uint16_t gen = hdr->getFileFormatGeneration();
std::uint16_t ver = hdr->getFileFormatVersion();
// e.g. gen == 3, ver == 0 identifies a specific DNA format revision
Returns
std::uint16_t — unsigned 16-bit integer representing the file format generation or version number stored in the DNA header.
Watch out for
- Do not inherit from
HeaderReaderdirectly. The Doxygen@warningstates that implementors must inherit fromReaderitself;HeaderReaderis an abstract accessor layer only.