swift
Loading...
Searching...
No Matches
atcstationlist.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2013 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_MISC_AVIATION_ATCSTATIONLIST_H
7#define SWIFT_MISC_AVIATION_ATCSTATIONLIST_H
8
9#include <QHash>
10#include <QMetaType>
11
15#include "misc/collection.h"
18#include "misc/pq/frequency.h"
19#include "misc/sequence.h"
21
22SWIFT_DECLARE_SEQUENCE_MIXINS(swift::misc::aviation, CAtcStation, CAtcStationList)
23
24namespace swift::misc::aviation
25{
28 public CSequence<CAtcStation>,
29 public aviation::ICallsignObjectList<CAtcStation, CAtcStationList>,
30 public geo::IGeoObjectWithRelativePositionList<CAtcStation, CAtcStationList>,
31 public mixin::MetaType<CAtcStationList>
32 {
33 public:
36
38 CAtcStationList() = default;
39
42
45
47 bool hasComUnitTunedInChannelSpacing(const CComSystem &comUnit) const;
48
51
53 bool updateIfMessageChanged(const CInformationMessage &im, const CCallsign &callsign, bool overrideWithNewer);
54
56 int setOnline(const CCallsign &callsign, bool online);
57
61
64
67
70
73
76
80 };
81} // namespace swift::misc::aviation
82
85
86#endif // SWIFT_MISC_AVIATION_ATCSTATIONLIST_H
Generic ordered container with value semantics.
Definition collection.h:113
CSequence()=default
Default constructor.
Value object for a list of ATC stations.
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.
Definition callsign.h:30
COM system (aka "radio").
Definition comsystem.h:37
Value object encapsulating information message (ATIS, METAR, TAF).
List of objects with geo coordinates.
CRTP class template from which a derived class can inherit common methods dealing with the metatype o...
Value object encapsulating a list of voice rooms.
Definition userlist.h:26
#define SWIFT_MISC_DECLARE_USING_MIXIN_METATYPE(DERIVED)
When a derived class and a base class both inherit from mixin::MetaType, the derived class uses this ...
#define SWIFT_DECLARE_SEQUENCE_MIXINS(Namespace, T, List)
Explicit template declaration of mixins for a CSequence subclass to be placed near the top of the hea...
Definition sequence.h:62
#define SWIFT_MISC_EXPORT
Export a class or function from the library.