mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
Ref T26, Ref T27, utility functions in "value object" classes
This commit is contained in:
@@ -219,6 +219,19 @@ namespace BlackMisc
|
||||
});
|
||||
}
|
||||
|
||||
CAircraftModelList CAircraftModelList::findByCombinedTypeWithColorLivery(const QString &combinedType) const
|
||||
{
|
||||
return this->findByCombinedType(combinedType).findColorLiveries();
|
||||
}
|
||||
|
||||
CAircraftModelList CAircraftModelList::findColorLiveries() const
|
||||
{
|
||||
return this->findBy([ = ](const CAircraftModel & model)
|
||||
{
|
||||
return model.getLivery().isColorLivery();
|
||||
});
|
||||
}
|
||||
|
||||
CAircraftModelList CAircraftModelList::findByMilitaryFlag(bool military) const
|
||||
{
|
||||
return this->findBy([ = ](const CAircraftModel & model)
|
||||
|
||||
@@ -138,6 +138,12 @@ namespace BlackMisc
|
||||
//! Find by combined code, wildcards possible e.g. L*P, *2J
|
||||
CAircraftModelList findByCombinedType(const QString &combinedType) const;
|
||||
|
||||
//! Find aircraft with color livery by combined code, wildcards possible e.g. L*P, *2J
|
||||
CAircraftModelList findByCombinedTypeWithColorLivery(const QString &combinedType) const;
|
||||
|
||||
//! Find models with color liveries
|
||||
CAircraftModelList findColorLiveries() const;
|
||||
|
||||
//! Find by military flag
|
||||
CAircraftModelList findByMilitaryFlag(bool military) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user