swift
cloudlayerlist.h
Go to the documentation of this file.
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 
6 #ifndef SWIFT_MISC_WEATHER_CLOUDLAYERLIST_H
7 #define SWIFT_MISC_WEATHER_CLOUDLAYERLIST_H
8 
9 #include <QMetaType>
10 
11 #include "misc/sequence.h"
12 #include "misc/swiftmiscexport.h"
14 
15 SWIFT_DECLARE_SEQUENCE_MIXINS(swift::misc::weather, CCloudLayer, CCloudLayerList)
16 
17 namespace swift::misc
18 {
19  namespace aviation
20  {
21  class CAltitude;
22  }
23 
24  namespace weather
25  {
29  class SWIFT_MISC_EXPORT CCloudLayerList : public CSequence<CCloudLayer>, public mixin::MetaType<CCloudLayerList>
30  {
31  public:
34 
36  CCloudLayerList() = default;
37 
40 
42  bool containsBase(const aviation::CAltitude &base) const;
43 
45  CCloudLayer findByBase(const aviation::CAltitude &base) const;
46  };
47 
48  } // namespace weather
49 } // namespace swift::misc
50 
51 Q_DECLARE_METATYPE(swift::misc::weather::CCloudLayerList)
52 
53 #endif // SWIFT_MISC_WEATHER_CLOUDLAYERLIST_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 cloud layer.
Definition: cloudlayer.h:27
Value object encapsulating a set of cloud layers.
CCloudLayerList()=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.