VLink library version constants, build-time feature flags, and compile-time comparison helpers.
More...
VLink library version constants, build-time feature flags, and compile-time comparison helpers.
This header is the single source of truth for the VLink library version triple and for the set of optional subsystems compiled into the build. When the CMake-generated version_config.h is present in the include tree it is preferred; otherwise the fallback #define block below supplies the default values used by header-only or out-of-tree builds.
- Version Macros
| Macro | Type | Meaning |
VLINK_VERSION_MAJOR | integer literal | Major version component. |
VLINK_VERSION_MINOR | integer literal | Minor version component. |
VLINK_VERSION_PATCH | integer literal | Patch version component. |
VLINK_VERSION | string literal | Dot-separated version string, e.g. "2.0.0". |
VLINK_VERSION_TIMESTAMP | string literal | Build timestamp (empty in fallback builds). |
VLINK_VERSION_TAG | string literal | Git tag (empty in fallback builds). |
VLINK_VERSION_COMMIT_ID | string literal | Git commit hash (empty in fallback builds). |
VLINK_VERSION_CHECK(a,b,c) | 24-bit integer | Packs a version triple for compile-time compare. |
VLINK_VERSION_VALUE | 24-bit integer | Encoded current version for use with the check. |
- Feature-flag Macros (selected subset)
| Macro | Subsystem |
VLINK_ENABLE_CXX_STD_20 | Compile-time opt-in to C++20 facilities. |
VLINK_ENABLE_C_API | Pure C wrapper API (see external/c_api.h). |
VLINK_ENABLE_SECURITY | Built-in security backends and Security* nodes. |
VLINK_ENABLE_SQLITE | SQLite-backed bag storage. |
VLINK_ENABLE_ZSTD | Zstd compression for bag files (off by default). |
VLINK_ENABLE_PROXY | Proxy monitoring API (see external/proxy_api.h). |
VLINK_ENABLE_CLI_* | Individual CLI sub-commands (info, bag, monitor...). |
VLINK_ENABLE_LOG_* | Optional logging back-ends (NAT, SPD, DLT, QUI). |
VLINK_ENABLE_TEST | Unit-test build artefacts. |
- Compile-time Version Check
#if VLINK_VERSION_VALUE >= VLINK_VERSION_CHECK(2, 0, 0)
#endif
VLink library version constants, build-time feature flags, and compile-time comparison helpers.
- Runtime Version Read
#include <iostream>
void print_vlink_version() {
}
#define VLINK_VERSION_PATCH
Definition: version.h:94
#define VLINK_VERSION_MAJOR
Definition: version.h:92
#define VLINK_VERSION
Definition: version.h:95
#define VLINK_VERSION_MINOR
Definition: version.h:93
| #define VLINK_VERSION_CHECK |
( |
|
major, |
|
|
|
minor, |
|
|
|
patch |
|
) |
| (((major) << 16) | ((minor) << 8) | (patch)) |
Packs a (major, minor, patch) triple into a single 24-bit integer.
Stores major in bits 23-16, minor in bits 15-8, and patch in bits 7-0. Use together with VLINK_VERSION_VALUE to write compile-time version guards.
- Parameters
-
| major | Major component (0-255). |
| minor | Minor component (0-255). |
| patch | Patch component (0-255). |
- Returns
- Encoded 24-bit integer.