swift
planeinformation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2019 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_CORE_FSD_PLANEINFORMATION_H
7 #define SWIFT_CORE_FSD_PLANEINFORMATION_H
8 
9 #include "core/fsd/messagebase.h"
10 
11 namespace swift::core::fsd
12 {
16  {
17  public:
19  PlaneInformation(const QString &sender, const QString &receiver, const QString &aircraft,
20  const QString &airline, const QString &livery);
21 
23  QStringList toTokens() const;
24 
26  static PlaneInformation fromTokens(const QStringList &tokens);
27 
29  static QString pdu() { return "#SB"; }
30 
33  QString m_aircraft;
34  QString m_airline;
35  QString m_livery;
37 
38  private:
40  };
41 
43  inline bool operator==(const PlaneInformation &lhs, const PlaneInformation &rhs)
44  {
45  return lhs.sender() == rhs.sender() && lhs.receiver() == rhs.receiver() && lhs.m_aircraft == rhs.m_aircraft &&
46  lhs.m_airline == rhs.m_airline && lhs.m_livery == rhs.m_livery;
47  }
48 
50  inline bool operator!=(const PlaneInformation &lhs, const PlaneInformation &rhs) { return !(lhs == rhs); }
51 } // namespace swift::core::fsd
52 
53 #endif // SWIFT_CORE_FSD_PLANEINFORMATION_H
bool operator!=(const AddAtc &lhs, const AddAtc &rhs)
Not equal operator.
Definition: addatc.h:68
FSD message base class.
Definition: messagebase.h:58
QString sender() const
get message sender
Definition: messagebase.h:73
QString receiver() const
Get message receiver.
Definition: messagebase.h:79
This packet is sent in reply to a PIR request to inform the client which multiplayer model to use....
static QString pdu()
PDU identifier.
#define SWIFT_CORE_EXPORT
Export a class or function from the library.