cc_tools_qt
Common Environment for Protocol Analysis.
Loading...
Searching...
No Matches
version.h
Go to the documentation of this file.
1//
2// Copyright 2018 - 2026 (C). Alex Robenko. All rights reserved.
3//
4// SPDX-License-Identifier: GPL-3.0-or-later
5//
6// This file is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program. If not, see <http://www.gnu.org/licenses/>.
18
21
22#pragma once
23
24#include "comms/version.h"
25
27#define CC_TOOLS_QT_MAJOR_VERSION 6U
28
30#define CC_TOOLS_QT_MINOR_VERSION 0U
31
33#define CC_TOOLS_QT_PATCH_VERSION 7U
34
36#define CC_TOOLS_QT_MAKE_VERSION(major_, minor_, patch_) \
37 ((static_cast<unsigned>(major_) << 24) | \
38 (static_cast<unsigned>(minor_) << 8) | \
39 (static_cast<unsigned>(patch_)))
40
42#define CC_TOOLS_QT_VERSION CC_TOOLS_QT_MAKE_VERSION(CC_TOOLS_QT_MAJOR_VERSION, CC_TOOLS_QT_MINOR_VERSION, CC_TOOLS_QT_PATCH_VERSION)
43
44namespace cc_tools_qt
45{
46
48inline
49constexpr unsigned versionMajor()
50{
52}
53
55inline
56constexpr unsigned versionMinor()
57{
59}
60
62inline
63constexpr unsigned versionPatch()
64{
66}
67
69inline
70constexpr unsigned versionCreate(unsigned major, unsigned minor, unsigned patch)
71{
72 return CC_TOOLS_QT_MAKE_VERSION(major, minor, patch);
73}
74
76inline
77constexpr unsigned version()
78{
80}
81
82static_assert(COMMS_MAKE_VERSION(5, 5, 1) <= comms::version(),
83 "The version of COMMS library is too old");
84
85} // namespace cc_tools_qt
Main namespace for all classes / functions of the shared library.
constexpr unsigned versionMinor()
Minor verion of the library.
Definition version.h:56
constexpr unsigned versionPatch()
Patch level of the library.
Definition version.h:63
constexpr unsigned version()
Version of the library as single numeric value.
Definition version.h:77
constexpr unsigned versionCreate(unsigned major, unsigned minor, unsigned patch)
Create version of the library as single unsigned numeric value.
Definition version.h:70
constexpr unsigned versionMajor()
Major verion of the library.
Definition version.h:49
#define CC_TOOLS_QT_VERSION
Version of the COMMS library as single numeric value.
Definition version.h:42
#define CC_TOOLS_QT_PATCH_VERSION
Patch level of the library.
Definition version.h:33
#define CC_TOOLS_QT_MAJOR_VERSION
Major verion of the library.
Definition version.h:27
#define CC_TOOLS_QT_MINOR_VERSION
Minor verion of the library.
Definition version.h:30
#define CC_TOOLS_QT_MAKE_VERSION(major_, minor_, patch_)
Macro to create numeric version as single unsigned number.
Definition version.h:36