mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Convenience functions for aircraft list
This commit is contained in:
@@ -10,7 +10,9 @@
|
||||
#include "avaircraftlist.h"
|
||||
#include "nwuser.h"
|
||||
#include "predicates.h"
|
||||
#include "propertyindexallclasses.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
using namespace BlackMisc::Network;
|
||||
|
||||
@@ -30,6 +32,23 @@ namespace BlackMisc
|
||||
CSequence<CAircraft>(other)
|
||||
{ }
|
||||
|
||||
/*
|
||||
* Contains callsign
|
||||
*/
|
||||
bool CAircraftList::containsCallsign(const CCallsign &callsign) const
|
||||
{
|
||||
if (callsign.isEmpty()) { return false; }
|
||||
return this->contains(&CAircraft::getCallsign, callsign);
|
||||
}
|
||||
|
||||
/*
|
||||
* Change for callsign
|
||||
*/
|
||||
int CAircraftList::applyIfCallsign(const CCallsign &callsign, const CPropertyIndexVariantMap &variantMap)
|
||||
{
|
||||
return this->applyIf(&CAircraft::getCallsign, callsign, variantMap, false);
|
||||
}
|
||||
|
||||
/*
|
||||
* Register metadata
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user