18 constexpr
inline uint32_t
EncodeVersion(uint32_t major, uint32_t minor, uint32_t patch)
20 return (major << 22) | (minor << 12) | patch;
34 m_Major = (encodedValue >> 22) & 1023;
35 m_Minor = (encodedValue >> 12) & 1023;
36 m_Patch = encodedValue & 4095;
39 Version(uint32_t major, uint32_t minor, uint32_t patch) :
56 return m_Major == other.m_Major && m_Minor == other.m_Minor && m_Patch == other.m_Patch;
61 constexpr
char separator =
'.';
63 std::stringstream stringStream;
64 stringStream << m_Major << separator << m_Minor << separator << m_Patch;
66 return stringStream.str();
uint32_t GetEncodedValue()
bool operator==(const Version &other) const
Version(uint32_t encodedValue)
Copyright (c) 2020 ARM Limited.
constexpr uint32_t EncodeVersion(uint32_t major, uint32_t minor, uint32_t patch)
std::ostream & operator<<(std::ostream &os, const Version &version)
Version(uint32_t major, uint32_t minor, uint32_t patch)
std::string ToString() const