4 #include <plugify_export.h>
19 Version(uint8_t major, uint8_t minor, uint8_t patch, uint8_t tweak) noexcept;
25 explicit Version(uint32_t version) noexcept;
38 operator uint32_t() const noexcept;
45 auto operator<=>(const
Version& rhs) const noexcept;
51 std::
string ToString() const;
61 #define PLUGIFY_MAKE_VERSION(major, minor, patch, tweak) ((((uint32_t)(major)) << 29) | (((uint32_t)(minor)) << 22) | (((uint32_t)(patch)) << 12) | ((uint32_t)(tweak)))
62 #define PLUGIFY_MAKE_VERSION_MAJOR(version) uint8_t((uint32_t)(version) >> 29)
63 #define PLUGIFY_MAKE_VERSION_MINOR(version) uint8_t(((uint32_t)(version) >> 22) & 0x7FU)
64 #define PLUGIFY_MAKE_VERSION_PATCH(version) uint8_t(((uint32_t)(version) >> 12) & 0x3FFU)
65 #define PLUGIFY_MAKE_VERSION_TWEAK(version) uint8_t((uint32_t)(version) & 0xFFFU)
67 #define PLUGIFY_API_VERSION_1_0 PLUGIFY_MAKE_VERSION(1, 0, 0, 0)
Represents a version number with major, minor, patch, and tweak components.
Version(uint32_t version) noexcept
Explicit constructor to initialize a Version object from a packed 32-bit version number.
Version(uint8_t major, uint8_t minor, uint8_t patch, uint8_t tweak) noexcept
Constructor to initialize a Version object with individual components.
Version & operator=(uint32_t version) noexcept
Assignment operator to set the Version object from a packed 32-bit version number.