swift
Loading...
Searching...
No Matches
swift::misc::aviation::CAircraftIcaoCode Class Reference

Value object for ICAO classification. More...

#include <aircrafticaocode.h>

Inheritance diagram for swift::misc::aviation::CAircraftIcaoCode:
[legend]

Public Types

enum  ColumnIndex {
  IndexAircraftDesignator = CPropertyIndexRef::GlobalIndexCAircraftIcaoCode , IndexIataCode , IndexFamily , IndexCombinedAircraftType ,
  IndexManufacturer , IndexModelDescription , IndexModelIataDescription , IndexModelSwiftDescription ,
  IndexCombinedDescription , IndexWtc , IndexIsRealworld , IndexIsMilitary ,
  IndexIsLegacy , IndexIsVtol , IndexRank , IndexCategory ,
  IndexDesignatorManufacturer
}
 Properties by index. More...
Public Types inherited from swift::misc::CValueObject< CAircraftIcaoCode >
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< CAircraftIcaoCode >
enum  ColumnIndex
 Base class enums. More...
Public Types inherited from swift::misc::db::IDatastoreObjectWithIntegerKey
enum  ColumnIndex {
  IndexDbIntegerKey = CPropertyIndexRef::GlobalIndexIDatastoreInteger , IndexDbKeyAsString , IndexIsLoadedFromDb , IndexDatabaseIcon ,
  IndexVersion , IndexEndMarker
}
 Property index. 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

 CAircraftIcaoCode ()=default
 Default constructor.
 CAircraftIcaoCode (const QString &icao, const QString &combinedType="")
 Constructor.
 CAircraftIcaoCode (const QString &icao, const QString &combinedType, const QString &manufacturer, const QString &model, CWakeTurbulenceCategory wtc, bool realworld, bool legacy, bool military, int rank)
 Constructor.
 CAircraftIcaoCode (const QString &icao, const QString &iata, const QString &combinedType, const QString &manufacturer, const QString &model, CWakeTurbulenceCategory wtc, bool realworld, bool legacy, bool military, int rank)
 Constructor.
 CAircraftIcaoCode (const QString &icao, const QString &iata, const QString &family, const QString &combinedType, const QString &manufacturer, const QString &model, const QString &modelIata, const QString &modelSwift, CWakeTurbulenceCategory wtc, bool realworld, bool legacy, bool military, int rank)
 Constructor.
const QString & getDesignator () const
 Get ICAO designator, e.g. "B737".
QString getDesignatorDbKey () const
 Designator and DB key.
QString getDesignatorManufacturer () const
 Designator + Manufacturer.
void setDesignator (const QString &icaoDesignator)
 Set ICAO designator, e.g. "B737".
bool hasDesignator () const
 Aircraft designator?
bool hasValidDesignator () const
 Valid aircraft designator?
bool hasKnownDesignator () const
 Has designator and designator is not "ZZZZ".
bool hasSpecialDesignator () const
 Special designator.
const QString & getIataCode () const
 IATA code.
void setIataCode (const QString &iata)
 Set IATA code.
bool hasIataCode () const
 Has IATA code?
bool isIataSameAsDesignator () const
 IATA code same as designator?
const QString & getFamily () const
 Family (e.g. A350).
void setFamily (const QString &family)
 Set family.
bool hasFamily () const
 Has family?
bool isFamilySameAsDesignator () const
 Family same as designator?
const QString & getCombinedType () const
 Get type, e.g. "L2J".
bool hasValidCombinedType () const
 Combined type available?
QString getEngineType () const
 Get engine type, e.g. "J".
QChar getEngineTypeChar () const
 Get engine type, e.g. "J".
int getEnginesCount () const
 Engine count if any, -1 if no value is set.
QString getEngineCountString () const
 Engine count as string, if not available "".
QString getAircraftType () const
 Aircraft type, such a L(andplane), S(eaplane), H(elicopter).
QChar getAircraftTypeChar () const
 Aircraft type, such a L(andplane), S(eaplane), H(elicopter).
void setCombinedType (const QString &type)
 Set type.
const QString & getModelDescription () const
 Get IACO model description, e.g. "A-330-200".
const QString & getModelIataDescription () const
 Get IATA model description.
const QString & getModelSwiftDescription () const
 Get swift model description.
QString getCombinedModelDescription () const
 Combined description.
bool matchesAnyDescription (const QString &candidate) const
 Matches any of the (unempty) descriptions.
bool matchesCombinedType (const QString &combinedType) const
 Matches given combined code.
bool matchesCombinedTypeAndManufacturer (const QString &combinedType, const QString &manufacturer) const
 Matches combined type and.
void setModelDescription (const QString &modelDescription)
 Set the model description (ICAO description).
void setModelIataDescription (const QString &modelDescription)
 Set the alternative IATA model description.
void setModelSwiftDescription (const QString &modelDescription)
 Set the alternative swift model description.
bool hasModelDescription () const
 Has model description?
bool hasModelIataDescription () const
 Has IATA model description?
bool hasModelSwiftDescription () const
 Has swift model description?
const QString & getManufacturer () const
 Get manufacturer, e.g. "Airbus".
void setManufacturer (const QString &manufacturer)
 Set the manufacturer.
bool hasManufacturer () const
 Manufacturer.
bool matchesManufacturer (const QString &manufacturer) const
 Matching the manufacturer?
CWakeTurbulenceCategory getWtc () const
 Get WTC.
void setWtc (CWakeTurbulenceCategory wtc)
 Set WTC.
bool hasValidWtc () const
 Valid WTC code?
bool isVtol () const
 Is VTOL aircraft (helicopter, tilt wing).
bool isMilitary () const
 Military?
bool isRealWorld () const
 Real world aircraft?
bool isLegacyAircraft () const
 Legacy aircraft (no current ICAO code).
bool isDbDuplicate () const
 Is DB duplicate? This means a redundant ICAO DB entry.
void setCodeFlags (bool military, bool legacy, bool realWorld)
 Flags.
void setMilitary (bool military)
 Military.
void setRealWorld (bool realWorld)
 Real world.
void setLegacy (bool legacy)
 Legacy.
int getRank () const
 Ranking.
QString getRankString () const
 Ranking.
void setRank (int rank)
 Ranking.
QString getCombinedIcaoStringWithKey () const
 Combined ICAO descriptive string with key.
QString getCombinedIcaoCategoryStringWithKey () const
 Combined ICAO descriptive string with category and key.
QString getCombinedIataStringWithKey () const
 Combined IATA descriptive string with key.
QString getCombinedFamilyStringWithKey () const
 Combined family descriptive string with key.
const CAircraftCategory & getCategory () const
 Get category.
bool hasCategory () const
 Has category?
void setCategory (const CAircraftCategory &category)
 Set category.
void setCategoryId (int id)
 Set category id.
bool hasCompleteData () const
 All data set?
bool matchesDesignator (const QString &designator, int fuzzyMatch=-1, int *result=nullptr) const
 Matches designator string?
bool matchesIataCode (const QString &iata, int fuzzyMatch=-1, int *result=nullptr) const
 Matches IATA string?
bool matchesFamily (const QString &family, int fuzzyMatch=-1, int *result=nullptr) const
 Matches family?
bool matchesDesignatorOrIata (const QString &icaoOrIata) const
 Matches ICAO or IATA code.
bool matchesDesignatorIataOrFamily (const QString &icaoIataOrFamily) const
 Matches ICAO, IATA, family?
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 CAircraftIcaoCode &compareValue) const
 Compare for index.
QString convertToQString (bool i18n=false) const
 Cast as QString.
void updateMissingParts (const CAircraftIcaoCode &otherIcaoCode)
 Update missing parts.
CStatusMessageList validate () const
 Validate data.
QString asHtmlSummary () const
 As a brief HTML summary (e.g. used in tooltips).
int calculateScore (const CAircraftIcaoCode &otherCode, CStatusMessageList *log=nullptr) const
 Considers rank, manufacturer and family 0..100.
void guessModelParameters (physical_quantities::CLength &guessedCGOut, physical_quantities::CSpeed &guessedVRotateOut) const
 Guess aircraft model parameters.
bool isNull () const
 Null ICAO?
Public Member Functions inherited from swift::misc::mixin::MetaType< CAircraftIcaoCode >
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< CAircraftIcaoCode >
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< CAircraftIcaoCode >
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< CAircraftIcaoCode >
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< CAircraftIcaoCode >
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< CAircraftIcaoCode >
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 CAircraftIcaoCode &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< CAircraftIcaoCode >
CIcons::CIcons::StandardIconUnknown16 toIcon () const
 As icon, not implemented by all classes.
Public Member Functions inherited from swift::misc::db::IDatastoreObjectWithIntegerKey
int getDbKey () const
 Get DB key.
QString getDbKeyAsString () const
 DB key as string.
QJsonValue getDbKeyAsJsonValue () const
 Key as JSON value, or null.
QString getDbKeyAsStringInParentheses (const QString &prefix={}) const
 Db key in parentheses, e.g. "(3)".
void setDbKey (int key)
 Set the DB key.
void setDbKey (const QString &key)
 DB key passed as string.
bool hasValidDbKey () const
 Has valid DB key.
bool isDbEqual (const IDatastoreObjectWithIntegerKey &other) const
 Same DB key and hence equal.
bool isLoadedFromDb () const
 Loaded from DB.
bool matchesDbKeyState (db::DbKeyStateFilter filter) const
 Matches filter?
const CIcon & toDatabaseIcon () const
 Database icon if this has valid key, otherwise empty.
Public Member Functions inherited from swift::misc::db::IDatastoreObject
const QString & getVersion () const
 Version info.
QVersionNumber getQVersion () const
 Version as QVersion.
bool hasVersion () const
 Having a version?s.
void setVersion (const QString &version)
 Version info.
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 &timestamp)
 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 CAircraftIcaoCode & null ()
 NULL object.
static bool isValidDesignator (const QString &designator)
 Valid designator?
static bool isValidCombinedType (const QString &combinedType)
 Valid combined type.
static const QString & getUnassignedDesignator ()
 The unassigned designator ("ZZZZ").
static const QString & getGliderDesignator ()
 Get the glider designator.
static const CAircraftIcaoCode & unassignedIcao ()
 Unassigned ICAO code "ZZZZ".
static const QStringList & getSpecialDesignators ()
 List of the special designators ("ZZZZ", "UHEL", ...).
static QString normalizeDesignator (const QString &candidate)
 Normalize designator, remove illegal characters.
static QStringList alternativeCombinedCodes (const QString &combinedCode)
 Create relaxed combined codes, e.g "L2J" -> "L3J", ...
static bool isEPTEngineType (const QChar engineType)
 Engine tye is Electric, Piston, TurboProp.
static CStatusMessage logMessage (const CAircraftIcaoCode &icaoCode, const QString &message, const QStringList &extraCategories={}, CStatusMessage::StatusSeverity s=CStatusMessage::SeverityInfo)
 Specialized log message for matching / reverse lookup.
static void addLogDetailsToList (CStatusMessageList *log, const CAircraftIcaoCode &icao, const QString &message, const QStringList &extraCategories={}, CStatusMessage::StatusSeverity s=CStatusMessage::SeverityInfo)
 Specialized log for matching / reverse lookup.
static CAircraftIcaoCode fromDatabaseJson (const QJsonObject &json, const QString &prefix=QString())
 From our database JSON format.
Static Public Member Functions inherited from swift::misc::mixin::MetaType< CAircraftIcaoCode >
static void registerMetadata ()
 Register metadata.
Static Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< CAircraftIcaoCode >
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::db::IDatastoreObjectWithIntegerKey
static int invalidDbKey ()
 Invalid key.
static int stringToDbKey (const QString &candidate)
 Convert string to DB key.
static const CPropertyIndex & keyIndex ()
 The key index.
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.

Static Public Attributes

static constexpr int DesignatorMinLength = 2
 designator length (min)
static constexpr int DesignatorMaxLength = 5
 designator length (max)

Additional Inherited Members

Protected Member Functions inherited from swift::misc::CValueObject< CAircraftIcaoCode >
 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::db::IDatastoreObjectWithIntegerKey
 IDatastoreObjectWithIntegerKey ()
 Constructor.
 IDatastoreObjectWithIntegerKey (int key)
 Constructor.
void setKeyVersionTimestampFromDatabaseJson (const QJsonObject &json, const QString &prefix=QString())
 Set key and timestamp values.
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 IDatastoreObjectWithIntegerKey &compareValue) const
 Compare for index.
Protected Member Functions inherited from swift::misc::db::IDatastoreObject
void setTimestampVersionFromDatabaseJson (const QJsonObject &json, const QString &prefix=QString())
 Set versionn and timestamp values.
Protected Member Functions inherited from swift::misc::ITimestampBased
 ITimestampBased ()=default
 Constructor.
 ITimestampBased (qint64 msSincePoch)
 Constructor.
 ITimestampBased (const QDateTime &timestamp)
 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.
Static Protected Member Functions inherited from swift::misc::db::IDatastoreObjectWithIntegerKey
static bool existsKey (const QJsonObject &json, const QString &prefix=QString())
 Is a key available?
static bool canHandleIndex (swift::misc::CPropertyIndexRef index)
 Can given index be handled?
Protected Attributes inherited from swift::misc::db::IDatastoreObjectWithIntegerKey
int m_dbKey = -1
 key
Protected Attributes inherited from swift::misc::db::IDatastoreObject
QString m_version
 version info
Protected Attributes inherited from swift::misc::ITimestampBased
qint64 m_timestampMSecsSinceEpoch = -1
 timestamp value

Detailed Description

Value object for ICAO classification.

Definition at line 29 of file aircrafticaocode.h.

Member Enumeration Documentation

◆ ColumnIndex

Properties by index.

Enumerator
IndexDesignatorManufacturer 

designator and manufacturer

Definition at line 35 of file aircrafticaocode.h.

Constructor & Destructor Documentation

◆ CAircraftIcaoCode() [1/4]

swift::misc::aviation::CAircraftIcaoCode::CAircraftIcaoCode ( const QString & icao,
const QString & combinedType = "" )

Constructor.

Definition at line 29 of file aircrafticaocode.cpp.

◆ CAircraftIcaoCode() [2/4]

swift::misc::aviation::CAircraftIcaoCode::CAircraftIcaoCode ( const QString & icao,
const QString & combinedType,
const QString & manufacturer,
const QString & model,
CWakeTurbulenceCategory wtc,
bool realworld,
bool legacy,
bool military,
int rank )

Constructor.

Definition at line 33 of file aircrafticaocode.cpp.

◆ CAircraftIcaoCode() [3/4]

swift::misc::aviation::CAircraftIcaoCode::CAircraftIcaoCode ( const QString & icao,
const QString & iata,
const QString & combinedType,
const QString & manufacturer,
const QString & model,
CWakeTurbulenceCategory wtc,
bool realworld,
bool legacy,
bool military,
int rank )

Constructor.

Definition at line 46 of file aircrafticaocode.cpp.

◆ CAircraftIcaoCode() [4/4]

swift::misc::aviation::CAircraftIcaoCode::CAircraftIcaoCode ( const QString & icao,
const QString & iata,
const QString & family,
const QString & combinedType,
const QString & manufacturer,
const QString & model,
const QString & modelIata,
const QString & modelSwift,
CWakeTurbulenceCategory wtc,
bool realworld,
bool legacy,
bool military,
int rank )

Constructor.

Definition at line 60 of file aircrafticaocode.cpp.

Member Function Documentation

◆ addLogDetailsToList()

void swift::misc::aviation::CAircraftIcaoCode::addLogDetailsToList ( CStatusMessageList * log,
const CAircraftIcaoCode & icao,
const QString & message,
const QStringList & extraCategories = {},
CStatusMessage::StatusSeverity s = CStatusMessage::SeverityInfo )
static

Specialized log for matching / reverse lookup.

Remarks
This function is thread safe.

Definition at line 1088 of file aircrafticaocode.cpp.

◆ alternativeCombinedCodes()

QStringList swift::misc::aviation::CAircraftIcaoCode::alternativeCombinedCodes ( const QString & combinedCode)
static

Create relaxed combined codes, e.g "L2J" -> "L3J", ...

Definition at line 1026 of file aircrafticaocode.cpp.

◆ asHtmlSummary()

QString swift::misc::aviation::CAircraftIcaoCode::asHtmlSummary ( ) const

As a brief HTML summary (e.g. used in tooltips).

Definition at line 175 of file aircrafticaocode.cpp.

◆ calculateScore()

int swift::misc::aviation::CAircraftIcaoCode::calculateScore ( const CAircraftIcaoCode & otherCode,
CStatusMessageList * log = nullptr ) const

Considers rank, manufacturer and family 0..100.

Remarks
normally used with a selected set of ICAO codes or combined types

Definition at line 177 of file aircrafticaocode.cpp.

◆ comparePropertyByIndex()

int swift::misc::aviation::CAircraftIcaoCode::comparePropertyByIndex ( CPropertyIndexRef index,
const CAircraftIcaoCode & compareValue ) const

Compare for index.

Definition at line 900 of file aircrafticaocode.cpp.

◆ convertToQString()

QString swift::misc::aviation::CAircraftIcaoCode::convertToQString ( bool i18n = false) const

Cast as QString.

Definition at line 83 of file aircrafticaocode.cpp.

◆ fromDatabaseJson()

CAircraftIcaoCode swift::misc::aviation::CAircraftIcaoCode::fromDatabaseJson ( const QJsonObject & json,
const QString & prefix = QString() )
static

From our database JSON format.

Definition at line 1103 of file aircrafticaocode.cpp.

◆ getAircraftType()

QString swift::misc::aviation::CAircraftIcaoCode::getAircraftType ( ) const

Aircraft type, such a L(andplane), S(eaplane), H(elicopter).

Definition at line 488 of file aircrafticaocode.cpp.

◆ getAircraftTypeChar()

QChar swift::misc::aviation::CAircraftIcaoCode::getAircraftTypeChar ( ) const

Aircraft type, such a L(andplane), S(eaplane), H(elicopter).

Definition at line 502 of file aircrafticaocode.cpp.

◆ getCategory()

const CAircraftCategory & swift::misc::aviation::CAircraftIcaoCode::getCategory ( ) const
inline

Get category.

Definition at line 270 of file aircrafticaocode.h.

◆ getCombinedFamilyStringWithKey()

QString swift::misc::aviation::CAircraftIcaoCode::getCombinedFamilyStringWithKey ( ) const

Combined family descriptive string with key.

Definition at line 712 of file aircrafticaocode.cpp.

◆ getCombinedIataStringWithKey()

QString swift::misc::aviation::CAircraftIcaoCode::getCombinedIataStringWithKey ( ) const

Combined IATA descriptive string with key.

Definition at line 700 of file aircrafticaocode.cpp.

◆ getCombinedIcaoCategoryStringWithKey()

QString swift::misc::aviation::CAircraftIcaoCode::getCombinedIcaoCategoryStringWithKey ( ) const

Combined ICAO descriptive string with category and key.

Definition at line 687 of file aircrafticaocode.cpp.

◆ getCombinedIcaoStringWithKey()

QString swift::misc::aviation::CAircraftIcaoCode::getCombinedIcaoStringWithKey ( ) const

Combined ICAO descriptive string with key.

Definition at line 679 of file aircrafticaocode.cpp.

◆ getCombinedModelDescription()

QString swift::misc::aviation::CAircraftIcaoCode::getCombinedModelDescription ( ) const

Combined description.

Definition at line 516 of file aircrafticaocode.cpp.

◆ getCombinedType()

const QString & swift::misc::aviation::CAircraftIcaoCode::getCombinedType ( ) const
inline

Get type, e.g. "L2J".

Definition at line 127 of file aircrafticaocode.h.

◆ getDesignator()

const QString & swift::misc::aviation::CAircraftIcaoCode::getDesignator ( ) const
inline

Get ICAO designator, e.g. "B737".

Definition at line 79 of file aircrafticaocode.h.

◆ getDesignatorDbKey()

QString swift::misc::aviation::CAircraftIcaoCode::getDesignatorDbKey ( ) const

Designator and DB key.

Definition at line 77 of file aircrafticaocode.cpp.

◆ getDesignatorManufacturer()

QString swift::misc::aviation::CAircraftIcaoCode::getDesignatorManufacturer ( ) const

Designator + Manufacturer.

Definition at line 612 of file aircrafticaocode.cpp.

◆ getEngineCountString()

QString swift::misc::aviation::CAircraftIcaoCode::getEngineCountString ( ) const

Engine count as string, if not available "".

Definition at line 479 of file aircrafticaocode.cpp.

◆ getEnginesCount()

int swift::misc::aviation::CAircraftIcaoCode::getEnginesCount ( ) const

Engine count if any, -1 if no value is set.

Definition at line 459 of file aircrafticaocode.cpp.

◆ getEngineType()

QString swift::misc::aviation::CAircraftIcaoCode::getEngineType ( ) const

Get engine type, e.g. "J".

Definition at line 443 of file aircrafticaocode.cpp.

◆ getEngineTypeChar()

QChar swift::misc::aviation::CAircraftIcaoCode::getEngineTypeChar ( ) const

Get engine type, e.g. "J".

Definition at line 449 of file aircrafticaocode.cpp.

◆ getFamily()

const QString & swift::misc::aviation::CAircraftIcaoCode::getFamily ( ) const
inline

Family (e.g. A350).

Definition at line 115 of file aircrafticaocode.h.

◆ getGliderDesignator()

const QString & swift::misc::aviation::CAircraftIcaoCode::getGliderDesignator ( )
static

Get the glider designator.

Definition at line 1001 of file aircrafticaocode.cpp.

◆ getIataCode()

const QString & swift::misc::aviation::CAircraftIcaoCode::getIataCode ( ) const
inline

IATA code.

Definition at line 103 of file aircrafticaocode.h.

◆ getManufacturer()

const QString & swift::misc::aviation::CAircraftIcaoCode::getManufacturer ( ) const
inline

Get manufacturer, e.g. "Airbus".

Definition at line 200 of file aircrafticaocode.h.

◆ getModelDescription()

const QString & swift::misc::aviation::CAircraftIcaoCode::getModelDescription ( ) const
inline

Get IACO model description, e.g. "A-330-200".

Definition at line 154 of file aircrafticaocode.h.

◆ getModelIataDescription()

const QString & swift::misc::aviation::CAircraftIcaoCode::getModelIataDescription ( ) const
inline

Get IATA model description.

Definition at line 157 of file aircrafticaocode.h.

◆ getModelSwiftDescription()

const QString & swift::misc::aviation::CAircraftIcaoCode::getModelSwiftDescription ( ) const
inline

Get swift model description.

Definition at line 160 of file aircrafticaocode.h.

◆ getRank()

int swift::misc::aviation::CAircraftIcaoCode::getRank ( ) const
inline

Ranking.

Definition at line 249 of file aircrafticaocode.h.

◆ getRankString()

QString swift::misc::aviation::CAircraftIcaoCode::getRankString ( ) const

Ranking.

Definition at line 675 of file aircrafticaocode.cpp.

◆ getSpecialDesignators()

const QStringList & swift::misc::aviation::CAircraftIcaoCode::getSpecialDesignators ( )
static

List of the special designators ("ZZZZ", "UHEL", ...).

Definition at line 1013 of file aircrafticaocode.cpp.

◆ getUnassignedDesignator()

const QString & swift::misc::aviation::CAircraftIcaoCode::getUnassignedDesignator ( )
static

The unassigned designator ("ZZZZ").

Definition at line 995 of file aircrafticaocode.cpp.

◆ getWtc()

CWakeTurbulenceCategory swift::misc::aviation::CAircraftIcaoCode::getWtc ( ) const
inline

Get WTC.

Definition at line 212 of file aircrafticaocode.h.

◆ guessModelParameters()

void swift::misc::aviation::CAircraftIcaoCode::guessModelParameters ( physical_quantities::CLength & guessedCGOut,
physical_quantities::CSpeed & guessedVRotateOut ) const

Guess aircraft model parameters.

Remarks
values will not be overridden, pass null values to obtain guessed values

Definition at line 317 of file aircrafticaocode.cpp.

◆ hasCategory()

bool swift::misc::aviation::CAircraftIcaoCode::hasCategory ( ) const

Has category?

Definition at line 724 of file aircrafticaocode.cpp.

◆ hasCompleteData()

bool swift::misc::aviation::CAircraftIcaoCode::hasCompleteData ( ) const

All data set?

Definition at line 726 of file aircrafticaocode.cpp.

◆ hasDesignator()

bool swift::misc::aviation::CAircraftIcaoCode::hasDesignator ( ) const

Aircraft designator?

Definition at line 413 of file aircrafticaocode.cpp.

◆ hasFamily()

bool swift::misc::aviation::CAircraftIcaoCode::hasFamily ( ) const
inline

Has family?

Definition at line 121 of file aircrafticaocode.h.

◆ hasIataCode()

bool swift::misc::aviation::CAircraftIcaoCode::hasIataCode ( ) const
inline

Has IATA code?

Definition at line 109 of file aircrafticaocode.h.

◆ hasKnownDesignator()

bool swift::misc::aviation::CAircraftIcaoCode::hasKnownDesignator ( ) const

Has designator and designator is not "ZZZZ".

Definition at line 417 of file aircrafticaocode.cpp.

◆ hasManufacturer()

bool swift::misc::aviation::CAircraftIcaoCode::hasManufacturer ( ) const

Manufacturer.

Definition at line 618 of file aircrafticaocode.cpp.

◆ hasModelDescription()

bool swift::misc::aviation::CAircraftIcaoCode::hasModelDescription ( ) const
inline

Has model description?

Definition at line 191 of file aircrafticaocode.h.

◆ hasModelIataDescription()

bool swift::misc::aviation::CAircraftIcaoCode::hasModelIataDescription ( ) const
inline

Has IATA model description?

Definition at line 194 of file aircrafticaocode.h.

◆ hasModelSwiftDescription()

bool swift::misc::aviation::CAircraftIcaoCode::hasModelSwiftDescription ( ) const
inline

Has swift model description?

Definition at line 197 of file aircrafticaocode.h.

◆ hasSpecialDesignator()

bool swift::misc::aviation::CAircraftIcaoCode::hasSpecialDesignator ( ) const

Special designator.

Definition at line 422 of file aircrafticaocode.cpp.

◆ hasValidCombinedType()

bool swift::misc::aviation::CAircraftIcaoCode::hasValidCombinedType ( ) const

Combined type available?

Definition at line 441 of file aircrafticaocode.cpp.

◆ hasValidDesignator()

bool swift::misc::aviation::CAircraftIcaoCode::hasValidDesignator ( ) const

Valid aircraft designator?

Definition at line 415 of file aircrafticaocode.cpp.

◆ hasValidWtc()

bool swift::misc::aviation::CAircraftIcaoCode::hasValidWtc ( ) const
inline

Valid WTC code?

Definition at line 218 of file aircrafticaocode.h.

◆ isDbDuplicate()

bool swift::misc::aviation::CAircraftIcaoCode::isDbDuplicate ( ) const

Is DB duplicate? This means a redundant ICAO DB entry.

See also
https://aviation.stackexchange.com/q/37848/4024

Definition at line 656 of file aircrafticaocode.cpp.

◆ isEPTEngineType()

bool swift::misc::aviation::CAircraftIcaoCode::isEPTEngineType ( const QChar engineType)
static

Engine tye is Electric, Piston, TurboProp.

Definition at line 1072 of file aircrafticaocode.cpp.

◆ isFamilySameAsDesignator()

bool swift::misc::aviation::CAircraftIcaoCode::isFamilySameAsDesignator ( ) const

Family same as designator?

Definition at line 436 of file aircrafticaocode.cpp.

◆ isIataSameAsDesignator()

bool swift::misc::aviation::CAircraftIcaoCode::isIataSameAsDesignator ( ) const

IATA code same as designator?

Definition at line 431 of file aircrafticaocode.cpp.

◆ isLegacyAircraft()

bool swift::misc::aviation::CAircraftIcaoCode::isLegacyAircraft ( ) const
inline

Legacy aircraft (no current ICAO code).

Definition at line 230 of file aircrafticaocode.h.

◆ isMilitary()

bool swift::misc::aviation::CAircraftIcaoCode::isMilitary ( ) const
inline

Military?

Definition at line 224 of file aircrafticaocode.h.

◆ isNull()

bool swift::misc::aviation::CAircraftIcaoCode::isNull ( ) const

Null ICAO?

Definition at line 402 of file aircrafticaocode.cpp.

◆ isRealWorld()

bool swift::misc::aviation::CAircraftIcaoCode::isRealWorld ( ) const
inline

Real world aircraft?

Definition at line 227 of file aircrafticaocode.h.

◆ isValidCombinedType()

bool swift::misc::aviation::CAircraftIcaoCode::isValidCombinedType ( const QString & combinedType)
static

Valid combined type.

Definition at line 968 of file aircrafticaocode.cpp.

◆ isValidDesignator()

bool swift::misc::aviation::CAircraftIcaoCode::isValidDesignator ( const QString & designator)
static

Valid designator?

Definition at line 955 of file aircrafticaocode.cpp.

◆ isVtol()

bool swift::misc::aviation::CAircraftIcaoCode::isVtol ( ) const

Is VTOL aircraft (helicopter, tilt wing).

Definition at line 630 of file aircrafticaocode.cpp.

◆ logMessage()

CStatusMessage swift::misc::aviation::CAircraftIcaoCode::logMessage ( const CAircraftIcaoCode & icaoCode,
const QString & message,
const QStringList & extraCategories = {},
CStatusMessage::StatusSeverity s = CStatusMessage::SeverityInfo )
static

Specialized log message for matching / reverse lookup.

Remarks
This function is thread safe.

Definition at line 1078 of file aircrafticaocode.cpp.

◆ matchesAnyDescription()

bool swift::misc::aviation::CAircraftIcaoCode::matchesAnyDescription ( const QString & candidate) const

Matches any of the (unempty) descriptions.

Definition at line 537 of file aircrafticaocode.cpp.

◆ matchesCombinedType()

bool swift::misc::aviation::CAircraftIcaoCode::matchesCombinedType ( const QString & combinedType) const

Matches given combined code.

Remarks
* can be used as wildcard, e.g. L*J, L**

Definition at line 563 of file aircrafticaocode.cpp.

◆ matchesCombinedTypeAndManufacturer()

bool swift::misc::aviation::CAircraftIcaoCode::matchesCombinedTypeAndManufacturer ( const QString & combinedType,
const QString & manufacturer ) const

Matches combined type and.

Definition at line 606 of file aircrafticaocode.cpp.

◆ matchesDesignator()

bool swift::misc::aviation::CAircraftIcaoCode::matchesDesignator ( const QString & designator,
int fuzzyMatch = -1,
int * result = nullptr ) const

Matches designator string?

Definition at line 731 of file aircrafticaocode.cpp.

◆ matchesDesignatorIataOrFamily()

bool swift::misc::aviation::CAircraftIcaoCode::matchesDesignatorIataOrFamily ( const QString & icaoIataOrFamily) const

Matches ICAO, IATA, family?

Definition at line 824 of file aircrafticaocode.cpp.

◆ matchesDesignatorOrIata()

bool swift::misc::aviation::CAircraftIcaoCode::matchesDesignatorOrIata ( const QString & icaoOrIata) const

Matches ICAO or IATA code.

Definition at line 815 of file aircrafticaocode.cpp.

◆ matchesFamily()

bool swift::misc::aviation::CAircraftIcaoCode::matchesFamily ( const QString & family,
int fuzzyMatch = -1,
int * result = nullptr ) const

Matches family?

Definition at line 787 of file aircrafticaocode.cpp.

◆ matchesIataCode()

bool swift::misc::aviation::CAircraftIcaoCode::matchesIataCode ( const QString & iata,
int fuzzyMatch = -1,
int * result = nullptr ) const

Matches IATA string?

Remarks
IATA codes are only 3 characters, so using fuzzy search might yield bad results

Definition at line 759 of file aircrafticaocode.cpp.

◆ matchesManufacturer()

bool swift::misc::aviation::CAircraftIcaoCode::matchesManufacturer ( const QString & manufacturer) const

Matching the manufacturer?

Definition at line 620 of file aircrafticaocode.cpp.

◆ normalizeDesignator()

QString swift::misc::aviation::CAircraftIcaoCode::normalizeDesignator ( const QString & candidate)
static

Normalize designator, remove illegal characters.

Definition at line 1019 of file aircrafticaocode.cpp.

◆ null()

const CAircraftIcaoCode & swift::misc::aviation::CAircraftIcaoCode::null ( )
static

NULL object.

Definition at line 407 of file aircrafticaocode.cpp.

◆ propertyByIndex()

QVariant swift::misc::aviation::CAircraftIcaoCode::propertyByIndex ( swift::misc::CPropertyIndexRef index) const

Property by index.

Definition at line 834 of file aircrafticaocode.cpp.

◆ setCategory()

void swift::misc::aviation::CAircraftIcaoCode::setCategory ( const CAircraftCategory & category)
inline

Set category.

Definition at line 276 of file aircrafticaocode.h.

◆ setCategoryId()

void swift::misc::aviation::CAircraftIcaoCode::setCategoryId ( int id)
inline

Set category id.

Definition at line 279 of file aircrafticaocode.h.

◆ setCodeFlags()

void swift::misc::aviation::CAircraftIcaoCode::setCodeFlags ( bool military,
bool legacy,
bool realWorld )

Flags.

Definition at line 662 of file aircrafticaocode.cpp.

◆ setCombinedType()

void swift::misc::aviation::CAircraftIcaoCode::setCombinedType ( const QString & type)
inline

Set type.

Definition at line 151 of file aircrafticaocode.h.

◆ setDesignator()

void swift::misc::aviation::CAircraftIcaoCode::setDesignator ( const QString & icaoDesignator)
inline

Set ICAO designator, e.g. "B737".

Definition at line 88 of file aircrafticaocode.h.

◆ setFamily()

void swift::misc::aviation::CAircraftIcaoCode::setFamily ( const QString & family)
inline

Set family.

Definition at line 118 of file aircrafticaocode.h.

◆ setIataCode()

void swift::misc::aviation::CAircraftIcaoCode::setIataCode ( const QString & iata)
inline

Set IATA code.

Definition at line 106 of file aircrafticaocode.h.

◆ setLegacy()

void swift::misc::aviation::CAircraftIcaoCode::setLegacy ( bool legacy)

Legacy.

Definition at line 673 of file aircrafticaocode.cpp.

◆ setManufacturer()

void swift::misc::aviation::CAircraftIcaoCode::setManufacturer ( const QString & manufacturer)
inline

Set the manufacturer.

Definition at line 203 of file aircrafticaocode.h.

◆ setMilitary()

void swift::misc::aviation::CAircraftIcaoCode::setMilitary ( bool military)

Military.

Definition at line 669 of file aircrafticaocode.cpp.

◆ setModelDescription()

void swift::misc::aviation::CAircraftIcaoCode::setModelDescription ( const QString & modelDescription)
inline

Set the model description (ICAO description).

Definition at line 176 of file aircrafticaocode.h.

◆ setModelIataDescription()

void swift::misc::aviation::CAircraftIcaoCode::setModelIataDescription ( const QString & modelDescription)
inline

Set the alternative IATA model description.

Definition at line 179 of file aircrafticaocode.h.

◆ setModelSwiftDescription()

void swift::misc::aviation::CAircraftIcaoCode::setModelSwiftDescription ( const QString & modelDescription)
inline

Set the alternative swift model description.

Definition at line 185 of file aircrafticaocode.h.

◆ setPropertyByIndex()

void swift::misc::aviation::CAircraftIcaoCode::setPropertyByIndex ( swift::misc::CPropertyIndexRef index,
const QVariant & variant )

Set property by index.

Definition at line 868 of file aircrafticaocode.cpp.

◆ setRank()

void swift::misc::aviation::CAircraftIcaoCode::setRank ( int rank)

Ranking.

Definition at line 677 of file aircrafticaocode.cpp.

◆ setRealWorld()

void swift::misc::aviation::CAircraftIcaoCode::setRealWorld ( bool realWorld)

Real world.

Definition at line 671 of file aircrafticaocode.cpp.

◆ setWtc()

void swift::misc::aviation::CAircraftIcaoCode::setWtc ( CWakeTurbulenceCategory wtc)
inline

Set WTC.

Definition at line 215 of file aircrafticaocode.h.

◆ unassignedIcao()

const CAircraftIcaoCode & swift::misc::aviation::CAircraftIcaoCode::unassignedIcao ( )
static

Unassigned ICAO code "ZZZZ".

Definition at line 1007 of file aircrafticaocode.cpp.

◆ updateMissingParts()

void swift::misc::aviation::CAircraftIcaoCode::updateMissingParts ( const CAircraftIcaoCode & otherIcaoCode)

Update missing parts.

Definition at line 96 of file aircrafticaocode.cpp.

◆ validate()

CStatusMessageList swift::misc::aviation::CAircraftIcaoCode::validate ( ) const

Validate data.

Definition at line 138 of file aircrafticaocode.cpp.

Member Data Documentation

◆ DesignatorMaxLength

int swift::misc::aviation::CAircraftIcaoCode::DesignatorMaxLength = 5
staticconstexpr

designator length (max)

Definition at line 379 of file aircrafticaocode.h.

◆ DesignatorMinLength

int swift::misc::aviation::CAircraftIcaoCode::DesignatorMinLength = 2
staticconstexpr

designator length (min)

Definition at line 378 of file aircrafticaocode.h.


The documentation for this class was generated from the following files: