Elaztek Developer Hub
Blamite Game Engine - Strings  00390.07.02.23.1947.blamite
A library containing general purpose utilities and classes for use in multiple projects.
BlamVersion Class Reference

Class representing a product version. More...

#include <version.h>

Public Member Functions

 BlamVersion (int major, int minor, int patch)
 Constructs a new product version. More...
 
 BlamVersion (int major, int minor, int patch, BlamVersionType version_type, int pre_ver)
 Constructs a new product version. More...
 
std::string ToString ()
 Converts the version to a string. More...
 
bool IsValid ()
 Whether or not this version matches Semantic Versioning guidelines. More...
 
int GetMajor ()
 Retrieves the version major number. More...
 
int GetMinor ()
 Retrieves the version minor number. More...
 
int GetPatch ()
 Retrieves the version patch number. More...
 
std::string GetSuffix ()
 Retrieves the version pre-release suffix. More...
 
BlamVersionType GetType ()
 Retrieves the version type. More...
 
int GetPrereleaseVersion ()
 Retrieves the pre-release version number. More...
 
bool operator== (BlamVersion other_version)
 Checks if this version is equal to another version. More...
 
bool operator> (BlamVersion other_version)
 Checks if this version is greater than another version. More...
 
bool operator< (BlamVersion other_version)
 Checks if this version is less than another version. More...
 
bool IsEqualTo (BlamVersion other_version)
 Checks if this version is equal to another version. More...
 
bool IsGreaterThan (BlamVersion other_version)
 Checks if this version is greater than another version. More...
 
bool IsLessThan (BlamVersion other_version)
 Checks if this version is less than another version. More...
 

Detailed Description

Class representing a product version.

Each application that is part of Blamite's editing kit (excluding the engine core itself, as it uses a unique versioning system) should utilize this. It is designed to make storing and comparing versions easier.

Note
This is designed to be used with Semantic Versioning. As such:

version_major should be incremented whenever backwards-incompatiable changes are made. version_minor should be incremented whenever backwards-compatiable feature additions are made. version_patch should be incremented whenever backwards-compatiable bugfixes are made.

Any time any of the version numbers are incremented, all lower numbers should be reset to 0.

For the full details of the Semantic Versioning specification, see https://semver.org.

Constructor & Destructor Documentation

◆ BlamVersion() [1/2]

BlamVersion::BlamVersion ( int  major,
int  minor,
int  patch 
)

Constructs a new product version.

Parameters
major- The version major number.
minor- The versiom minor number.
patch- The version patch number.
+ Here is the call graph for this function:

◆ BlamVersion() [2/2]

BlamVersion::BlamVersion ( int  major,
int  minor,
int  patch,
BlamVersionType  version_type,
int  pre_ver 
)

Constructs a new product version.

Parameters
major- The version major number.
minor- The versiom minor number.
patch- The version patch number.
version_type- The version type.
pre_ver- The prerelease version number.
+ Here is the call graph for this function:

Member Function Documentation

◆ GetMajor()

int BlamVersion::GetMajor ( )

Retrieves the version major number.

Returns
The version major number.
+ Here is the caller graph for this function:

◆ GetMinor()

int BlamVersion::GetMinor ( )

Retrieves the version minor number.

Returns
The version minor number.
+ Here is the caller graph for this function:

◆ GetPatch()

int BlamVersion::GetPatch ( )

Retrieves the version patch number.

Returns
The version patch number.
+ Here is the caller graph for this function:

◆ GetPrereleaseVersion()

int BlamVersion::GetPrereleaseVersion ( )

Retrieves the pre-release version number.

Returns
The pre-release version number. If the version is a Release, this will always be 0.
+ Here is the caller graph for this function:

◆ GetSuffix()

std::string BlamVersion::GetSuffix ( )

Retrieves the version pre-release suffix.

Returns
The pre-release version suffix. If the version is a Release, an empty string is returned.
+ Here is the call graph for this function:

◆ GetType()

BlamVersionType BlamVersion::GetType ( )

Retrieves the version type.

See BlamVersionType for details.

Returns
The version type.
+ Here is the caller graph for this function:

◆ IsEqualTo()

bool BlamVersion::IsEqualTo ( BlamVersion  other_version)

Checks if this version is equal to another version.

Parameters
other_version- The version to compare against.
Returns
true if this version is equal to other_version, otherwise returns false.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsGreaterThan()

bool BlamVersion::IsGreaterThan ( BlamVersion  other_version)

Checks if this version is greater than another version.

Parameters
other_version- The version to compare against.
Returns
true if this version is greater than other_version, otherwise returns false.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsLessThan()

bool BlamVersion::IsLessThan ( BlamVersion  other_version)

Checks if this version is less than another version.

Parameters
other_version- The version to compare against.
Returns
true if this version is less than other_version, otherwise returns false.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsValid()

bool BlamVersion::IsValid ( )

Whether or not this version matches Semantic Versioning guidelines.

Returns
true if the version matches the guidelines, otherwise returns false.

◆ operator<()

bool BlamVersion::operator< ( BlamVersion  other_version)

Checks if this version is less than another version.

Parameters
other_version- The version to compare against.
Returns
true if this version is less than other_version, otherwise returns false.
+ Here is the call graph for this function:

◆ operator==()

bool BlamVersion::operator== ( BlamVersion  other_version)

Checks if this version is equal to another version.

Parameters
other_version- The version to compare against.
Returns
true if this version is equal to other_version, otherwise returns false.
+ Here is the call graph for this function:

◆ operator>()

bool BlamVersion::operator> ( BlamVersion  other_version)

Checks if this version is greater than another version.

Parameters
other_version- The version to compare against.
Returns
true if this version is greater than other_version, otherwise returns false.
+ Here is the call graph for this function:

◆ ToString()

std::string BlamVersion::ToString ( )

Converts the version to a string.

Returns
A string representation of the version.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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