Skip to content

Struct star::FileHeader

ClassList > star > FileHeader

File header structure (31 bytes fixed size). More...

  • #include <stards.h>

Public Attributes

Type Name
uint64_t entry_count = 0
uint8_t format_version = 1
uint64_t header_size = 0
uint32_t key_registry_count = 0
uint32_t layer_count = 0
char magic = {'S','T','A','R','D','S'}

Public Functions

Type Name
std::string getVersionString () const
Get format version string.
bool isValid () const
Check if magic string is valid.
void read (std::istream & is)
Read header from stream.
void write (std::ostream & os) const
Write header to stream.

Public Static Functions

Type Name
size_t size ()
Get fixed size of FileHeader struct.

Detailed Description

Layout: * magic[6]: "STARDS" magic string (6 bytes) * format_version: File format version (1 byte, currently 1) * header_size: Total size of header + index section (8 bytes) * entry_count: Number of entries in the index (8 bytes) * layer_count: Number of named layers, excluding base (4 bytes) * key_registry_count: Number of keys in the global key registry (4 bytes)

Note: Software/library version is NOT stored in the file, only the format version.

Public Attributes Documentation

variable entry_count

uint64_t star::FileHeader::entry_count;

variable format_version

uint8_t star::FileHeader::format_version;

variable header_size

uint64_t star::FileHeader::header_size;

variable key_registry_count

uint32_t star::FileHeader::key_registry_count;

variable layer_count

uint32_t star::FileHeader::layer_count;

variable magic

char star::FileHeader::magic[MAGIC_STRING_LENGTH];

Public Functions Documentation

function getVersionString

Get format version string.

inline std::string star::FileHeader::getVersionString () const


function isValid

Check if magic string is valid.

inline bool star::FileHeader::isValid () const


function read

Read header from stream.

inline void star::FileHeader::read (
    std::istream & is
) 


function write

Write header to stream.

inline void star::FileHeader::write (
    std::ostream & os
) const


Public Static Functions Documentation

function size

Get fixed size of FileHeader struct.

static inline size_t star::FileHeader::size () 



The documentation for this class was generated from the following file StarDS/include/stards.h