VLink  2.0.0
A high-performance communication middleware
version.h 文件参考

VLink library version constants, build-time feature flags, and compile-time comparison helpers. 更多...

此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

宏定义

#define VLINK_VERSION_MAJOR   2
 
#define VLINK_VERSION_MINOR   0
 
#define VLINK_VERSION_PATCH   0
 
#define VLINK_VERSION   "2.0.0"
 
#define VLINK_VERSION_TIMESTAMP   ""
 
#define VLINK_VERSION_TAG   ""
 
#define VLINK_VERSION_COMMIT_ID   ""
 
#define VLINK_ENABLE_C_API
 
#define VLINK_ENABLE_SECURITY
 
#define VLINK_ENABLE_SQLITE
 
#define VLINK_ENABLE_CLI_INFO
 
#define VLINK_ENABLE_CLI_BAG
 
#define VLINK_ENABLE_CLI_BENCH
 
#define VLINK_ENABLE_CLI_EPROTO
 
#define VLINK_ENABLE_CLI_EFBS
 
#define VLINK_ENABLE_CLI_LIST
 
#define VLINK_ENABLE_CLI_MONITOR
 
#define VLINK_ENABLE_CLI_DUMP
 
#define VLINK_ENABLE_CLI_CHECK
 
#define VLINK_ENABLE_LOG_NAT
 
#define VLINK_ENABLE_PROXY
 
#define VLINK_ENABLE_TEST
 
#define VLINK_VERSION_CHECK(major, minor, patch)   (((major) << 16) | ((minor) << 8) | (patch))
 Packs a (major, minor, patch) triple into a single 24-bit integer. 更多...
 
#define VLINK_VERSION_VALUE   VLINK_VERSION_CHECK(VLINK_VERSION_MAJOR, VLINK_VERSION_MINOR, VLINK_VERSION_PATCH)
 The encoded 24-bit value for the current library version. 更多...
 

详细描述

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
#include <vlink/version.h>
#if VLINK_VERSION_VALUE >= VLINK_VERSION_CHECK(2, 0, 0)
// Safe to use APIs introduced in VLink 2.0.0
#endif
VLink library version constants, build-time feature flags, and compile-time comparison helpers.
Runtime Version Read
#include <vlink/version.h>
#include <iostream>
void print_vlink_version() {
std::cout << "VLink " << VLINK_VERSION << "\n"
<< " major = " << VLINK_VERSION_MAJOR << "\n"
<< " minor = " << VLINK_VERSION_MINOR << "\n"
<< " patch = " << VLINK_VERSION_PATCH << "\n";
}
#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

宏定义说明

◆ VLINK_ENABLE_C_API

#define VLINK_ENABLE_C_API

◆ VLINK_ENABLE_CLI_BAG

#define VLINK_ENABLE_CLI_BAG

◆ VLINK_ENABLE_CLI_BENCH

#define VLINK_ENABLE_CLI_BENCH

◆ VLINK_ENABLE_CLI_CHECK

#define VLINK_ENABLE_CLI_CHECK

◆ VLINK_ENABLE_CLI_DUMP

#define VLINK_ENABLE_CLI_DUMP

◆ VLINK_ENABLE_CLI_EFBS

#define VLINK_ENABLE_CLI_EFBS

◆ VLINK_ENABLE_CLI_EPROTO

#define VLINK_ENABLE_CLI_EPROTO

◆ VLINK_ENABLE_CLI_INFO

#define VLINK_ENABLE_CLI_INFO

◆ VLINK_ENABLE_CLI_LIST

#define VLINK_ENABLE_CLI_LIST

◆ VLINK_ENABLE_CLI_MONITOR

#define VLINK_ENABLE_CLI_MONITOR

◆ VLINK_ENABLE_LOG_NAT

#define VLINK_ENABLE_LOG_NAT

◆ VLINK_ENABLE_PROXY

#define VLINK_ENABLE_PROXY

◆ VLINK_ENABLE_SECURITY

#define VLINK_ENABLE_SECURITY

◆ VLINK_ENABLE_SQLITE

#define VLINK_ENABLE_SQLITE

◆ VLINK_ENABLE_TEST

#define VLINK_ENABLE_TEST

◆ VLINK_VERSION

#define VLINK_VERSION   "2.0.0"

◆ VLINK_VERSION_CHECK

#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.

参数
majorMajor component (0-255).
minorMinor component (0-255).
patchPatch component (0-255).
返回
Encoded 24-bit integer.

◆ VLINK_VERSION_COMMIT_ID

#define VLINK_VERSION_COMMIT_ID   ""

◆ VLINK_VERSION_MAJOR

#define VLINK_VERSION_MAJOR   2

◆ VLINK_VERSION_MINOR

#define VLINK_VERSION_MINOR   0

◆ VLINK_VERSION_PATCH

#define VLINK_VERSION_PATCH   0

◆ VLINK_VERSION_TAG

#define VLINK_VERSION_TAG   ""

◆ VLINK_VERSION_TIMESTAMP

#define VLINK_VERSION_TIMESTAMP   ""

◆ VLINK_VERSION_VALUE

The encoded 24-bit value for the current library version.

Equivalent to VLINK_VERSION_CHECK(VLINK_VERSION_MAJOR, VLINK_VERSION_MINOR, VLINK_VERSION_PATCH). Compare against the output of VLINK_VERSION_CHECK to gate code paths on a minimum library version at compile time.