swift
windlayerlist.h
Go to the documentation of this file.
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 
6 #ifndef SWIFT_MISC_WEATHER_WINDLAYERLIST_H
7 #define SWIFT_MISC_WEATHER_WINDLAYERLIST_H
8 
9 #include <initializer_list>
10 #include <tuple>
11 
12 #include <QMetaType>
13 
14 #include "misc/sequence.h"
15 #include "misc/swiftmiscexport.h"
16 #include "misc/weather/windlayer.h"
17 
18 SWIFT_DECLARE_SEQUENCE_MIXINS(swift::misc::weather, CWindLayer, CWindLayerList)
19 
20 namespace swift::misc
21 {
22  namespace aviation
23  {
24  class CAltitude;
25  }
26 
27  namespace weather
28  {
33  public CSequence<CWindLayer>,
34  public swift::misc::mixin::MetaType<CWindLayerList>
35  {
36  public:
39 
41  CWindLayerList() = default;
42 
45 
47  bool containsLevel(const swift::misc::aviation::CAltitude &level) const;
48 
50  CWindLayer findByLevel(const swift::misc::aviation::CAltitude &level) const;
51  };
52 
53  } // namespace weather
54 } // namespace swift::misc
55 
56 Q_DECLARE_METATYPE(swift::misc::weather::CWindLayerList)
57 
58 #endif // SWIFT_MISC_WEATHER_WINDLAYERLIST_H
Generic sequential container with value semantics.
Definition: sequence.h:86
CSequence()=default
Default constructor.
Altitude as used in aviation, can be AGL or MSL altitude.
Definition: altitude.h:52
CRTP class template from which a derived class can inherit common methods dealing with the metatype o...
Definition: mixinmetatype.h:29
Value object for a wind layer.
Definition: windlayer.h:28
Value object encapsulating a set of wind layers.
Definition: windlayerlist.h:35
CWindLayerList()=default
Default constructor.
#define SWIFT_MISC_DECLARE_USING_MIXIN_METATYPE(DERIVED)
When a derived class and a base class both inherit from mixin::MetaType, the derived class uses this ...
Free functions in swift::misc.
#define SWIFT_DECLARE_SEQUENCE_MIXINS(Namespace, T, List)
Explicit template declaration of mixins for a CSequence subclass to be placed near the top of the hea...
Definition: sequence.h:62
#define SWIFT_MISC_EXPORT
Export a class or function from the library.