Pack v2.2.1
Common Class Referencefinal

Common Pack functions. More...

#include <common.hpp>

Static Public Member Functions

static void getLibraryVersion (uint8_t &major, uint8_t &minor, uint8_t &patch) noexcept
 Returns Pack library hardcoded version. (MT-Safe).
static void readHeader (const filesystem::path &filePath, PackHeader &header)
 Reads Pack header from the file. (MT-Safe).
static bool tryReadHeader (const filesystem::path &filePath, PackHeader &header) noexcept
 Tries to read Pack header from the file. (MT-Safe).

Detailed Description

Common Pack functions.

See the common.h

Member Function Documentation

◆ getLibraryVersion()

void getLibraryVersion ( uint8_t & major,
uint8_t & minor,
uint8_t & patch )
inlinestaticnoexcept

Returns Pack library hardcoded version. (MT-Safe).

See the getPackLibraryVersion().

Parameters
[out]majorreference to the uint32_t major version
[out]minorreference to the uint32_t minor version
[out]patchreference to the uint32_t patch version

◆ readHeader()

void readHeader ( const filesystem::path & filePath,
PackHeader & header )
inlinestatic

Reads Pack header from the file. (MT-Safe).

See the readPackHeader().

Parameters
[in]filePathtarget file path string
[out]headerreference to the PackHeader structure
Exceptions
Errorwith a PackResult string on failure.

◆ tryReadHeader()

bool tryReadHeader ( const filesystem::path & filePath,
PackHeader & header )
inlinestaticnoexcept

Tries to read Pack header from the file. (MT-Safe).

See the readPackHeader().

Parameters
[in]filePathtarget file path string
[out]headerreference to the PackHeader structure
Returns
True on success and writes header data, otherwise false.