refs #267, extended ICAO class

This commit is contained in:
Klaus Basan
2014-06-15 19:24:58 +02:00
parent 426dd4a09e
commit b8390f470c
2 changed files with 24 additions and 1 deletions

View File

@@ -89,6 +89,17 @@ namespace BlackMisc
return TupleConverter<CAircraftIcao>::toTuple(*this) == TupleConverter<CAircraftIcao>::toTuple(other);
}
bool CAircraftIcao::matchesWildcardIcao(const CAircraftIcao &otherIcao) const
{
if ((*this) == otherIcao) return true;
if (otherIcao.hasAircraftDesignator() && otherIcao.getAircraftDesignator() != this->getAircraftDesignator()) return false;
if (otherIcao.hasAirlineDesignator() && otherIcao.getAirlineDesignator() != this->getAirlineDesignator()) return false;
if (otherIcao.hasAircraftCombinedType() && otherIcao.getAircraftCombinedType() != this->getAircraftCombinedType()) return false;
if (otherIcao.hasLivery() && otherIcao.getLivery() != this->getLivery()) return false;
if (otherIcao.hasAircraftColor() && otherIcao.getAircraftColor() != this->getAircraftColor()) return false;
return true;
}
/*
* Unequal?
*/