refs #369, revised atc station and client list

* function to get only stations with valid callsign
* use ICallsignObjectList in client list
* removeByCallsign
This commit is contained in:
Klaus Basan
2015-02-02 17:43:09 +01:00
parent 880bb53e3d
commit cec59c5d72
6 changed files with 30 additions and 42 deletions

View File

@@ -17,21 +17,12 @@ namespace BlackMisc
{
namespace Aviation
{
/*
* Empty constructor
*/
CAtcStationList::CAtcStationList() { }
/*
* Construct from base class object
*/
CAtcStationList::CAtcStationList(const CSequence<CAtcStation> &other) :
CSequence<CAtcStation>(other)
{ }
/*
* Register metadata
*/
void CAtcStationList::registerMetadata()
{
qRegisterMetaType<BlackMisc::CSequence<CAtcStation>>();
@@ -43,9 +34,6 @@ namespace BlackMisc
registerMetaValueType<CAtcStationList>();
}
/*
* Find if on frequency of COM unit
*/
CAtcStationList CAtcStationList::findIfComUnitTunedIn25KHz(const CComSystem &comUnit) const
{
return this->findBy([&](const CAtcStation & atcStation)
@@ -54,17 +42,16 @@ namespace BlackMisc
});
}
/*
* All controllers
*/
CAtcStationList CAtcStationList::stationsWithValidVoiceRoom() const
{
return this->findBy(&CAtcStation::hasValidVoiceRoom, true);
}
CUserList CAtcStationList::getControllers() const
{
return this->findBy(Predicates::MemberValid(&CAtcStation::getController)).transform(Predicates::MemberTransform(&CAtcStation::getController));
}
/*
* Merge with booking, both (online/booking will be updated)
*/
int CAtcStationList::mergeWithBooking(CAtcStation &bookedAtcStation)
{
int c = 0;
@@ -150,9 +137,6 @@ namespace BlackMisc
return c;
}
/*
* Merge with VATSIM data file
*/
bool CAtcStationList::updateFromVatsimDataFileStation(CAtcStation &stationToBeUpdated) const
{
if (this->isEmpty()) return false;