Go to the documentation of this file.
26 static_assert(N > 0 && N <= 4);
29 inline constexpr uint32_t value()
const
32 for (
int i = 0; i < N; ++i) {
34 v += ((data[i] & 0xF0) >> 4) * 10 + (data[i] & 0x0F);
39 inline constexpr operator uint32_t()
const {
return value(); }
49 inline QDate value()
const
51 return QDate(bcdYear, bcdMonth, bcdDay);
54 inline operator QDate()
const {
return value(); }
55 inline bool operator==(
const QDate &other)
const {
return value() == other; }
56 inline bool operator!=(
const QDate &other)
const {
return value() != other; }
66 static_assert(N > 0 && N <= 4);
69 inline constexpr uint32_t value()
const
72 for (
int i = 0; i < N; ++i) {
79 inline constexpr operator uint32_t()
const {
return value(); }
82 inline VdvNumber<N>& operator=(uint32_t) {
return *
this; }
94 (int)((data & 0b1111'1110'0000'0000'0000'0000'0000'0000) >> 25) + 1990,
95 (int)(data & 0b0000'0001'1110'0000'0000'0000'0000'0000) >> 21,
96 (int)(data & 0b0000'0000'0001'1111'0000'0000'0000'0000) >> 16
98 (int)(data & 0b0000'0000'0000'0000'1111'1000'0000'0000) >> 11,
99 (int)(data & 0b0000'0000'0000'0000'0000'0111'1110'0000) >> 5,
100 (int)(data & 0b0000'0000'0000'0000'0000'0000'0001'1111) * 2
104 inline operator QDateTime()
const {
return value(); }
105 inline bool operator==(
const QDateTime &other)
const {
return value() == other; }
106 inline bool operator!=(
const QDateTime &other)
const {
return value() != other; }
Classes for reservation/travel data models, data extraction and data augmentation.
Date encoded as 8 BCD digits.
Two-digit BCD encoded number.
Date/time representation encoded in 4 byte.
Big-endian numeric value.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:28:48 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.