| OpenMS 2.5.0

Classes | Static Public Member Functions | List of all members
VersionInfo Class Reference
Concept

Version information class. More...

`#include <OpenMS/CONCEPT/VersionInfo.h>`

## Classes

struct | VersionDetails

## Static Public Member Functions

static String | getTime ()
| Return the build time of OpenMS. More...
static String | getVersion ()
| Return the version number of OpenMS. More...
static VersionDetails | getVersionStruct ()
| Return the version number of OpenMS. More...
static String | getRevision ()
| Return the revision number from revision control system, e.g. git. More...
static String | getBranch ()
| Return the branch name from revision control system, e.g. git. More...

## Detailed Description

Version information class.

The OpenMS release version and revision data can be retrieved as a string or as integers.

Note that the term "version" refers to releases (such as 1.0, 1.1.1-alpha, 1.2, ...), which follows the https://semver.org/ definition of version numbers using major, minor, patch and pre-release identifiers (separated by a dash). The term "revision" refers to a revision control system such as git and is mainly of interest for developers. The term "branch" refers to the git branch that this build of OpenMS is based on.

The VersionInfo class contains only static methods.

## Member Function Documentation

## ◆ getBranch()

static String getBranch | ( |  | ) |

static

Return the branch name from revision control system, e.g. git.

On released versions of OpenMS the result is "exported". The result can be possibly be "" on some platforms, which means that revision info is unavailable. You should check for both cases in your code.

The current git branch is queried by the build system regularly and the result is written as a header file which is included by VersionInfo.cpp.

## ◆ getRevision()

static String getRevision | ( |  | ) |

static

Return the revision number from revision control system, e.g. git.

On released versions of OpenMS, the result is "exported". The result can be possibly be "" on some platforms, which means that revision info is unavailable. You should check for both cases in your code.

The current git version is queried by the build system regularly and the result is written as a header file which is included by VersionInfo.cpp.

Referenced by QApplicationTOPP::showAboutDialog().

## ◆ getTime()

static String getTime | ( |  | ) |

static

Return the build time of OpenMS.

## ◆ getVersion()

static String getVersion | ( |  | ) |

static

Return the version number of OpenMS.

Referenced by SpectrumCanvas::addDataProcessing_(), TOPPASBase::loadPreferences(), TOPPViewBase::loadPreferences(), main(), TOPPASBase::savePreferences(), TOPPViewBase::savePreferences(), and QApplicationTOPP::showAboutDialog().

## ◆ getVersionStruct()

static VersionDetails getVersionStruct | ( |  | ) |

static

Return the version number of OpenMS.