HIBF 1.0.0-rc.1
Loading...
Searching...
No Matches
version.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2026, Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2026, Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
5#pragma once
6
7// IWYU pragma: always_keep
8
9#include <cstddef> // for size_t
10#include <cstdint> // for uint8_t
11
18#define HIBF_VERSION_MAJOR 1
20#define HIBF_VERSION_MINOR 0
22#define HIBF_VERSION_PATCH 0
24#define HIBF_RELEASE_CANDIDATE 1
25
27#define HIBF_VERSION (HIBF_VERSION_MAJOR * 10000 + HIBF_VERSION_MINOR * 100 + HIBF_VERSION_PATCH)
28
32#define HIBF_VERSION_CSTRING_HELPER_STR(str) #str
33
35#define HIBF_VERSION_CSTRING_HELPER_FUNC(MAJOR, MINOR, PATCH) \
36 HIBF_VERSION_CSTRING_HELPER_STR(MAJOR) \
37 "." HIBF_VERSION_CSTRING_HELPER_STR(MINOR) "." HIBF_VERSION_CSTRING_HELPER_STR(PATCH)
38
39#if (HIBF_RELEASE_CANDIDATE > 0)
41# define HIBF_RELEASE_CANDIDATE_HELPER(RC) "-rc." HIBF_VERSION_CSTRING_HELPER_STR(RC)
42#else
44# define HIBF_RELEASE_CANDIDATE_HELPER(RC) ""
45#endif
46
48#define HIBF_VERSION_CSTRING \
49 HIBF_VERSION_CSTRING_HELPER_FUNC(HIBF_VERSION_MAJOR, HIBF_VERSION_MINOR, HIBF_VERSION_PATCH) \
50 HIBF_RELEASE_CANDIDATE_HELPER(HIBF_RELEASE_CANDIDATE)
51
52namespace seqan::hibf
53{
54
56inline constexpr uint8_t hibf_version_major = HIBF_VERSION_MAJOR;
58inline constexpr uint8_t hibf_version_minor = HIBF_VERSION_MINOR;
60inline constexpr uint8_t hibf_version_patch = HIBF_VERSION_PATCH;
61
64
66inline constexpr char const * hibf_version_cstring = HIBF_VERSION_CSTRING;
67
68} // namespace seqan::hibf
69
70#undef HIBF_VERSION_CSTRING_HELPER_STR
71#undef HIBF_VERSION_CSTRING_HELPER_FUNC
72#undef HIBF_RELEASE_CANDIDATE_HELPER
constexpr uint8_t hibf_version_patch
The patch version.
Definition version.hpp:60
constexpr uint8_t hibf_version_major
The major version.
Definition version.hpp:56
#define HIBF_VERSION
The full version as MACRO (number).
Definition version.hpp:27
constexpr char const * hibf_version_cstring
The full version as null terminated string.
Definition version.hpp:66
constexpr std::size_t hibf_version
The full version as std::size_t.
Definition version.hpp:63
constexpr uint8_t hibf_version_minor
The minor version.
Definition version.hpp:58
#define HIBF_VERSION_CSTRING
The full version as null terminated string.
Definition version.hpp:48
#define HIBF_VERSION_MINOR
The minor version as MACRO.
Definition version.hpp:20
#define HIBF_VERSION_PATCH
The patch version as MACRO.
Definition version.hpp:22
#define HIBF_VERSION_MAJOR
The major version as MACRO.
Definition version.hpp:18