Isomet Modular Synthesiser (iMS) API  v1.4.2
iMS API
List of all members
iMS::LibVersion Class Reference

Access the version information for the API. More...

#include <include/LibVersion.h>

Static Public Member Functions

Version Numbers
static int GetMajor ()
 Return the major version number, e.g., 1 for "1.2.3". More...
 
static int GetMinor ()
 Return the minor version number, e.g., 2 for "1.2.3". More...
 
static int GetPatch ()
 Return the patch version number, e.g., 3 for "1.2.3". More...
 
static std::string GetVersion ()
 Return the full version number. More...
 
Version Number Maths
static bool IsAtLeast (int major, int minor, int patch)
 Compare the current version number against a specific version. More...
 
Feature Tags
static bool HasFeature (const std::string &name)
 Test whether a feature is implemented by this API. More...
 

Detailed Description

Access the version information for the API.

For example, you can get the current version number as a string using GetVersion, or you can get the separate major, minor and patch integer values by calling GetMajor, GetMinor, or GetPatch, respectively.

This class also provides some basic version comparison functionality and lets you determine if certained named features are present in your current build.

Author
Dave Cowan
Date
2015-11-03
Since
1.0

Member Function Documentation

static int iMS::LibVersion::GetMajor ( )
static

Return the major version number, e.g., 1 for "1.2.3".

Returns
The major version number as an integer
Since
1.0
static int iMS::LibVersion::GetMinor ( )
static

Return the minor version number, e.g., 2 for "1.2.3".

Returns
The minor version number as an integer
Since
1.0
static int iMS::LibVersion::GetPatch ( )
static

Return the patch version number, e.g., 3 for "1.2.3".

Returns
The patch version number as an integer
Since
1.0
static std::string iMS::LibVersion::GetVersion ( )
static

Return the full version number.

Returns
The version string, e.g., "1.2.3"
Since
1.0
static bool iMS::LibVersion::HasFeature ( const std::string &  name)
static

Test whether a feature is implemented by this API.

New features that change the implementation of API methods are specified as "feature tags." This method lets you query the API to find out if a given feature is available.

Parameters
[in]nameThe feature tag name, e.g., "IMAGE_FILE"
Returns
Returns true if the named feature is available in this version
Since
1.0
static bool iMS::LibVersion::IsAtLeast ( int  major,
int  minor,
int  patch 
)
static

Compare the current version number against a specific version.

This method lets you check to see if the current version is greater than or equal to the specified version. This may be useful to perform operations that require a minimum version number.

Parameters
[in]majorThe major version number to compare against
[in]minorThe minor version number to compare against
[in]patchThe patch version number to compare against
Returns
Returns true if the current API version >= (major, minor, patch)
Since
1.0

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