swift
Loading...
Searching...
No Matches
xplanempaircraft.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2018 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_SIMPLUGIN_XPLANE_XPLANEMPAIRCRAFT_H
7#define SWIFT_SIMPLUGIN_XPLANE_XPLANEMPAIRCRAFT_H
8
9#include <QSharedPointer>
10#include <QStringList>
11
14
15namespace swift::core
16{
17 class ISimulator;
18}
19namespace swift::simplugin::xplane
20{
23 {
24 public:
26 CXPlaneMPAircraft() = default;
27
31
33 ~CXPlaneMPAircraft() = default;
34
37
39 const swift::misc::aviation::CCallsign &getCallsign() const { return m_aircraft.getCallsign(); }
40
42 bool hasCallsign() const { return m_aircraft.hasCallsign(); }
43
45 const swift::misc::simulation::CSimulatedAircraft &getAircraft() const { return m_aircraft; }
46
48 const swift::misc::simulation::CAircraftModel &getAircraftModel() const { return m_aircraft.getModel(); }
49
51 const QString &getAircraftModelString() const { return m_aircraft.getModelString(); }
52
56
59
62 getInterpolation(qint64 currentTimeSinceEpoch,
64 uint32_t aircraftNumber) const;
65
69
71 swift::misc::simulation::CInterpolatorMulti *getInterpolator() const { return m_interpolator.data(); }
72
73 private:
76 m_interpolator;
77 };
78
80 class CXPlaneMPAircraftObjects : public QHash<swift::misc::aviation::CCallsign, CXPlaneMPAircraft>
81 {
82 public:
85
87 QStringList getAllCallsignStrings(bool sorted = false) const;
88
90 QString getAllCallsignStringsAsString(bool sorted = false, const QString &separator = ", ") const;
91
94
97 };
98} // namespace swift::simplugin::xplane
99
100#endif // SWIFT_SIMPLUGIN_XPLANE_XPLANEMPAIRCRAFT_H
Interface to a simulator.
Definition simulator.h:59
Status messages, e.g. from Core -> GUI.
Value object encapsulating information of a callsign.
Definition callsign.h:30
Value object for a set of callsigns.
Definition callsignset.h:26
Aircraft model (used by another pilot, my models on disk).
Value object for interpolator and rendering per callsign.
Record internal state of interpolator for debugging.
Multiplexed interpolator which allows switching between modes at runtime.
Comprehensive information of an aircraft.
const swift::misc::aviation::CCallsign & getCallsign() const
Get callsign.
QString getInterpolatorInfo(swift::misc::simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const
Get an interpolator info string (for debug info).
const swift::misc::simulation::CSimulatedAircraft & getAircraft() const
Simulated aircraft (as added).
void attachInterpolatorLogger(swift::misc::simulation::CInterpolationLogger *logger) const
Attach an observer to read the interpolator's state for debugging.
const QString & getAircraftModelString() const
Simulated aircraft model string.
void setSimulatedAircraft(const swift::misc::simulation::CSimulatedAircraft &simulatedAircraft)
Set simulated aircraft.
const swift::misc::simulation::CAircraftModel & getAircraftModel() const
Simulated aircraft model.
swift::misc::CStatusMessageList getInterpolationMessages(swift::misc::simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const
Interpolation messages.
swift::misc::simulation::CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoch, const swift::misc::simulation::CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const
Get interpolated situation.
swift::misc::simulation::CInterpolatorMulti * getInterpolator() const
Interpolator.
void toggleInterpolatorMode(const swift::misc::aviation::CCallsign &callsign)
Toggle interpolator modes.
QStringList getAllCallsignStrings(bool sorted=false) const
Get all callsign strings.
void toggleInterpolatorModes()
Toggle interpolator modes.
QString getAllCallsignStringsAsString(bool sorted=false, const QString &separator=", ") const
Get all callsign strings as string.
swift::misc::aviation::CCallsignSet getAllCallsigns() const
Get all callsigns.
Backend services of the swift project, like dealing with the network or the simulators.
Definition actionbind.cpp:7