![]() |
Blamite Game Engine - Strings
00402.09.29.23.0627.blamite
A library containing general purpose utilities and classes for use in multiple projects.
|
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... | |
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.
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.
BlamVersion::BlamVersion | ( | int | major, |
int | minor, | ||
int | patch | ||
) |
Constructs a new product version.
major | - The version major number. |
minor | - The versiom minor number. |
patch | - The version patch number. |
BlamVersion::BlamVersion | ( | int | major, |
int | minor, | ||
int | patch, | ||
BlamVersionType | version_type, | ||
int | pre_ver | ||
) |
Constructs a new product version.
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. |
int BlamVersion::GetMajor | ( | ) |
Retrieves the version major number.
int BlamVersion::GetMinor | ( | ) |
Retrieves the version minor number.
int BlamVersion::GetPatch | ( | ) |
Retrieves the version patch number.
int BlamVersion::GetPrereleaseVersion | ( | ) |
Retrieves the pre-release version number.
0
. std::string BlamVersion::GetSuffix | ( | ) |
Retrieves the version pre-release suffix.
BlamVersionType BlamVersion::GetType | ( | ) |
Retrieves the version type.
See BlamVersionType for details.
bool BlamVersion::IsEqualTo | ( | BlamVersion | other_version | ) |
Checks if this version is equal to another version.
other_version | - The version to compare against. |
true
if this version is equal to other_version
, otherwise returns false
. bool BlamVersion::IsGreaterThan | ( | BlamVersion | other_version | ) |
Checks if this version is greater than another version.
other_version | - The version to compare against. |
true
if this version is greater than other_version
, otherwise returns false
. bool BlamVersion::IsLessThan | ( | BlamVersion | other_version | ) |
Checks if this version is less than another version.
other_version | - The version to compare against. |
true
if this version is less than other_version
, otherwise returns false
. bool BlamVersion::IsValid | ( | ) |
Whether or not this version matches Semantic Versioning guidelines.
true
if the version matches the guidelines, otherwise returns false
. bool BlamVersion::operator< | ( | BlamVersion | other_version | ) |
Checks if this version is less than another version.
other_version | - The version to compare against. |
true
if this version is less than other_version
, otherwise returns false
. bool BlamVersion::operator== | ( | BlamVersion | other_version | ) |
Checks if this version is equal to another version.
other_version | - The version to compare against. |
true
if this version is equal to other_version
, otherwise returns false
. bool BlamVersion::operator> | ( | BlamVersion | other_version | ) |
Checks if this version is greater than another version.
other_version | - The version to compare against. |
true
if this version is greater than other_version
, otherwise returns false
. std::string BlamVersion::ToString | ( | ) |
Converts the version to a string.