Aspen
2D C++ Class-Based Object Oriented Game Engine
Aspen::Version::Version Class Reference

Version class Contains version information and comparison operators. More...

#include <Version.hpp>

Public Member Functions

 Version (unsigned major, unsigned minor=0, unsigned revision=0, TIER tier=UNKNOWN)
 Constructor. More...
 
 ~Version ()
 Destructor.
 
int Major () const
 Returns major version number. More...
 
int Minor () const
 Returns minor version number. More...
 
int Revision () const
 Returns version revision number. More...
 
TIER Tier () const
 Returns version release tier. More...
 
std::string ToString () const
 Creates a string of the version. More...
 
bool operator== (Version &rhs) const
 Comparison operator. More...
 
bool operator!= (Version &rhs) const
 Comparison operator. More...
 
bool operator< (Version &rhs) const
 Comparison operator. More...
 
bool operator> (Version &rhs) const
 Comparison operator. More...
 
bool operator<= (Version &rhs) const
 Comparison operator. More...
 
bool operator>= (Version &rhs) const
 Comparison operator. More...
 
 operator float () const
 Float conversion Loses precision of revision and build tier. More...
 
 operator double () const
 Float conversion Loses precision of revision and build tier. More...
 
 operator std::string () const
 String conversion. More...
 

Private Attributes

const unsigned _major
 Major version number.
 
const unsigned _minor
 Minor version number.
 
const unsigned _revision
 Version revision.
 
const TIER _tier
 Version release tier.
 

Detailed Description

Version class Contains version information and comparison operators.

Constructor & Destructor Documentation

◆ Version()

Aspen::Version::Version::Version ( unsigned  major,
unsigned  minor = 0,
unsigned  revision = 0,
TIER  tier = UNKNOWN 
)

Constructor.

Parameters
majorMajor version number
minorMinor version number
revisionVersion revision
tierVersion release tier

Member Function Documentation

◆ Major()

int Aspen::Version::Version::Major ( ) const

Returns major version number.

Returns
_major

◆ Minor()

int Aspen::Version::Version::Minor ( ) const

Returns minor version number.

Returns
_minor

◆ operator double()

Aspen::Version::Version::operator double ( ) const

Float conversion Loses precision of revision and build tier.

Returns
_major._minor

◆ operator float()

Aspen::Version::Version::operator float ( ) const

Float conversion Loses precision of revision and build tier.

Returns
_major._minor

◆ operator std::string()

Aspen::Version::Version::operator std::string ( ) const

String conversion.

Returns
ToString()

◆ operator!=()

bool Aspen::Version::Version::operator!= ( Version rhs) const

Comparison operator.

Parameters
rhsVersion on the right of the operator
Returns
True if both versions are not equal False otherwise

◆ operator<()

bool Aspen::Version::Version::operator< ( Version rhs) const

Comparison operator.

Parameters
rhsVersion on the right of the operator
Returns
True if the left version is less than the right False otherwise

◆ operator<=()

bool Aspen::Version::Version::operator<= ( Version rhs) const

Comparison operator.

Parameters
rhsVersion on the right of the operator
Returns
True if the left version is less than or equal to the right False otherwise

◆ operator==()

bool Aspen::Version::Version::operator== ( Version rhs) const

Comparison operator.

Parameters
rhsVersion on the right of the operator
Returns
True if both versions are equal False otherwise

◆ operator>()

bool Aspen::Version::Version::operator> ( Version rhs) const

Comparison operator.

Parameters
rhsVersion on the right of the operator
Returns
True if the left version is greater than than the right False otherwise

◆ operator>=()

bool Aspen::Version::Version::operator>= ( Version rhs) const

Comparison operator.

Parameters
rhsVersion on the right of the operator
Returns
True if the left version is greater than or equal to the right False otherwise

◆ Revision()

int Aspen::Version::Version::Revision ( ) const

Returns version revision number.

Returns
_revision

◆ Tier()

TIER Aspen::Version::Version::Tier ( ) const

Returns version release tier.

Returns
_tier

◆ ToString()

std::string Aspen::Version::Version::ToString ( ) const

Creates a string of the version.

Returns
String format of the version _tier-_major._minor._revision

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