Inviwo  0.9.10.1
Inviwo documentation
inviwo::Version Class Reference

Parses a version string "Major.Minor.Patch.Build" and allow versions to be compared. Try to follow semantic versioning: http://semver.org/ A nuanced picture, i.e. reasons why you do not necessarily need to follow semantic versioning: "Why Semantic Versioning Isn't": https://gist.github.com/jashkenas/cbd2b088e20279ae2c8e. More...

#include <version.h>

Public Member Functions

 Version (std::string versionString)
 Parses the version. Defaults to version 1.0.0.0. More...
 
 Version (const char *versionString)
 
 Version (unsigned int major=1, unsigned int minor=0, unsigned int patch=0, unsigned int build=0)
 
bool semanticVersionEqual (const Version &other) const
 

Public Attributes

unsigned int major = 1
 Increases when you make incompatible API changes.
 
unsigned int minor
 Increases when you add functionality in a backwards-compatible manner. More...
 
unsigned int patch = 0
 Increases when you make backwards-compatible bug fixes.
 
unsigned int build = 0
 Version metadata.
 

Detailed Description

Parses a version string "Major.Minor.Patch.Build" and allow versions to be compared. Try to follow semantic versioning: http://semver.org/ A nuanced picture, i.e. reasons why you do not necessarily need to follow semantic versioning: "Why Semantic Versioning Isn't": https://gist.github.com/jashkenas/cbd2b088e20279ae2c8e.

  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards-compatible manner, and
  3. PATCH version when you make backwards-compatible bug fixes.
  4. BUILD version can be used as metadata.

Major and minor versions are used during equal comparison since API changes should not exist in patch and build version changes (unless major version is zero).

Note
Module versions are tied to the Inviwo core version, which means that there is no need to update module version if it is built for a new Inviwo core version.

Constructor & Destructor Documentation

◆ Version()

inviwo::Version::Version ( std::string  versionString)

Parses the version. Defaults to version 1.0.0.0.

Parameters
versionStringDot separated version string "Major.Minor.Patch.Build"

Member Function Documentation

◆ semanticVersionEqual()

bool inviwo::Version::semanticVersionEqual ( const Version other) const

Major version >= 1: Return true if major and minor versions are equal, false otherwise. Major version < 1: Return true if major, minor and patch versions are equal, false otherwise.

Note
Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable. Patch and build versions are ignored since API should not have changed in those cases.
Returns
bool true if major and minor versions are equal, false otherwise.

Member Data Documentation

◆ minor

unsigned int inviwo::Version::minor
Initial value:
=
0

Increases when you add functionality in a backwards-compatible manner.


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