Version
Version

Class that represents, and provides helper functions for, a Version number

Version
Version(
uint32 major,
uint32 minor,
uint32 patch
)

Create a Version object from major, minor, patch.

Parameters
major
uint32

The major part of the version (ie. 1 in 1.23.97).

minor
uint32

The minor part of the version (ie. 23 in 1.23.97).

patch
uint32

The patch part of the version (ie. 97 in 1.23.97).

Version
Version(
uint32 major,
uint32 minor
)

Create a Version object from major and minor.

Parameters
major
uint32

The major part of the version (ie. 1 in 1.23.97).

minor
uint32

The minor part of the version (ie. 23 in 1.23.97).

Version
Version(
const Version &other
)

The copy constructor for a Version object.

Parameters
other
const Version&

The Version to be copied.

str
std::string str() const

Gets a string representation of the Version.

Returns

A string representing the Version.

fromString
bool fromString(
const std::string &strVersion
)

Builds the Version object from the given string.  If successful, the Version object will be updated to the given string.

Parameters
strVersion
const std::string&

The string representation of a version (ie. "1.23")

Returns

true if the string was parsed successfully and the Version was updated, false if the string failed to parse

majorPart
uint32 majorPart() const

Gets the major part of the Version

Returns

The major part of the Version (ie. 1 in 1.23.97)

minorPart
uint32 minorPart() const

Gets the minor part of the Version

Returns

The minor part of the Version (ie. 23 in 1.23.97)

patchPart
uint32 patchPart() const

Gets the patch part of the Version

Returns

The patch part of the Version (ie. 97 in 1.23.97)