swift
cloudlayerlist.cpp
1 // SPDX-FileCopyrightText: Copyright (C) 2015 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
7 
8 using namespace swift::misc::aviation;
9 
10 SWIFT_DEFINE_SEQUENCE_MIXINS(swift::misc::weather, CCloudLayer, CCloudLayerList)
11 
12 namespace swift::misc::weather
13 {
14  CCloudLayerList::CCloudLayerList(const CSequence<CCloudLayer> &other) : CSequence<CCloudLayer>(other) {}
15 
16  bool CCloudLayerList::containsBase(const CAltitude &base) const { return contains(&CCloudLayer::getBase, base); }
17 
19  {
21  }
22 
23 } // 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 cloud layer.
Definition: cloudlayer.h:27
misc::aviation::CAltitude getBase() const
Get base.
Definition: cloudlayer.h:85
CCloudLayer findByBase(const aviation::CAltitude &base) const
Find cloud layer by base.
bool containsBase(const aviation::CAltitude &base) const
Contains cloud layer with base?
#define SWIFT_DEFINE_SEQUENCE_MIXINS(Namespace, T, List)
Explicit template definition of mixins for a CSequence subclass.
Definition: sequence.h:63