swift
aircraftpartslist.cpp
1 // SPDX-FileCopyrightText: Copyright (C) 2014 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
7 
8 SWIFT_DEFINE_SEQUENCE_MIXINS(swift::misc::aviation, CAircraftParts, CAircraftPartsList)
9 
10 namespace swift::misc::aviation
11 {
13 
15 
17  {
18  int c = 0;
19  for (CAircraftParts &p : *this)
20  {
21  if (p.isOnGround() == onGround) { continue; }
22  p.setOnGround(onGround);
23  c++;
24  }
25  return c;
26  }
27 } // namespace swift::misc::aviation
Value object encapsulating information of aircraft's parts.
Definition: aircraftparts.h:26
void setOnGround(bool onGround)
Set aircraft on ground.
bool isOnGround() const
Is aircraft on ground?
int setOnGround(bool onGround)
Set on ground for all entries.
#define SWIFT_DEFINE_SEQUENCE_MIXINS(Namespace, T, List)
Explicit template definition of mixins for a CSequence subclass.
Definition: sequence.h:63