2
3
4
5
6
7
8
9
11#ifndef SHZ_VERSION_HPP
12#define SHZ_VERSION_HPP
30 constexpr version(uint8_t major, uint16_t minor, uint8_t patch)
noexcept:
43 constexpr version operator=(uint32_t rhs)
noexcept { value_ = rhs;
return *
this; }
46 constexpr uint8_t
major()
const noexcept {
return (value_ >> 24) & 0xff; }
49 constexpr uint16_t
minor()
const noexcept {
return (value_ >> 8) & 0xffff; }
52 constexpr uint8_t
patch()
const noexcept {
return value_ & 0xff; }
Class representing a full SH4ZAM API version.
constexpr uint8_t major() const noexcept
Extracts the major component value from a full version.
static constexpr version compiled() noexcept
Compile-time version of SH4ZAM headers which are being included.
constexpr version operator=(uint32_t rhs) noexcept
Assignment operator for assigning a version to a full version ID value.
constexpr uint8_t patch() const noexcept
Extracts the patch component value from a full version.
constexpr operator shz_version_t() const noexcept
Implicit conversion operator to make this class automatically comparable to a uint32_t.
constexpr uint16_t minor() const noexcept
Extracts the minor component value from a full version.
static version linked() noexcept
Link-time version of SH4ZAM library which was linked against.
constexpr version(uint8_t major, uint16_t minor, uint8_t patch) noexcept
Constructs a full version from the given component values.
constexpr version(shz_version_t value) noexcept
Constructs a version from the given full value.
Namespace enclosing the SH4ZAM C++ API.
#define SHZ_VERSION_INIT(major, minor, patch)
Packs values of individual version components into a SH4ZAM full version value.
#define SHZ_VERSION
Current SH4ZAM full compile-time version identifier, integer-compatible.
shz_version_t shz_version_linked(void)
Returns the full version of SH4ZAM that was linked against.
uint32_t shz_version_t
Integer-compatible value type containing a full SH4ZAM version.