mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 16:55:36 +08:00
refs #448 metar decoder and unit tests
This commit is contained in:
committed by
Mathew Sutcliffe
parent
a94ea5618f
commit
d9ab612154
53
src/blackmisc/weather/metardecoder.h
Normal file
53
src/blackmisc/weather/metardecoder.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/* 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_METARDECODER_H
|
||||
#define BLACKMISC_WEATHER_METARDECODER_H
|
||||
|
||||
#include "blackmisc/blackmiscexport.h"
|
||||
#include "blackmisc/valueobject.h"
|
||||
#include "blackmisc/weather/metar.h"
|
||||
#include <QString>
|
||||
#include <QObject>
|
||||
#include <QVector>
|
||||
#include <memory>
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
namespace Weather
|
||||
{
|
||||
|
||||
class IMetarDecoderPart;
|
||||
|
||||
//! Metar Decoder
|
||||
class BLACKMISC_EXPORT CMetarDecoder : public QObject
|
||||
{
|
||||
public:
|
||||
|
||||
//! Default constructor
|
||||
CMetarDecoder();
|
||||
|
||||
//! Default destructor
|
||||
~CMetarDecoder();
|
||||
|
||||
//! Decode metar
|
||||
CMetar decode(const QString &metarString) const;
|
||||
|
||||
private:
|
||||
void allocateDecoders();
|
||||
std::vector<std::unique_ptr<IMetarDecoderPart>> m_decoders;
|
||||
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user