swift
Public Types | Public Member Functions | Static Public Member Functions | List of all members
swift::misc::simulation::CAircraftMatcherSetup Class Reference

Matcher settings. More...

Inheritance diagram for swift::misc::simulation::CAircraftMatcherSetup:
[legend]

Public Types

enum  MatchingAlgorithm { MatchingScoreBased , MatchingStepwiseReducePlusScoreBased , MatchingStepwiseReduce }
 Matching algorithm.
 
enum  MatchingModeFlag {
  ByModelString = 1 << 0 , ByIcaoData = 1 << 1 , ByFamily = 1 << 2 , ByLivery = 1 << 3 ,
  ByCombinedType = 1 << 4 , ByManufacturer = 1 << 5 , ByMilitary = 1 << 6 , ByCivilian = 1 << 7 ,
  ByMilOrCivilian = ByCivilian | ByMilitary , ByVtol = 1 << 8 , ByIcaoOrderAircraftFirst = (1 << 9) | ByIcaoData , ByIcaoOrderAirlineFirst = (1 << 10) | ByIcaoData ,
  ByAirlineGroupSameAsAirline = (1 << 11) | ByIcaoData , ByAirlineGroupIfNoAirline = (1 << 12) | ByIcaoData , ExcludeNoDbData = 1 << 13 , ExcludeNoExcluded = 1 << 14 ,
  ExcludeDefault = ExcludeNoExcluded | ExcludeNoDbData , ModelSetRemoveFailedModel = 1 << 15 , ModelVerificationAtStartup = 1 << 16 , ModelFailoverIfNoModelCanBeAdded = 1 << 17 ,
  ModelVerificationOnlyWarnError = 1 << 18 , ByCategoryGlider = 1 << 20 , ByCategoryMilitary = 1 << 21 , ByCategorySmallAircraft = 1 << 22 ,
  ReverseLookupModelString = 1 << 25 , ReverseLookupSwiftLiveryIds = 1 << 26 , ReverseLookupDefault = ReverseLookupModelString | ReverseLookupSwiftLiveryIds , ScoreIgnoreZeros = 1 << 28 ,
  ScorePreferColorLiveries = 1 << 29 , ModeNone = 0 , ModeByFLags = ByMilOrCivilian | ByVtol , ModeDefaultSet = ModelSetRemoveFailedModel | ModelVerificationAtStartup | ModelFailoverIfNoModelCanBeAdded ,
  ModeDefaultScore = ScoreIgnoreZeros | ScorePreferColorLiveries | ExcludeDefault | ReverseLookupDefault , ModeDefaultReduce , ModeDefaultReducePlusScore
}
 Enabled matching mode flags. More...
 
enum  ForceModeFlag { ForceNothing = 0 , ForceType = 1 << 0 , ForceEnginecount = 1 << 1 , ForceEngine = 1 << 2 }
 Force values.
 
enum  PickSimilarStrategy { PickFirst , PickRandom , PickByOrder }
 How to pick among similar candiates.
 
enum  ColumnIndex {
  IndexMatchingAlgorithm = CPropertyIndexRef::GlobalIndexCAircraftMatcherSetup , IndexMatchingMode , IndexForceMode , IndexPickStrategy ,
  IndexMsNetworkEntryFile , IndexMsMatchingStageFile , IndexMsNetworkEnabled , IndexMsMatchingStageEnabled
}
 Properties by index.
 
- Public Types inherited from swift::misc::CValueObject< CAircraftMatcherSetup >
using base_type = CEmpty
 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< Derived >
enum  ColumnIndex { IndexPixmap = 10 , IndexIcon , IndexString }
 Base class enums.
 

Public Member Functions

 CAircraftMatcherSetup ()
 Constructor.
 
 CAircraftMatcherSetup (MatchingAlgorithm algorithm)
 Constructor.
 
 CAircraftMatcherSetup (MatchingAlgorithm algorithm, MatchingMode mode, PickSimilarStrategy pickStrategy)
 Constructor.
 
MatchingAlgorithm getMatchingAlgorithm () const
 Algorithm.
 
const QString & getMatchingAlgorithmAsString () const
 Algorithm as string.
 
bool setMatchingAlgorithm (MatchingAlgorithm algorithm, bool reset=true)
 Algorithm.
 
MatchingMode getMatchingMode () const
 Matching mode.
 
ForceMode getForceMode () const
 Force mode.
 
void setForceMode (ForceMode fm)
 Force mode.
 
QString getForceModeAsString () const
 Force mode as string.
 
bool isDbDataOnly () const
 DB data?
 
bool doVerificationAtStartup () const
 Verification at startup? More...
 
bool onlyShowVerificationWarningsAndErrors () const
 Verification only shown for warning/errors? More...
 
bool doModelAddFailover () const
 Failover if model cannot be loaded. More...
 
void setVerificationAtStartup (bool verify)
 Set startup verification.
 
void setOnlyShowVerificationWarningsAndErrors (bool only)
 Set the "show only errors" mode.
 
QString getMatchingModeAsString () const
 Matching mode as string.
 
void setMatchingMode (MatchingMode mode)
 Dynamic offset values?
 
bool removeFromSetIfFailed () const
 Remove if failed?
 
PickSimilarStrategy getPickStrategy () const
 Strategy among equally suitable models.
 
const QString & getPickStrategyAsString () const
 Strategy as string.
 
void setPickStrategy (PickSimilarStrategy strategy)
 Set the strategy.
 
void setAirlineGroupBehaviour (bool ifNoAirline, bool sameAsAirline)
 Airline group behaviour.
 
QString convertToQString (bool i18n=false) const
 Cast as QString. More...
 
QVariant propertyByIndex (CPropertyIndexRef index) const
 Property by index. More...
 
void setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant)
 Set property by index. More...
 
void reset ()
 Reset.
 
void reset (MatchingAlgorithm algorithm)
 Reset.
 
bool useCategoryMatching () const
 Use category matching.
 
bool isReverseLookupModelString () const
 Reverse lookup.
 
bool isReverseLookupSwiftLiveryIds () const
 Reverse lookup.
 
void resetReverseLookup ()
 Reverse lookup.
 
const QString & getMsReverseLookupFile () const
 Get matching files.
 
const QString & getMsMatchingStageFile () const
 Get matching files.
 
void setMsReverseLookupFile (const QString &file)
 Set matching files.
 
void setMsMatchingStageFile (const QString &file)
 Set matching files.
 
bool isMsReverseLookupEnabled () const
 Is matching script enabled.
 
bool isMsMatchingStageEnabled () const
 Is matching script enabled.
 
bool doRunMsReverseLookupScript () const
 Run the scripts.
 
bool doRunMsMatchingStageScript () const
 Run the scripts.
 
void setMsReverseLookupEnabled (bool enabled)
 Is matching script enabled.
 
void setMsMatchingStageEnabled (bool enabled)
 Is matching script enabled.
 
- Public Member Functions inherited from swift::misc::mixin::MetaType< Derived >
int getMetaTypeId () const
 Returns the Qt meta type ID of this object. More...
 
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< Derived, Tags >
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< Derived >
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< Derived >
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.
 
void convertFromJson (const QString &jsonString, bool acceptCacheFormat=false)
 Assign from JSON object string.
 
- Public Member Functions inherited from swift::misc::mixin::String< Derived >
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< Derived >
CPropertyIndexList apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false)
 Update by variant map. More...
 
void setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant)
 Set property by index.
 
QVariant propertyByIndex (CPropertyIndexRef index) const
 Property by index.
 
int comparePropertyByIndex (CPropertyIndexRef index, const Derived &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< Derived, IconIndex >
CIcons::IconIndex toIcon () const
 As icon, not implemented by all classes.
 

Static Public Member Functions

static const QString & algorithmToString (MatchingAlgorithm algorithm)
 Algorithm to string.
 
static const QString & modeFlagToString (MatchingModeFlag modeFlag)
 Enumeration as string.
 
static QString modeToString (MatchingMode mode)
 Enumeration as string.
 
static const QString & forceFlagToString (ForceModeFlag forceFlag)
 Force flag to string.
 
static QString forceToString (ForceMode force)
 Force to string.
 
static const QString & strategyToString (PickSimilarStrategy strategy)
 Strategy to string.
 
static MatchingMode matchingMode (bool revModelString, bool revLiveryIds, bool byModelString, bool byIcaoDataAircraft1st, bool byIcaoDataAirline1st, bool byFamily, bool byLivery, bool byCombinedType, bool byForceMilitary, bool byForceCivilian, bool byVtol, bool byGliderCategory, bool byMilitaryCategory, bool bySmallAircraftCategory, bool scoreIgnoreZeros, bool scorePreferColorLiveries, bool excludeNoDbData, bool excludeNoExcluded, bool modelVerification, bool modelVerificationWarnError, bool modelSetRemoveFailedModel, bool modelFailover)
 Mode by flags.
 
- Static Public Member Functions inherited from swift::misc::mixin::MetaType< Derived >
static void registerMetadata ()
 Register metadata.
 
- Static Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< Derived >
template<class DerivedObj = Derived>
static DerivedObj fromJson (const QJsonObject &json)
 Get object from QJsonObject.
 
template<class DerivedObj = Derived>
static DerivedObj fromJson (const QString &jsonString, bool acceptCacheJson=false)
 Get object from JSON string.
 
template<class DerivedObj = Derived>
static DerivedObj fromJsonNoThrow (const QString &jsonString, bool acceptCacheJson, bool &success, QString &errMsg)
 Get object from JSON string.
 

Additional Inherited Members

- Protected Member Functions inherited from swift::misc::CValueObject< CAircraftMatcherSetup >
 CValueObject ()=default
 Default constructor.
 
 CValueObject (const CValueObject &)=default
 Copy constructor.
 
CValueObjectoperator= (const CValueObject &)=default
 Copy assignment operator.
 
 ~CValueObject ()=default
 Destructor.
 
 CEmpty ()=default
 Inheriting constructors.
 
 CEmpty (const CEmpty &)=default
 Inheriting constructors.
 
- Protected Member Functions inherited from swift::misc::CEmpty
 CEmpty ()=default
 Protected default constructor.
 
 CEmpty (const CEmpty &)=default
 Protected copy constructor.
 
CEmptyoperator= (const CEmpty &)=default
 Protected copy assignment operator.
 
 ~CEmpty ()=default
 Non-virtual protected destructor.
 

Detailed Description

Matcher settings.

Definition at line 17 of file aircraftmatchersetup.h.

Member Enumeration Documentation

◆ MatchingModeFlag

Enabled matching mode flags.

Enumerator
ByModelString 

allow exact model string match

ByIcaoData 

ICAO airline and aircraft codes.

ByMilitary 

military (in) will only search in military

ByCivilian 

civilian (in) will only search in civilian

ScoreIgnoreZeros 

zero scores are ignored

ScorePreferColorLiveries 

prefer color liveries

Definition at line 29 of file aircraftmatchersetup.h.

Member Function Documentation

◆ convertToQString()

QString swift::misc::simulation::CAircraftMatcherSetup::convertToQString ( bool  i18n = false) const

Cast as QString.

Definition at line 88 of file aircraftmatchersetup.cpp.

◆ doModelAddFailover()

bool swift::misc::simulation::CAircraftMatcherSetup::doModelAddFailover ( ) const
inline

Failover if model cannot be loaded.

See also
ModelFailoverIfNoModelCanBeAdded

Definition at line 203 of file aircraftmatchersetup.h.

◆ doVerificationAtStartup()

bool swift::misc::simulation::CAircraftMatcherSetup::doVerificationAtStartup ( ) const
inline

Verification at startup?

See also
ModelVerificationOnStartup

Definition at line 192 of file aircraftmatchersetup.h.

◆ onlyShowVerificationWarningsAndErrors()

bool swift::misc::simulation::CAircraftMatcherSetup::onlyShowVerificationWarningsAndErrors ( ) const
inline

Verification only shown for warning/errors?

See also
ModelVerificationOnlyWarnError

Definition at line 196 of file aircraftmatchersetup.h.

◆ propertyByIndex()

QVariant swift::misc::simulation::CAircraftMatcherSetup::propertyByIndex ( CPropertyIndexRef  index) const

Property by index.

Definition at line 96 of file aircraftmatchersetup.cpp.

◆ setPropertyByIndex()

void swift::misc::simulation::CAircraftMatcherSetup::setPropertyByIndex ( CPropertyIndexRef  index,
const QVariant &  variant 
)

Set property by index.

Definition at line 115 of file aircraftmatchersetup.cpp.


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