mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-08 21:05:34 +08:00
refs #448 metar value classes
This commit is contained in:
committed by
Mathew Sutcliffe
parent
047e408597
commit
a94ea5618f
52
src/blackmisc/weather/cloudlayerlist.h
Normal file
52
src/blackmisc/weather/cloudlayerlist.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/* Copyright (C) 2015
|
||||
* swift project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_WEATHER_CLOUDLAYERLIST_H
|
||||
#define BLACKMISC_WEATHER_CLOUDLAYERLIST_H
|
||||
|
||||
#include "cloudlayer.h"
|
||||
#include "blackmisc/blackmiscexport.h"
|
||||
#include "blackmisc/sequence.h"
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
namespace Weather
|
||||
{
|
||||
/*!
|
||||
* Value object encapsulating a set of cloud layers
|
||||
*/
|
||||
class BLACKMISC_EXPORT CCloudLayerList :
|
||||
public CSequence<CCloudLayer>,
|
||||
public BlackMisc::Mixin::MetaType<CCloudLayerList>
|
||||
{
|
||||
public:
|
||||
BLACKMISC_DECLARE_USING_MIXIN_METATYPE(CCloudLayerList)
|
||||
|
||||
//! Default constructor.
|
||||
CCloudLayerList() = default;
|
||||
|
||||
//! Construct from a base class object.
|
||||
CCloudLayerList(const CSequence<CCloudLayer> &other);
|
||||
|
||||
//! Contains cloud layer with ceiling?
|
||||
bool containsCeiling(const BlackMisc::Aviation::CAltitude &ceiling) const;
|
||||
|
||||
//! Find cloud layer by ceiling
|
||||
CCloudLayer findByCeiling(const BlackMisc::Aviation::CAltitude &ceiling) const;
|
||||
};
|
||||
|
||||
} //namespace
|
||||
} // namespace
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::Weather::CCloudLayerList)
|
||||
Q_DECLARE_METATYPE(BlackMisc::CSequence<BlackMisc::Weather::CCloudLayer>)
|
||||
|
||||
#endif //guard
|
||||
Reference in New Issue
Block a user