swift
Loading...
Searching...
No Matches
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
10
11namespace 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
37
38 private:
39 PlaneInformation() = default;
40 };
41
43 inline bool operator==(const PlaneInformation &lhs, const PlaneInformation &rhs)
44 {
45 return lhs.getSender() == rhs.getSender() && lhs.getReceiver() == rhs.getReceiver() &&
46 lhs.m_aircraft == rhs.m_aircraft && 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
bool operator==(const AddAtc &lhs, const AddAtc &rhs)
Equal operator.
Definition addatc.h:60
MessageBase()=default
Default Constructor.
const QString & getReceiver() const
Get message receiver.
Definition messagebase.h:76
const QString & getSender() const
get message sender
Definition messagebase.h:70
This packet is sent in reply to a PIR request to inform the client which multiplayer model to use....
PlaneInformation(const QString &sender, const QString &receiver, const QString &aircraft, const QString &airline, const QString &livery)
Constructor.
static QString pdu()
PDU identifier.
QStringList toTokens() const
Message converted to tokens.
static PlaneInformation fromTokens(const QStringList &tokens)
Construct from tokens.
#define SWIFT_CORE_EXPORT
Export a class or function from the library.