class::var::VersionString

class var::VersionString
  : public api::InfoObject

Summary

VersionString(

u8 major,
u8 minor,
u8 patch
)

bool operator >(

const VersionString & a
) const

bool operator >=(

const VersionString & a
) const

bool operator<(

const VersionString & a
) const

VersionString & operator<<(

u16 value
)

VersionString & operator<<(

u32 value
)

bool operator<=(

const VersionString & a
) const

bool operator==(

const VersionString & a
) const

String & string()

const String & string() const

u32 to_bcd() const

u16 to_bcd16() const

static int compare(

const VersionString & a,
const VersionString & b
)

Members

VersionString(

u8 major,
u8 minor,
u8 patch
)


bool operator >(

const VersionString & a
) const


bool operator >=(

const VersionString & a
) const

Returns true if this version string is greater than or equal to a.

Parameters

  • a version compared against.

See compare() for more details.


bool operator<(

const VersionString & a
) const


VersionString & operator<<(

u16 value
)


VersionString & operator<<(

u32 value
)


bool operator<=(

const VersionString & a
) const


bool operator==(

const VersionString & a
) const


String & string()

const String & string() const

u32 to_bcd() const

u16 to_bcd16() const

static int compare(

const VersionString & a,
const VersionString & b
)

Compares two version strings.

Parameters

  • a first string

  • b second string

Returns

1 if a > b, 0 if a == b or -1 if a < b

If a is formatted as x.y.z and b is formatted as x.y then a is greater than b and 1 will be returned. If b uses x.y.z and a uses x.y then -1 will be returned.

Generally, a project uses one format or the other and the two formats should not need to be compared.

Also, an empty version is always less than a version that is populated.


X

Thanks for Coming!

Subscribe to news and updates