10 namespace swift::misc::aviation
21 qRegisterMetaType<CInformationMessage::InformationType>();
36 static const QString atis(
"ATIS");
41 static const QString metar(
"METAR");
46 static const QString taf(
"TAF");
51 static const QString ds(
"unknown");
59 if (index.
isMyself()) {
return QVariant::fromValue(*
this); }
64 case IndexType:
return QVariant::fromValue(m_type);
65 case IndexMessage:
return QVariant::fromValue(m_message);
86 case IndexType: m_type =
static_cast<InformationType>(variant.toInt());
break;
87 case IndexMessage: m_message = variant.toString();
break;
98 const int c = Compare::compare(m_type, compareValue.m_type);
100 return m_message.compare(compareValue.m_message, Qt::CaseInsensitive);
109 case IndexMessage:
return m_message.compare(compareValue.m_message, Qt::CaseInsensitive);
110 case IndexType:
return Compare::compare(this->
getType(), compareValue.
getType());
113 Q_ASSERT_X(
false, Q_FUNC_INFO,
"Compare failed");
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 setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
int comparePropertyByIndex(CPropertyIndexRef index, const ITimestampBased &compareValue) const
Compare for index.
static bool canHandleIndex(CPropertyIndexRef index)
Can given index be handled.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
int comparePropertyByIndex(CPropertyIndexRef index, const Derived &compareValue) const
Compare for index.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.