swift
windlayerlist.cpp
1 // SPDX-FileCopyrightText: Copyright (C) 2016 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
8 
9 using namespace swift::misc::aviation;
10 
11 SWIFT_DEFINE_SEQUENCE_MIXINS(swift::misc::weather, CWindLayer, CWindLayerList)
12 
13 namespace swift::misc::weather
14 {
15  CWindLayerList::CWindLayerList(const CSequence<CWindLayer> &other) : CSequence<CWindLayer>(other) {}
16 
17  bool CWindLayerList::containsLevel(const CAltitude &level) const { return contains(&CWindLayer::getLevel, level); }
18 
20  {
22  }
23 
24 } // namespace swift::misc::weather
auto findFirstByOrDefault(Predicate p, const Value &def) const
Return a copy of the first element for which a given predicate returns true, or a default value if th...
Definition: range.h:70
bool contains(const T &object) const
Return true if there is an element equal to given object. Uses the most efficient implementation avai...
Definition: range.h:109
Altitude as used in aviation, can be AGL or MSL altitude.
Definition: altitude.h:52
Value object for a wind layer.
Definition: windlayer.h:28
swift::misc::aviation::CAltitude getLevel() const
Get level.
Definition: windlayer.h:51
bool containsLevel(const swift::misc::aviation::CAltitude &level) const
Contains cloud layer with level?
CWindLayer findByLevel(const swift::misc::aviation::CAltitude &level) const
Find cloud layer by level.
#define SWIFT_DEFINE_SEQUENCE_MIXINS(Namespace, T, List)
Explicit template definition of mixins for a CSequence subclass.
Definition: sequence.h:63