TurtleBrains  0.2.1
High quality, portable, C++ API for native application and game development.
TurtleBrains::Core::Version Namespace Reference

Contains functionality for retrieving and comparing the version of the TurtleBrains framework. More...

Functions

int GetMajor (void)
 
int GetMinor (void)
 
int GetRevision (void)
 
const tbStringGetVersionString (void)
 
bool IsExactly (const int major, const int minor, const int revision)
 
bool IsAtLeast (const int major, const int minor, const int revision)
 

Detailed Description

Retrieves information regarding the version of the TurtleBrains framework added to your project to make allow testing that the implementation is newer than, or exactly as expected.

Function Documentation

int TurtleBrains::Core::Version::GetMajor ( void  )

Retrieves the major part of the TurtleBrains framework version number.

Returns
If the version of the framework is: 1.3.2, the value returned will be 1
int TurtleBrains::Core::Version::GetMinor ( void  )

Retrieves the minor part of the TurtleBrains framework version number.

Returns
If the version of the framework is: 1.3.2, the value returned will be 3
int TurtleBrains::Core::Version::GetRevision ( void  )

Retrieves the revision part of the TurtleBrains framework version number.

Returns
If the version of the framework is: 1.3.2, the value returned will be 2
const tbString& TurtleBrains::Core::Version::GetVersionString ( void  )

Retrieves a string with the major, minor and revision of the framework comined with the framework name in a string like: "TurtleBrains v1.0.0"

Returns
If the version of the framework is: 1.3.2, the value returned will be "TurtleBrains v1.3.2"
bool TurtleBrains::Core::Version::IsAtLeast ( const int  major,
const int  minor,
const int  revision 
)

Compares the version with the inputs to be sure that the framework is equal or newer, in the event new features are added to the framework, you can use this to make sure those features are available.

Parameters
majorThe value of the major portion to be compared with the current major of the framework.
minorThe value of the minor portion to be compared with the current minor of the framework.
revisionThe value of the revision to be compared with the current revision of the framework.
Returns
True will be returned if the version of the framework is equal or newer than the version created by each component supplied. 1.3.2 is newer than 1.2.4 2.1.0 is newer than 1.9.9. False will be returned if the framework is older than the version created by each supplied compenent.
bool TurtleBrains::Core::Version::IsExactly ( const int  major,
const int  minor,
const int  revision 
)

Compares the version with the inputs to be sure that the framework version matches.

Parameters
majorThe value of the major portion to be compared with the current major of the framework.
minorThe value of the minor portion to be compared with the current minor of the framework.
revisionThe value of the revision to be compared with the current revision of the framework.
Returns
True will be returned if the version of the framework exactly matches each component supplied otherwise false will be returned if the framework version is newer or older than desired.