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 - 2024 (C). Alex Robenko. All rights reserved.
3//
4// This file is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program. If not, see <http://www.gnu.org/licenses/>.
16
19
20#pragma once
21
22#include "comms/version.h"
23
25#define CC_TOOLS_QT_MAJOR_VERSION 5U
26
28#define CC_TOOLS_QT_MINOR_VERSION 3U
29
31#define CC_TOOLS_QT_PATCH_VERSION 3U
32
34#define CC_TOOLS_QT_MAKE_VERSION(major_, minor_, patch_) \
35 ((static_cast<unsigned>(major_) << 24) | \
36 (static_cast<unsigned>(minor_) << 8) | \
37 (static_cast<unsigned>(patch_)))
38
40#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)
41
42namespace cc_tools_qt
43{
44
46inline
47constexpr unsigned versionMajor()
48{
50}
51
53inline
54constexpr unsigned versionMinor()
55{
57}
58
60inline
61constexpr unsigned versionPatch()
62{
64}
65
67inline
68constexpr unsigned versionCreate(unsigned major, unsigned minor, unsigned patch)
69{
70 return CC_TOOLS_QT_MAKE_VERSION(major, minor, patch);
71}
72
74inline
75constexpr unsigned version()
76{
78}
79
80static_assert(COMMS_MAKE_VERSION(5, 2, 7) <= comms::version(),
81 "The version of COMMS library is too old");
82
83} // 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:54
constexpr unsigned versionPatch()
Patch level of the library.
Definition version.h:61
constexpr unsigned version()
Version of the library as single numeric value.
Definition version.h:75
constexpr unsigned versionCreate(unsigned major, unsigned minor, unsigned patch)
Create version of the library as single unsigned numeric value.
Definition version.h:68
constexpr unsigned versionMajor()
Major verion of the library.
Definition version.h:47
#define CC_TOOLS_QT_VERSION
Version of the COMMS library as single numeric value.
Definition version.h:40
#define CC_TOOLS_QT_PATCH_VERSION
Patch level of the library.
Definition version.h:31
#define CC_TOOLS_QT_MAJOR_VERSION
Major verion of the library.
Definition version.h:25
#define CC_TOOLS_QT_MINOR_VERSION
Minor verion of the library.
Definition version.h:28
#define CC_TOOLS_QT_MAKE_VERSION(major_, minor_, patch_)
Macro to create numeric version as single unsigned number.
Definition version.h:34