You.i Engine
CYIVersion Class Reference

Detailed Description

CYIVersion is a data structure that represents semantic versioning.

The version information provided by this object is composed of four parts:

  • The major version number
  • The minor version number
  • The patch version number
  • The hotfix version string

When the version is requested as a string, it is returned in the format MAJOR.MINOR.PATCH (or MAJOR.MINOR.PATCH-HOTFIX if the hotfix version is not empty and not 0)

Version objects can also hold an optional version control ID and build date.

Note
The optional version control ID and build date are not considered for the equality and other comparison operators.

#include <framework/YiVersion.h>

Public Member Functions

 CYIVersion ()
 
 CYIVersion (uint32_t majorVersion, uint32_t minorVersion, uint32_t patchVersion, CYIString hotfixVersion="", CYIString versionControlID="", CYIString buildDate="")
 
uint32_t GetMajorVersion () const
 
uint32_t GetMinorVersion () const
 
uint32_t GetPatchVersion () const
 
CYIString GetHotfixVersion () const
 
CYIString GetVersionString () const
 
bool HasHotfixVersion () const
 
const CYIStringGetVersionControlID () const
 
const CYIStringGetBuildDate () const
 
bool operator== (const CYIVersion &other) const
 
bool operator!= (const CYIVersion &other) const
 
bool operator< (const CYIVersion &other) const
 
bool operator> (const CYIVersion &other) const
 
bool operator<= (const CYIVersion &other) const
 
bool operator>= (const CYIVersion &other) const
 

Static Public Member Functions

static const CYIVersionGetEngineVersion ()
 
static CYIVersion FromVersionString (const CYIString &versionString)
 

Constructor & Destructor Documentation

◆ CYIVersion() [1/2]

CYIVersion::CYIVersion ( )

Creates a CYIVersion with the major, minor, and patch version set to 0. The hotfix value, version control ID and build date will not be set.

◆ CYIVersion() [2/2]

CYIVersion::CYIVersion ( uint32_t  majorVersion,
uint32_t  minorVersion,
uint32_t  patchVersion,
CYIString  hotfixVersion = "",
CYIString  versionControlID = "",
CYIString  buildDate = "" 
)

Creates a CYIVersion with majorVersion, minorVersion and patchVersion. A hotfixVersion, versionControlID and buildDate can optionally be provided.

Member Function Documentation

◆ FromVersionString()

static CYIVersion CYIVersion::FromVersionString ( const CYIString versionString)
static

◆ GetBuildDate()

const CYIString& CYIVersion::GetBuildDate ( ) const

Returns a user-readable string that describes the build date. The date is typically formatted as "Mmm dd yyyy hh:mm:ss".

◆ GetEngineVersion()

static const CYIVersion& CYIVersion::GetEngineVersion ( )
static

Provides version information about this release of You.i Engine SDK.

◆ GetHotfixVersion()

CYIString CYIVersion::GetHotfixVersion ( ) const

Returns the hotfix version string.

◆ GetMajorVersion()

uint32_t CYIVersion::GetMajorVersion ( ) const

Returns the major version number.

◆ GetMinorVersion()

uint32_t CYIVersion::GetMinorVersion ( ) const

Returns the minor version number.

◆ GetPatchVersion()

uint32_t CYIVersion::GetPatchVersion ( ) const

Returns the patch version number.

◆ GetVersionControlID()

const CYIString& CYIVersion::GetVersionControlID ( ) const

Returns a version control identifier for this version. For You.i Engine versions, this is a git sha-1.

◆ GetVersionString()

CYIString CYIVersion::GetVersionString ( ) const

Returns a version string formatted as MAJOR.MINOR.PATCH, or MAJOR.MINOR.PATCH-HOTFIX if the hotfix version is not blank and not 0.

◆ HasHotfixVersion()

bool CYIVersion::HasHotfixVersion ( ) const

Returns whether the CYIVersion object has a hotfix version assigned to it.

◆ operator!=()

bool CYIVersion::operator!= ( const CYIVersion other) const

◆ operator<()

bool CYIVersion::operator< ( const CYIVersion other) const

◆ operator<=()

bool CYIVersion::operator<= ( const CYIVersion other) const

◆ operator==()

bool CYIVersion::operator== ( const CYIVersion other) const

◆ operator>()

bool CYIVersion::operator> ( const CYIVersion other) const

◆ operator>=()

bool CYIVersion::operator>= ( const CYIVersion other) const

The documentation for this class was generated from the following file: