swift
Loading...
Searching...
No Matches
callsign.cpp
1// SPDX-FileCopyrightText: Copyright (C) 2013 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#include <QRegularExpression>
7#include <QRegularExpressionMatch>
8#include <QStringList>
9#include <Qt>
10#include <QtGlobal>
11
14#include "misc/stringutils.h"
15
16SWIFT_DEFINE_VALUEOBJECT_MIXINS(swift::misc::aviation, CCallsign)
17
18namespace swift::misc::aviation
19{
21 : m_callsignAsSet(callsign.trimmed()), m_callsign(CCallsign::unifyCallsign(callsign, hint)), m_typeHint(hint)
22 {}
23
24 CCallsign::CCallsign(const QString &callsign, const QString &telephonyDesignator, CCallsign::TypeHint hint)
25 : m_callsignAsSet(callsign.trimmed()), m_callsign(CCallsign::unifyCallsign(callsign, hint)),
26 m_telephonyDesignator(telephonyDesignator.trimmed()), m_typeHint(hint)
27 {}
28
29 CCallsign::CCallsign(const char *callsign, CCallsign::TypeHint hint)
30 : m_callsignAsSet(callsign), m_callsign(CCallsign::unifyCallsign(callsign, hint)), m_typeHint(hint)
31 {}
32
34 {
36 qRegisterMetaType<CCallsign::TypeHint>();
37 }
38
40 {
41 Q_UNUSED(i18n)
42 return m_callsign;
43 }
44
45 void CCallsign::clear() { *this = CCallsign(); }
46
48 {
49 if (QStringView(u"FSS") == suffix)
50 {
51 return 1;
52 }
53 if (QStringView(u"CTR") == suffix)
54 {
55 return 2;
56 }
57 if (QStringView(u"APP") == suffix)
58 {
59 return 3;
60 }
61 if (QStringView(u"DEP") == suffix)
62 {
63 return 4;
64 }
65 if (QStringView(u"TWR") == suffix)
66 {
67 return 5;
68 }
69 if (QStringView(u"GND") == suffix)
70 {
71 return 6;
72 }
73 if (QStringView(u"DEL") == suffix)
74 {
75 return 7;
76 }
77 if (QStringView(u"ATIS") == suffix)
78 {
79 return 8;
80 }
81 if (QStringView(u"SUP") == suffix)
82 {
83 return 9;
84 }
85 if (QStringView(u"OBS") == suffix)
86 {
87 return 10;
88 }
89 if (QStringView(u"INS") == suffix)
90 {
91 return 11;
92 } // instructor/mentor
93 if (QStringView(u"ADM") == suffix)
94 {
95 return 12;
96 } // admin
97 if (QStringView(u"VATGOV") == suffix)
98 {
99 return 13;
100 } // VATSIM governors
101 if (QStringView(u"VATSIM") == suffix)
102 {
103 return 14;
104 } // VATSIM founder
105 if (QStringView(u"EXAM") == suffix)
106 {
107 return 15;
108 }
109 return std::numeric_limits<int>::max();
110 }
111
113 {
114 const QString ucCallsign = callsign.trimmed().toUpper();
115
116 // Ref T664, allow ATC with hyphen, such as Ml-SNO_CTR
117 switch (hint)
118 {
119 // ATC allows "-", aircraft not
120 case Atc: return removeChars(ucCallsign, [](QChar c) { return !c.isLetterOrNumber() && c != '_' && c != '-'; });
121 case Aircraft: return removeChars(ucCallsign, [](QChar c) { return !c.isLetterOrNumber() && c != '_'; });
122 default: break;
123 }
124
125 // no hint
126 if (CCallsign::looksLikeAtcCallsign(ucCallsign))
127 {
128 return removeChars(ucCallsign, [](QChar c) { return !c.isLetterOrNumber() && c != '_' && c != '-'; });
129 }
130
131 // strict check
132 return removeChars(ucCallsign, [](QChar c) { return !c.isLetterOrNumber() && c != '_'; });
133 }
134
136 {
137 if (callsign.m_callsign.startsWith(QStringView(u"VATGOV")))
138 {
139 return CIcon::iconByIndex(CIcons::NetworkRolePilot);
140 }
141 const bool pilot = callsign.getTypeHint() == CCallsign::Aircraft || !callsign.hasSuffix();
142 return pilot ? CIcon::iconByIndex(CIcons::NetworkRolePilot) : CCallsign::atcSuffixToIcon(callsign.getSuffix());
143 }
144
145 CStatusMessage CCallsign::logMessage(const CCallsign &callsign, const QString &message,
146 const QStringList &extraCategories, CStatusMessage::StatusSeverity s)
147 {
148 static const CLogCategoryList cats({ CLogCategories::aviation() });
149 const CStatusMessage m(cats.with(CLogCategoryList::fromQStringList(extraCategories)), s,
150 callsign.isEmpty() ? message.trimmed() :
151 callsign.toQString() + ": " + message.trimmed());
152 return m;
153 }
154
155 void CCallsign::addLogDetailsToList(CStatusMessageList *log, const CCallsign &callsign, const QString &message,
156 const QStringList &extraCategories, CStatusMessage::StatusSeverity s)
157 {
158 if (!log)
159 {
160 return;
161 }
162 if (message.isEmpty())
163 {
164 return;
165 }
166 log->push_back(logMessage(callsign, message, extraCategories, s));
167 }
168
170 {
171 if (suffix.length() < 3)
172 {
173 return CIcon::iconByIndex(CIcons::NetworkRoleUnknown);
174 }
175 const QString sfx = suffix.toUpper();
176 if (QStringView(u"APP") == sfx)
177 {
178 return CIcon::iconByIndex(CIcons::NetworkRoleApproach);
179 }
180 if (QStringView(u"DEP") == sfx)
181 {
182 return CIcon::iconByIndex(CIcons::NetworkRoleDeparture);
183 }
184 if (QStringView(u"GND") == sfx)
185 {
186 return CIcon::iconByIndex(CIcons::NetworkRoleGround);
187 }
188 if (QStringView(u"TWR") == sfx)
189 {
190 return CIcon::iconByIndex(CIcons::NetworkRoleTower);
191 }
192 if (QStringView(u"DEL") == sfx)
193 {
194 return CIcon::iconByIndex(CIcons::NetworkRoleDelivery);
195 }
196 if (QStringView(u"CTR") == sfx)
197 {
198 return CIcon::iconByIndex(CIcons::NetworkRoleCenter);
199 }
200 if (QStringView(u"SUP") == sfx)
201 {
202 return CIcon::iconByIndex(CIcons::NetworkRoleSup);
203 }
204 if (QStringView(u"OBS") == sfx)
205 {
206 return CIcon::iconByIndex(CIcons::NetworkRoleObs);
207 }
208 if (QStringView(u"INS") == sfx)
209 {
211 }
212 if (QStringView(u"FSS") == sfx)
213 {
214 return CIcon::iconByIndex(CIcons::NetworkRoleFss);
215 }
216 if (QStringView(u"ATIS") == sfx)
217 {
218 return CIcon::iconByIndex(CIcons::AviationAtis);
219 }
220 if (QStringView(u"EXAM") == sfx)
221 {
223 }
224 if (QStringView(u"VATSIM") == sfx)
225 {
226 return CIcon::iconByIndex(CIcons::NetworkRoleSup);
227 }
228 if (QStringView(u"VATGOV") == sfx)
229 {
230 return CIcon::iconByIndex(CIcons::NetworkRoleSup);
231 }
232 return CIcon::iconByIndex(CIcons::NetworkRoleUnknown);
233 }
234
236 {
237 if (this->getTypeHint() == Atc)
238 {
239 return true;
240 }
241 if (!this->hasSuffix())
242 {
243 return false;
244 }
246 }
247
249 {
250 if (this->getTypeHint() == Aircraft)
251 {
252 return false;
253 }
254 return m_callsign.endsWith("SUP");
255 }
256
258 {
259 return m_callsignAsSet == "*" || m_callsign == "*" || m_callsignAsSet == "BROADCAST";
260 }
261
263 {
264 m_callsignAsSet = "BROADCAST";
265 m_callsign = "BROADCAST";
266 }
267
269 {
270 m_callsignAsSet = "SUP";
271 m_callsign = "SUP";
272 }
273
274 bool CCallsign::isMaybeCopilotCallsign(const CCallsign &pilotCallsign) const
275 {
276 return m_callsign.startsWith(pilotCallsign.asString()) &&
277 m_callsign.size() == pilotCallsign.asString().size() + 1 &&
278 m_callsign.at(m_callsign.size() - 1) >= 'A' && m_callsign.at(m_callsign.size() - 1) <= 'Z';
279 }
280
282 {
283 // mainly used to fix the cross coupled callsigns such as *EDDF_TWR
284 if (m_callsignAsSet.startsWith('*'))
285 {
286 return this->getStringAsSet();
287 }
288 return this->asString();
289 }
290
291 bool CCallsign::isSameAsSet() const { return m_callsign == m_callsignAsSet; }
292
294 {
295 if (this->isAtcCallsign())
296 {
297 if (m_callsign.length() >= 4)
298 {
299 return m_callsign.left(4).toUpper();
300 }
301 }
302 return {};
303 }
304
306 {
307 if (this->getTypeHint() == Aircraft)
308 {
309 return false;
310 }
311 if (!this->hasSuffix())
312 {
313 return false;
314 }
316 }
317
318 bool CCallsign::isObserverCallsign() const { return m_callsignAsSet.endsWith("_OBS", Qt::CaseInsensitive); }
319
321 {
322 if (this->isEmpty())
323 {
324 return {};
325 }
326 QString obs = this->getStringAsSet();
327 if (obs.endsWith("_OBS", Qt::CaseInsensitive))
328 {
329 return obs;
330 } // already OBS
331 if (obs.contains('_'))
332 {
333 obs = obs.left(obs.lastIndexOf('_'));
334 }
335 return obs.append("_OBS").toUpper();
336 }
337
339 {
340 QString s;
341 if (this->hasSuffix())
342 {
343 s = this->getStringAsSet().section('_', -1).toUpper();
344 }
345 return s;
346 }
347
349 {
350 QString flightNumber;
351 return this->getAirlinePrefix(flightNumber);
352 }
353
355 {
356 QString identification;
357 return this->getAirlinePrefix(flightNumber, identification);
358 }
359
360 QString CCallsign::getAirlinePrefix(QString &flightNumber, QString &flightIdentification) const
361 {
362 // DLH1WP only 11 number
363 // UPSE123 4 characters, then number
364
365 flightNumber.clear();
366 if (m_callsign.length() < 3)
367 {
368 return {};
369 }
370 if (this->isAtcCallsign())
371 {
372 return {};
373 }
374
375 thread_local const QRegularExpression regExp("(^[A-Z]{3,})(\\d+)");
376 const QRegularExpressionMatch match = regExp.match(m_callsign);
377 if (!match.hasMatch())
378 {
379 return {};
380 }
381 // 0 is whole capture
382 const QString airline = match.captured(1);
383 flightNumber = match.captured(2); // null string if not exits
384
385 // hard facts
386 if (airline.length() == 3) // we allow 3 letters
387 {
388 flightIdentification = m_callsign.length() > 3 ? m_callsign.mid(3) : QString();
389 return airline;
390 }
391 if (airline.length() == 4 && airline.startsWith('V')) // we allow virtual 4 letter codes, e.g. VDLD
392 {
393 flightIdentification = m_callsign.length() > 4 ? m_callsign.mid(4) : QString();
394 return airline;
395 }
396
397 // some people use callsigns like UPSE123
398 if (flightNumber.length() >= 1 && airline.length() == 4)
399 {
400 flightIdentification = m_callsign.mid(3);
401 return airline.left(3);
402 }
403
404 return {}; // invalid
405 }
406
408 {
409 if (this->isAtcCallsign())
410 {
411 return {};
412 }
413 QString flightNumber;
414 QString identification;
415 const QString airline = this->getAirlinePrefix(flightNumber, identification);
416 return airline.isEmpty() ? QString() : identification;
417 }
418
420 {
421 if (this->isAtcCallsign())
422 {
423 return {};
424 }
425 QString flightNumber;
426 const QString airline = this->getAirlinePrefix(flightNumber);
427 return airline.isEmpty() ? QString() : flightNumber;
428 }
429
431 {
432 if (this->isAtcCallsign())
433 {
434 return -1;
435 }
436 bool ok {};
437 const int fn = this->getFlightNumber().toInt(&ok);
438 return ok ? fn : -1;
439 }
440
441 bool CCallsign::hasSuffix() const { return this->getStringAsSet().contains('_'); }
442
444 {
445 const QString s = this->getSuffix();
446 return !s.isEmpty() && atcCallsignSuffixes().contains(s);
447 }
448
450
451 bool CCallsign::equalsString(const QString &callsignString) const
452 {
453 CCallsign other(callsignString);
454 return other == (*this);
455 }
456
458 {
459 if (index.isMyself())
460 {
461 return QVariant::fromValue(*this);
462 }
463 const auto i = index.frontCasted<ColumnIndex>();
464 switch (i)
465 {
466 case IndexCallsignString: return { this->asString() };
467 case IndexCallsignStringAsSet: return { this->getStringAsSet() };
468 case IndexTelephonyDesignator: return { this->getTelephonyDesignator() };
469 case IndexSuffix: return { this->getSuffix() };
470 default: return CValueObject::propertyByIndex(index);
471 }
472 }
473
475 {
476 if (index.isMyself())
477 {
478 (*this) = variant.value<CCallsign>();
479 return;
480 }
481 const auto i = index.frontCasted<ColumnIndex>();
482 switch (i)
483 {
484 case IndexCallsignString: m_callsign = unifyCallsign(variant.toString()); break;
485 case IndexCallsignStringAsSet: m_callsignAsSet = variant.toString(); break;
486 case IndexTelephonyDesignator: m_telephonyDesignator = variant.toString(); break;
487 default: CValueObject::setPropertyByIndex(index, variant); break;
488 }
489 }
490
492 {
493 if (index.isMyself())
494 {
495 return m_callsign.compare(compareValue.m_callsign, Qt::CaseInsensitive);
496 }
497 const auto i = index.frontCasted<ColumnIndex>();
498 switch (i)
499 {
500 case IndexCallsignString: return m_callsign.compare(compareValue.m_callsign, Qt::CaseInsensitive);
501 case IndexCallsignStringAsSet:
502 return m_callsignAsSet.compare(compareValue.m_callsignAsSet, Qt::CaseInsensitive);
503 case IndexTelephonyDesignator:
504 return m_telephonyDesignator.compare(compareValue.m_telephonyDesignator, Qt::CaseInsensitive);
505 case IndexSuffix: return this->getSuffix().compare(compareValue.getSuffix(), Qt::CaseInsensitive);
506 default: return CValueObject::comparePropertyByIndex(index, compareValue);
507 }
508 Q_ASSERT_X(false, Q_FUNC_INFO, "Compare failed");
509 return 0;
510 }
511
513 {
514 switch (m_typeHint)
515 {
516 case Atc: return isValidAtcCallsign(*this);
517 case Aircraft: return isValidAircraftCallsign(*this);
518 default: return !this->isEmpty();
519 }
520 }
521
523 {
524 if (callsign.length() < 2 || callsign.length() > 10)
525 {
526 return false;
527 }
528 return !containsChar(callsign, [](QChar c) { return !c.isUpper() && !c.isDigit(); });
529 }
530
532 {
533 return isValidAircraftCallsign(callsign.asString());
534 }
535
537 {
538 // Ref T664, allow ATC with hyphen, such as Ml-SNO_CTR
539 if (callsign.length() < 2 || callsign.length() > 10)
540 {
541 return false;
542 }
543 return !containsChar(callsign, [](QChar c) { return c != '-' && c != '_' && !c.isUpper() && !c.isDigit(); });
544 }
545
546 bool CCallsign::isValidAtcCallsign(const CCallsign &callsign) { return isValidAtcCallsign(callsign.asString()); }
547
549 {
550 static const QStringList a({ "APP", "GND", "DEP", "TWR", "DEL", "CTR" });
551 return a;
552 }
553
555 {
556 static const QStringList a({ "ATIS", "APP", "GND", "OBS", "DEP", "TWR", "DEL", "CTR", "SUP", "FSS", "INS" });
557 return a;
558 }
559
561 {
562 if (!callsign.contains("_"))
563 {
564 return false;
565 }
566 const QStringView uc = callsign.toUpper();
567 return std::any_of(CCallsign::atcAlikeCallsignSuffixes().cbegin(), CCallsign::atcAlikeCallsignSuffixes().cend(),
568 [&](const QString &r) { return uc.endsWith(r); });
569 }
570} // namespace swift::misc::aviation
Value object for icons. An icon is stored in the global icon repository and identified by its index....
Definition icon.h:39
static const CIcon & iconByIndex(CIcons::IconIndex index)
Icon for given index.
Definition icon.cpp:63
@ NetworkRoleMnt
Mentor.
Definition icons.h:78
static const QString & aviation()
Aviation specific.
A sequence of log categories.
static CLogCategoryList fromQStringList(const QStringList &stringList)
Convert a string list, such as that returned by toQStringList(), into a CLogCategoryList.
Non-owning reference to a CPropertyIndex with a subset of its features.
CastType frontCasted() const
First element casted to given type, usually the PropertIndex enum.
bool isMyself() const
Myself index, used with nesting.
void push_back(const T &value)
Appends an element at the end of the sequence.
Definition sequence.h:308
Streamable status message, e.g.
swift::misc::StatusSeverity StatusSeverity
Status severities.
Status messages, e.g. from Core -> GUI.
int getSuffixSortOrder() const
Sort order by suffix.
Definition callsign.cpp:449
const QString & getTelephonyDesignator() const
Get callsign telephony designator (how callsign is pronounced).
Definition callsign.h:108
void clear()
Clear this callsign.
Definition callsign.cpp:45
int comparePropertyByIndex(CPropertyIndexRef index, const CCallsign &compareValue) const
Compare for index.
Definition callsign.cpp:491
bool isMaybeCopilotCallsign(const CCallsign &pilotCallsign) const
Returns true if this is a co-pilot callsign of pilot. The logic is that the callsign is the same as t...
Definition callsign.cpp:274
static int suffixToSortOrder(const QString &suffix)
Index for ATC suffix, if unknown int max value.
Definition callsign.cpp:47
QString getSuffix() const
Get the callsign suffix ("TWR", "ATIS" ...) if any ("_" is removed).
Definition callsign.cpp:338
TypeHint
Representing what.
Definition callsign.h:44
bool hasSuffix() const
Suffix such as "_TWR"?
Definition callsign.cpp:441
void markAsBroadcastCallsign()
Set a human readable name as "broadcast" callsign.
Definition callsign.cpp:262
QString convertToQString(bool i18n=false) const
Cast as QString.
Definition callsign.cpp:39
int getFlightNumberInt() const
Flight number as integer.
Definition callsign.cpp:430
QString getFlightIndentification() const
Flight number (e.g. DLH1234 -> 1234) if applicable.
Definition callsign.cpp:407
static const QStringList & atcCallsignSuffixes()
List of real ATC suffixes (e.g. TWR);.
Definition callsign.cpp:548
static bool looksLikeAtcCallsign(const QString &callsign)
Does this look like an ATC callsign.
Definition callsign.cpp:560
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
Definition callsign.cpp:457
void markAsWallopCallsign()
Set a human readable name as "wallop-channel" callsign.
Definition callsign.cpp:268
QString getFlightNumber() const
Flight number (e.g. DLH1234 -> 1234) if applicable.
Definition callsign.cpp:419
bool isSupervisorCallsign() const
Supervisor?
Definition callsign.cpp:248
static void addLogDetailsToList(CStatusMessageList *log, const CCallsign &callsign, const QString &message, const QStringList &extraCategories={}, CStatusMessage::StatusSeverity s=CStatusMessage::SeverityInfo)
Specialized log for matching / reverse lookup.
Definition callsign.cpp:155
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
Definition callsign.cpp:474
bool isObserverCallsign() const
Observer callsign?
Definition callsign.cpp:318
bool isAtcAlikeCallsign() const
ATC alike callsign.
Definition callsign.cpp:305
CCallsign()=default
Default constructor.
const QString & asString() const
Get callsign (normalized).
Definition callsign.h:96
static CStatusMessage logMessage(const CCallsign &callsign, const QString &message, const QStringList &extraCategories={}, CStatusMessage::StatusSeverity s=CStatusMessage::SeverityInfo)
Specialized log message for matching / reverse lookup.
Definition callsign.cpp:145
const QString & getStringAsSet() const
Get callsign.
Definition callsign.h:99
static QString unifyCallsign(const QString &callsign, TypeHint hint=NoHint)
Unify the callsign by removing illegal characters.
Definition callsign.cpp:112
bool isEmpty() const
Is empty?
Definition callsign.h:63
static bool isValidAircraftCallsign(const QString &callsign)
Valid callsign?
Definition callsign.cpp:522
TypeHint getTypeHint() const
Type hint.
Definition callsign.h:111
static const CIcon & convertToIcon(const CCallsign &callsign)
Representing icon.
Definition callsign.cpp:135
QString getAsObserverCallsignString() const
Makes this callsign looking like an observer callsign (DAMBZ -> DAMBZ_OBS).
Definition callsign.cpp:320
bool hasAtcSuffix() const
Has an ATC suffix?
Definition callsign.cpp:443
QString getIcaoCode() const
Get ICAO code, if this makes sense (EDDF_TWR -> EDDF).
Definition callsign.cpp:293
QString getAirlinePrefix() const
Airline suffix (e.g. DLH1234 -> DLH) if applicable.
Definition callsign.cpp:348
static const CIcon & atcSuffixToIcon(const QString &suffix)
Suffix to icon.
Definition callsign.cpp:169
bool isAtcCallsign() const
ATC callsign.
Definition callsign.cpp:235
static void registerMetadata()
Register metadata.
Definition callsign.cpp:33
QString getFsdCallsignString() const
The callsign string used with FSD.
Definition callsign.cpp:281
bool isSameAsSet() const
Same as set callsign?
Definition callsign.cpp:291
bool equalsString(const QString &callsignString) const
Equals callsign string?
Definition callsign.cpp:451
bool isBroadcastCallsign() const
Pseudo callsing for broadcast messages.
Definition callsign.cpp:257
static bool isValidAtcCallsign(const QString &callsign)
Valid callsign?
Definition callsign.cpp:536
bool isValid() const
Valid callsign?
Definition callsign.cpp:512
static const QStringList & atcAlikeCallsignSuffixes()
List of real ("TWR") and treated like ATC suffixes (e.g. OBS);.
Definition callsign.cpp:554
int comparePropertyByIndex(CPropertyIndexRef index, const Derived &compareValue) const
Compare for index.
Definition mixinindex.h:203
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
Definition mixinindex.h:167
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
Definition mixinindex.h:180
static void registerMetadata()
Register metadata.
QString toQString(bool i18n=false) const
Cast as QString.
Definition mixinstring.h:74
QString removeChars(const QString &s, F predicate)
Return a string with characters removed that match the given predicate.
Definition stringutils.h:34
bool containsChar(const QString &s, F predicate)
True if any character in the string matches the given predicate.
Definition stringutils.h:64
bool isDigit(char32_t ucs4)
bool isLetterOrNumber(char32_t ucs4)
bool isUpper(char32_t ucs4)
QRegularExpressionMatch match(QStringView subjectView, qsizetype offset, QRegularExpression::MatchType matchType, QRegularExpression::MatchOptions matchOptions) const const
QString captured(QAnyStringView name) const const
bool hasMatch() const const
QString & append(QChar ch)
void clear()
int compare(QLatin1StringView s1, const QString &s2, Qt::CaseSensitivity cs)
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
qsizetype lastIndexOf(QChar ch, Qt::CaseSensitivity cs) const const
QString left(qsizetype n) &&
qsizetype length() const const
QString mid(qsizetype position, qsizetype n) &&
QString section(QChar sep, qsizetype start, qsizetype end, QString::SectionFlags flags) const const
qsizetype size() const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
int toInt(bool *ok, int base) const const
QString toUpper() const const
QString trimmed() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
bool endsWith(QChar ch) const const
CaseInsensitive
QVariant fromValue(T &&value)
QString toString() const const
T value() const &const
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.
Definition valueobject.h:67