swift
interpolationstatus.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 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_SIMULATION_INTERPOLATION_INTERPOLATIONSTATUS_H
7 #define SWIFT_MISC_SIMULATION_INTERPOLATION_INTERPOLATIONSTATUS_H
8 
9 #include <QString>
10 
11 #include "misc/swiftmiscexport.h"
12 
13 namespace swift::misc::aviation
14 {
15  class CAircraftSituation;
16 }
17 
18 namespace swift::misc::simulation
19 {
22  {
23  public:
25  bool isInterpolated() const { return m_isInterpolated; }
26 
28  void setInterpolated(bool interpolated) { m_isInterpolated = interpolated; }
29 
31  bool isSameSituation() const { return m_isSameSituation; }
32 
34  void setSameSituation(bool same) { m_isSameSituation = same; }
35 
37  void setSituationsCount(int count) { m_situations = count; }
38 
40  void setExtraInfo(const QString &info);
41 
43  void setInterpolatedAndCheckSituation(bool succeeded, const aviation::CAircraftSituation &situation);
44 
46  bool hasValidSituation() const { return m_isValidSituation; }
47 
49  bool hasValidInterpolatedSituation() const;
50 
52  void checkIfValidSituation(const aviation::CAircraftSituation &situation);
53 
55  QString toQString() const;
56 
57  private:
58  bool m_isInterpolated = false;
59  bool m_isValidSituation = false;
60  bool m_isSameSituation = false;
61  int m_situations = -1;
62  QString m_extraInfo;
63  };
64 } // namespace swift::misc::simulation
65 
66 #endif // SWIFT_MISC_SIMULATION_INTERPOLATION_INTERPOLATIONSTATUS_H
Value object encapsulating information of an aircraft's situation.
bool hasValidSituation() const
Is the corresponding position valid?
void setSameSituation(bool same)
Interpolating between 2 same situations?
void setInterpolated(bool interpolated)
Set succeeded.
bool isSameSituation() const
Interpolating between 2 same situations?
bool isInterpolated() const
Did interpolation succeed?
void setSituationsCount(int count)
Set situations count.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.