OpenMS
VersionInfo.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Chris Bielow $
6 // $Authors: Clemens Groepl, Chris Bielow $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 #include <OpenMS/CONCEPT/Types.h>
13 
14 namespace OpenMS
15 {
16  class String;
17 
36  class OPENMS_DLLAPI VersionInfo
37  {
38 public:
39 
40  struct OPENMS_DLLAPI VersionDetails
41  {
42  Int version_major = 0;
43  Int version_minor = 0;
44  Int version_patch = 0;
46 
47  VersionDetails() = default;
48 
50  VersionDetails(const VersionDetails & other) = default;
51 
53  VersionDetails& operator=(const VersionDetails& other) = default;
54 
60  static VersionDetails create(const String & version);
61 
62  bool operator<(const VersionDetails & rhs) const;
63  bool operator==(const VersionDetails & rhs) const;
64  bool operator!=(const VersionDetails & rhs) const;
65  bool operator>(const VersionDetails & rhs) const;
66 
67  static const VersionDetails EMPTY; // 0.0.0 version for comparison
68  };
69 
71  static String getTime();
72 
74  static String getVersion();
75 
78 
90  static String getRevision();
91 
103  static String getBranch();
104 
105  };
106 
107 }
108 
A more convenient string class.
Definition: String.h:34
Version information class.
Definition: VersionInfo.h:37
static VersionDetails getVersionStruct()
Return the version number of OpenMS.
static String getTime()
Return the build time of OpenMS.
static String getBranch()
Return the branch name from revision control system, e.g. git.
static String getRevision()
Return the revision number from revision control system, e.g. git.
static String getVersion()
Return the version number of OpenMS.
int Int
Signed integer type.
Definition: Types.h:72
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Definition: VersionInfo.h:41
bool operator!=(const VersionDetails &rhs) const
static VersionDetails create(const String &version)
parse String and return as proper struct
bool operator==(const VersionDetails &rhs) const
VersionDetails & operator=(const VersionDetails &other)=default
Copy assignment.
String pre_release_identifier
Definition: VersionInfo.h:45
bool operator<(const VersionDetails &rhs) const
static const VersionDetails EMPTY
Definition: VersionInfo.h:67
VersionDetails(const VersionDetails &other)=default
Copy constructor.
bool operator>(const VersionDetails &rhs) const