15using namespace swift::misc::physical_quantities;
16using namespace swift::misc::network;
20namespace swift::misc::aviation
46 bool overrideWithNewer)
60 if (m.
getType() == CInformationMessage::Unspecified)
67 if (!overrideWithNewer)
151 const QString currentSuffix = s.getCallsignSuffix();
152 if (suffix != currentSuffix)
154 suffix = currentSuffix;
157 split[currentSuffix].push_back(s);
bool containsBy(Predicate p) const
auto transform(F function) const
Return a new container generated by applying some transformation function to all elements of this one...
void sortBy(K1 key1, Keys... keys)
CSequence findBy(Predicate p) const
int removeIf(Predicate p)
bool isNewerThan(const ITimestampBased &otherTimestampObj) const
Is this newer than other?
Value object encapsulating information about an ATC station.
bool hasValidFrequency() const
Valid COM frequency.
bool isComUnitTunedToFrequency(const aviation::CComSystem &comUnit) const
Is Com unit tuned to this stations frequency.
const CInformationMessage & getInformationMessage(CInformationMessage::InformationType type) const
Message per type.
bool setOnline(bool online)
Set online.
const CCallsign & getCallsign() const
Get callsign.
bool isAtcStationFrequency(const physical_quantities::CFrequency &frequency) const
Is passed frequency the frequency of this station.
bool setMessage(const CInformationMessage &message)
Set given message.
int getSuffixSortOrder() const
Callsign suffix sort order.
const swift::misc::network::CUser & getController() const
Get controller.
bool isInRange() const
In range? If range and distance to own aircraft are not available false.
int removeIfOutsideRange()
Remove if marked outside of range.
CSequence()=default
Default constructor.
QHash< QString, CAtcStationList > splitPerSuffix(bool sort=true) const
Split per suffix.
CAtcStationList stationsWithValidFrequency() const
Find 0..n stations with valid COM frequency.
bool hasComUnitTunedInChannelSpacing(const CComSystem &comUnit) const
Any stations tuned in frequency of COM unit (with channel spacing).
CAtcStationList sortedByAtcSuffixSortOrderAndDistance() const
Sorted by ATC suffix sort order and distance.
int setOnline(const CCallsign &callsign, bool online)
Set online status.
void sortByAtcSuffixSortOrderAndDistance()
Sort by ATC suffix sort order and distance.
CAtcStationList findIfFrequencyIsWithinSpacing(const physical_quantities::CFrequency &frequency)
Find 0..n stations with frequency (with 5 kHz spacing for .x20/.x25 and .x70/.x75).
CAtcStationList()=default
Default constructor.
CAtcStationList findIfComUnitTunedInChannelSpacing(const CComSystem &comUnit) const
Find 0..n stations tuned in frequency of COM unit (with channel spacing).
network::CUserList getControllers() const
All controllers (with valid data).
bool updateIfMessageChanged(const CInformationMessage &im, const CCallsign &callsign, bool overrideWithNewer)
Update if message changed.
CAtcStationList findInRange() const
Those in range.
Value object encapsulating information of a callsign.
COM system (aka "radio").
const physical_quantities::CLength & getRelativeDistance() const
Get the distance.
Value object encapsulating a list of voice rooms.
bool isNull() const
Is quantity null?
auto MemberTransform(T memberFunc)
Returns a function object that returns the value returned by one of it's argument member functions.
auto MemberValid(T memberFunc)
Returns a predicate that returns true if the isValid() method of the value returned from one of its m...
#define SWIFT_DEFINE_SEQUENCE_MIXINS(Namespace, T, List)
Explicit template definition of mixins for a CSequence subclass.