|
swift
|
Value object for a matching statistics entry. More...
#include <matchingstatisticsentry.h>
Public Types | |
| enum | ColumnIndex { IndexSessionId = CPropertyIndexRef::GlobalIndexCMatchingStatisticsEntry , IndexModelSetId , IndexEntryType , IndexEntryTypeAsString , IndexEntryTypeAsIcon , IndexCount , IndexDescription , IndexAircraftDesignator , IndexAirlineDesignator , IndexHasAircraftAirlineCombination } |
| Property indexes. More... | |
| enum | EntryType { Found , Missing } |
| Represents type of entry. More... | |
| Public Types inherited from swift::misc::CValueObject< CMatchingStatisticsEntry > | |
| using | base_type |
| Base class. | |
| Public Types inherited from swift::misc::CEmpty | |
| using | base_type = CEmpty |
| Base class is alias of itself. | |
| Public Types inherited from swift::misc::mixin::Index< CMatchingStatisticsEntry > | |
| enum | ColumnIndex |
| Base class enums. More... | |
| Public Types inherited from swift::misc::ITimestampBased | |
| enum | ColumnIndex { IndexUtcTimestamp = CPropertyIndexRef::GlobalIndexITimestampBased , IndexUtcTimestampFormattedYmdhms , IndexUtcTimestampFormattedYmdhmsz , IndexUtcTimestampFormattedMdhms , IndexUtcTimestampFormattedMdhmsz , IndexUtcTimestampFormattedDhms , IndexUtcTimestampFormattedHms , IndexUtcTimestampFormattedHm , IndexMSecsSinceEpoch } |
| Properties by index. More... | |
Public Member Functions | |
| CMatchingStatisticsEntry ()=default | |
| Default constructor. | |
| CMatchingStatisticsEntry (EntryType type, const QString &sessionId, const QString &modelSetId, const QString &description, const QString &aircraftDesignator, const QString &airlineDesignator={}) | |
| Constructor. | |
| const QString & | getSessionId () const |
| Session id. | |
| void | setSessionId (const QString &sessionId) |
| Set session id. | |
| const QString & | getModelSetId () const |
| Get model set id. | |
| void | setModelSetId (const QString &modelSetId) |
| Set model set id. | |
| const QString & | getAircraftDesignator () const |
| Get missing aircraft designator. | |
| void | setAircraftDesignator (const QString &designator) |
| Set missing aircraft designator. | |
| const QString & | getAirlineDesignator () const |
| Get missing airline designator. | |
| void | setAirlineDesignator (const QString &designator) |
| Set missing airline designator. | |
| EntryType | getEntryType () const |
| Type of entry. | |
| bool | isMissing () const |
| Missing entry? | |
| void | setEntryType (EntryType type) |
| Set the entry type. | |
| const QString & | getDescription () const |
| Get description. | |
| void | setDescription (const QString &description) |
| Set a description. | |
| int | getCount () const |
| Current count. | |
| void | increaseCount () |
| Count increased by one. | |
| bool | matches (EntryType type, const QString &sessionId, const QString &aircraftDesignator, const QString &airlineDesignator) const |
| Matches given value? | |
| QVariant | propertyByIndex (swift::misc::CPropertyIndexRef index) const |
| Property by index. | |
| void | setPropertyByIndex (swift::misc::CPropertyIndexRef index, const QVariant &variant) |
| Set property by index. | |
| int | comparePropertyByIndex (CPropertyIndexRef index, const CMatchingStatisticsEntry &compareValue) const |
| Compare by index. | |
| QString | convertToQString (bool i18n=false) const |
| Cast as QString. | |
| bool | hasAircraftAirlineCombination () const |
| Missing aircraft/airline combination? | |
| Public Member Functions inherited from swift::misc::mixin::MetaType< CMatchingStatisticsEntry > | |
| int | getMetaTypeId () const |
| Returns the Qt meta type ID of this object. | |
| QString | getClassName () const |
| Class name. | |
| bool | isA (int metaTypeId) const |
| Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
| Public Member Functions inherited from swift::misc::mixin::DBusByMetaClass< CMatchingStatisticsEntry > | |
| void | marshallToDbus (QDBusArgument &arg, Tags...) const |
| Marshall without begin/endStructure, for when composed within another object. | |
| void | unmarshallFromDbus (const QDBusArgument &arg, Tags...) |
| Unmarshall without begin/endStructure, for when composed within another object. | |
| Public Member Functions inherited from swift::misc::mixin::DataStreamByMetaClass< CMatchingStatisticsEntry > | |
| void | marshalToDataStream (QDataStream &stream) const |
| Marshal a value to a QDataStream. | |
| void | unmarshalFromDataStream (QDataStream &stream) |
| Unmarshal a value from a QDataStream. | |
| Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< CMatchingStatisticsEntry > | |
| QJsonObject | toJson () const |
| Cast to JSON object. | |
| QString | toJsonString (QJsonDocument::JsonFormat format=QJsonDocument::Indented) const |
| Convenience function JSON as string. | |
| void | convertFromJson (const QJsonObject &json) |
| Assign from JSON object. | |
| Public Member Functions inherited from swift::misc::mixin::String< CMatchingStatisticsEntry > | |
| QString | toQString (bool i18n=false) const |
| Cast as QString. | |
| std::string | toStdString (bool i18n=false) const |
| To std string. | |
| QString | stringForStreaming () const |
| String for streaming operators. | |
| Public Member Functions inherited from swift::misc::mixin::Index< CMatchingStatisticsEntry > | |
| CPropertyIndexList | apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false) |
| Update by variant map. | |
| void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
| Set property by index. | |
| QVariant | propertyByIndex (CPropertyIndexRef index) const |
| Property by index. | |
| int | comparePropertyByIndex (CPropertyIndexRef index, const CMatchingStatisticsEntry &compareValue) const |
| Compare for index. | |
| bool | equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const |
| Is given variant equal to value of property index? | |
| Public Member Functions inherited from swift::misc::mixin::Icon< CMatchingStatisticsEntry > | |
| CIcons::CIcons::StandardIconUnknown16 | toIcon () const |
| As icon, not implemented by all classes. | |
| Public Member Functions inherited from swift::misc::ITimestampBased | |
| QDateTime | getUtcTimestamp () const |
| Get timestamp. | |
| qint64 | getMSecsSinceEpoch () const |
| Timestamp as ms value. | |
| qint64 | getTimeDifferenceMs (qint64 compareTime) const |
| Time difference in ms. | |
| qint64 | getTimeDifferenceAbsMs (qint64 compareTime) const |
| Time difference in ms. | |
| qint64 | getTimeDifferenceToNowMs () const |
| Time difference to now. | |
| qint64 | getTimeDifferenceMs (const ITimestampBased &compare) const |
| Time difference in ms. | |
| qint64 | getAbsTimeDifferenceMs (qint64 compareTime) const |
| Time difference in ms. | |
| qint64 | getAbsTimeDifferenceMs (const ITimestampBased &compare) const |
| Time difference in ms. | |
| void | setTimestampToNull () |
| Set to null. | |
| void | setMSecsSinceEpoch (qint64 mSecsSinceEpoch) |
| Timestamp as ms value. | |
| void | setByYearMonthDayHourMinute (const QString &yyyyMMddhhmmss) |
| Set by value such as "20141003231045". | |
| void | setUtcTimestamp (const QDateTime ×tamp) |
| Set timestamp. | |
| bool | isNewerThan (const ITimestampBased &otherTimestampObj) const |
| Is this newer than other? | |
| bool | isNewerThan (qint64 mSecsSinceEpoch) const |
| Is newer than epoch value? | |
| bool | isOlderThan (const ITimestampBased &otherTimestampObj) const |
| Is this older than other? | |
| bool | isOlderThan (qint64 mSecsSinceEpoch) const |
| Is this older than other? | |
| bool | isOlderThanNowMinusOffset (int offsetMs) const |
| Older than now-offset. | |
| bool | isSame (const ITimestampBased &otherTimestampObj) const |
| Same timestamp. | |
| qint64 | msecsTo (const ITimestampBased &otherTimestampObj) const |
| Time difference. | |
| qint64 | absMsecsTo (const ITimestampBased &otherTimestampObj) const |
| Time difference. | |
| qint64 | msecsToNow () const |
| Milliseconds to now. | |
| void | setCurrentUtcTime () |
| Set the current time as timestamp. | |
| void | addMsecs (qint64 ms) |
| Add the given number of milliseconds to the timestamp. | |
| QString | getFormattedUtcTimestampHms () const |
| As hh:mm:ss. | |
| QString | getFormattedUtcTimestampHmsz () const |
| As hh:mm:ss.zzz. | |
| QString | getFormattedUtcTimestampHm () const |
| As hh:mm. | |
| QString | getFormattedUtcTimestampDhms () const |
| As dd HH mm ss. | |
| QString | getFormattedUtcTimestampMdhms () const |
| As MM dd HH mm ss. | |
| QString | getFormattedUtcTimestampMdhmsz () const |
| As MM dd HH mm ss.zzz. | |
| QString | getFormattedUtcTimestampYmdhms () const |
| As yyyy MM dd HH mm ss. | |
| QString | getFormattedUtcTimestampYmdhmsz () const |
| As yyyy MM dd HH mm ss.zzz. | |
| bool | hasValidTimestamp () const |
| Valid timestamp? | |
Static Public Member Functions | |
| static const QString & | entryTypeToString (EntryType type) |
| Convert entry type. | |
| static const swift::misc::CIcon & | entryTypeToIcon (EntryType type) |
| Convert entry type. | |
| Static Public Member Functions inherited from swift::misc::mixin::MetaType< CMatchingStatisticsEntry > | |
| static void | registerMetadata () |
| Register metadata. | |
| Static Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< CMatchingStatisticsEntry > | |
| static DerivedObj | fromJson (const QJsonObject &json) |
| Get object from QJsonObject. | |
| static DerivedObj | fromJsonNoThrow (const QString &jsonString, bool acceptCacheJson, bool &success, QString &errMsg) |
| Get object from JSON string. | |
| Static Public Member Functions inherited from swift::misc::ITimestampBased | |
| static bool | isAnyTimestampIndex (int index) |
| Any of the timestamp indexes. | |
| static bool | canHandleIndex (CPropertyIndexRef index) |
| Can given index be handled. | |
Additional Inherited Members | |
| Protected Member Functions inherited from swift::misc::CValueObject< CMatchingStatisticsEntry > | |
| CEmpty ()=default | |
| Inheriting constructors. | |
| CEmpty (const CEmpty &)=default | |
| Inheriting constructors. | |
| CValueObject ()=default | |
| Default constructor. | |
| CValueObject & | operator= (const CValueObject &)=default |
| Copy assignment operator. | |
| ~CValueObject ()=default | |
| Destructor. | |
| Protected Member Functions inherited from swift::misc::CEmpty | |
| CEmpty ()=default | |
| Protected default constructor. | |
| CEmpty (const CEmpty &)=default | |
| Protected copy constructor. | |
| CEmpty & | operator= (const CEmpty &)=default |
| Protected copy assignment operator. | |
| ~CEmpty ()=default | |
| Non-virtual protected destructor. | |
| Protected Member Functions inherited from swift::misc::ITimestampBased | |
| ITimestampBased ()=default | |
| Constructor. | |
| ITimestampBased (qint64 msSincePoch) | |
| Constructor. | |
| ITimestampBased (const QDateTime ×tamp) | |
| Constructor. | |
| QVariant | propertyByIndex (CPropertyIndexRef index) const |
| Property by index. | |
| void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
| Set property by index. | |
| int | comparePropertyByIndex (CPropertyIndexRef index, const ITimestampBased &compareValue) const |
| Compare for index. | |
| void | updateMissingParts (const ITimestampBased &other) |
| Update missing parts. | |
| Protected Attributes inherited from swift::misc::ITimestampBased | |
| qint64 | m_timestampMSecsSinceEpoch = -1 |
| timestamp value | |
Value object for a matching statistics entry.
Definition at line 18 of file matchingstatisticsentry.h.
Property indexes.
Definition at line 24 of file matchingstatisticsentry.h.
Represents type of entry.
Definition at line 39 of file matchingstatisticsentry.h.
| swift::misc::simulation::CMatchingStatisticsEntry::CMatchingStatisticsEntry | ( | EntryType | type, |
| const QString & | sessionId, | ||
| const QString & | modelSetId, | ||
| const QString & | description, | ||
| const QString & | aircraftDesignator, | ||
| const QString & | airlineDesignator = {} ) |
Constructor.
Definition at line 12 of file matchingstatisticsentry.cpp.
| int swift::misc::simulation::CMatchingStatisticsEntry::comparePropertyByIndex | ( | CPropertyIndexRef | index, |
| const CMatchingStatisticsEntry & | compareValue ) const |
Compare by index.
Definition at line 130 of file matchingstatisticsentry.cpp.
| QString swift::misc::simulation::CMatchingStatisticsEntry::convertToQString | ( | bool | i18n = false | ) | const |
Cast as QString.
Definition at line 160 of file matchingstatisticsentry.cpp.
|
static |
Convert entry type.
Definition at line 51 of file matchingstatisticsentry.cpp.
|
static |
Convert entry type.
Definition at line 61 of file matchingstatisticsentry.cpp.
|
inline |
Get missing aircraft designator.
Definition at line 66 of file matchingstatisticsentry.h.
|
inline |
Get missing airline designator.
Definition at line 72 of file matchingstatisticsentry.h.
| int swift::misc::simulation::CMatchingStatisticsEntry::getCount | ( | ) | const |
Current count.
Definition at line 35 of file matchingstatisticsentry.cpp.
|
inline |
Get description.
Definition at line 87 of file matchingstatisticsentry.h.
| CMatchingStatisticsEntry::EntryType swift::misc::simulation::CMatchingStatisticsEntry::getEntryType | ( | ) | const |
Type of entry.
Definition at line 23 of file matchingstatisticsentry.cpp.
|
inline |
Get model set id.
Definition at line 60 of file matchingstatisticsentry.h.
|
inline |
Session id.
Definition at line 54 of file matchingstatisticsentry.h.
| bool swift::misc::simulation::CMatchingStatisticsEntry::hasAircraftAirlineCombination | ( | ) | const |
Missing aircraft/airline combination?
Definition at line 46 of file matchingstatisticsentry.cpp.
| void swift::misc::simulation::CMatchingStatisticsEntry::increaseCount | ( | ) |
Count increased by one.
Definition at line 37 of file matchingstatisticsentry.cpp.
| bool swift::misc::simulation::CMatchingStatisticsEntry::isMissing | ( | ) | const |
Missing entry?
Definition at line 28 of file matchingstatisticsentry.cpp.
| bool swift::misc::simulation::CMatchingStatisticsEntry::matches | ( | CMatchingStatisticsEntry::EntryType | type, |
| const QString & | sessionId, | ||
| const QString & | aircraftDesignator, | ||
| const QString & | airlineDesignator ) const |
Matches given value?
Definition at line 39 of file matchingstatisticsentry.cpp.
| QVariant swift::misc::simulation::CMatchingStatisticsEntry::propertyByIndex | ( | swift::misc::CPropertyIndexRef | index | ) | const |
Property by index.
Definition at line 75 of file matchingstatisticsentry.cpp.
|
inline |
Set missing aircraft designator.
Definition at line 69 of file matchingstatisticsentry.h.
|
inline |
Set missing airline designator.
Definition at line 75 of file matchingstatisticsentry.h.
|
inline |
Set a description.
Definition at line 90 of file matchingstatisticsentry.h.
| void swift::misc::simulation::CMatchingStatisticsEntry::setEntryType | ( | CMatchingStatisticsEntry::EntryType | type | ) |
Set the entry type.
Definition at line 30 of file matchingstatisticsentry.cpp.
|
inline |
Set model set id.
Definition at line 63 of file matchingstatisticsentry.h.
| void swift::misc::simulation::CMatchingStatisticsEntry::setPropertyByIndex | ( | swift::misc::CPropertyIndexRef | index, |
| const QVariant & | variant ) |
Set property by index.
Definition at line 103 of file matchingstatisticsentry.cpp.
|
inline |
Set session id.
Definition at line 57 of file matchingstatisticsentry.h.