refs #533, fix callsign validation and split into functions for ATC/aircraft

This commit is contained in:
Klaus Basan
2015-12-08 06:50:07 +01:00
parent 6ac1808d25
commit f9c160d625
7 changed files with 60 additions and 12 deletions

View File

@@ -78,7 +78,7 @@ namespace BlackMisc
//! Supervisor?
bool isSupervisorCallsign() const;
//! Get callsign.
//! Get callsign (normalized)
const QString &asString() const { return this->m_callsign; }
//! Get callsign.
@@ -121,7 +121,19 @@ namespace BlackMisc
int comparePropertyByIndex(const CCallsign &compareValue, const CPropertyIndex &index) const;
//! Valid callsign?
static bool isValidCallsign(const QString &callsign);
bool isValid() const;
//! Valid callsign?
static bool isValidAircraftCallsign(const QString &callsign);
//! Valid callsign?
static bool isValidAircraftCallsign(const CCallsign &callsign);
//! Valid callsign?
static bool isValidAtcCallsign(const QString &callsign);
//! Valid callsign?
static bool isValidAtcCallsign(const CCallsign &callsign);
//! List of real ATC suffixes (e.g. TWR);
static const QStringList &atcCallsignSuffixes();