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  {
16  int c = 0;
17  for (CAircraftParts &p : *this)
18  {
19  if (p.isOnGround() == onGround) { continue; }
20  p.setOnGround(onGround);
21  c++;
22  }
23  return c;
24  }
25 } // 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.
CAircraftPartsList()=default
Default constructor.
#define SWIFT_DEFINE_SEQUENCE_MIXINS(Namespace, T, List)
Explicit template definition of mixins for a CSequence subclass.
Definition: sequence.h:63