swift
Loading...
Searching...
No Matches
swift::misc::weather::CMetar Class Reference

Value object encapsulating information about METAR FIXME: runway visibilities FIXME: runway wind shear FIXME: remarks. More...

#include <metar.h>

Inheritance diagram for swift::misc::weather::CMetar:
[legend]

Public Types

enum  ReportType { METAR , SPECI }
 Report type. More...
Public Types inherited from swift::misc::CValueObject< CMetar >
using base_type
 Base class.
Public Types inherited from swift::misc::CEmpty
using base_type = CEmpty
 Base class is alias of itself.
Public Types inherited from swift::misc::mixin::Index< CMetar >
enum  ColumnIndex
 Base class enums. More...

Public Member Functions

 CMetar ()
 Default constructor.
void setMessage (const QString &message)
 Set METAR message.
const QString & getMessage () const
 Get METAR message.
bool hasMessage () const
 Has METAR message.
void setReportType (ReportType type)
 Set report type.
ReportType getReportType () const
 Get report type.
void setAirportIcaoCode (const swift::misc::aviation::CAirportIcaoCode &icao)
 Set airport icao code.
const aviation::CAirportIcaoCode & getAirportIcaoCode () const
 Get airport icao code.
void setDayTime (int reportDay, const physical_quantities::CTime &reportTime)
 Set day and time.
int getDay () const
 Get report day.
const physical_quantities::CTime & getTime () const
 Get report time.
void setAutomated (bool isAutomated)
 Set the station to automated.
bool isAutomated () const
 Is the station automated?
void setCavok ()
 Set the weather to CAVOK.
void setWindLayer (const CWindLayer &windLayer)
 Set wind information.
CWindLayer getWindLayer () const
 Get wind layer.
void setVisibility (const physical_quantities::CLength &visibility)
 Set visibility information.
physical_quantities::CLength getVisibility () const
 Get visibility.
void addPresentWeather (const CPresentWeather &presentWeather)
 Add information about present weather.
const CPresentWeatherList & getPresentWeather () const
 Get present weather list.
void addCloudLayer (const CCloudLayer &cloudLayer)
 Add cloud layer.
const CCloudLayerList & getCloudLayers () const
 Get all cloud layers.
void removeAllClouds ()
 Remove all cloud layers.
void setTemperature (const physical_quantities::CTemperature &temperature)
 Set temperature.
physical_quantities::CTemperature getTemperature () const
 Get temperature.
void setDewPoint (const physical_quantities::CTemperature &dewPoint)
 Set dew point.
const physical_quantities::CTemperature & getDewPoint () const
 Get dew point.
void setAltimeter (const physical_quantities::CPressure &altimeter)
 Set altimeter.
const physical_quantities::CPressure & getAltimeter () const
 Get altimeter.
QString getMetarText () const
 Returns the METAR in a descriptive text.
QString convertToQString (bool i18n=false) const
 Cast as QString.
Public Member Functions inherited from swift::misc::mixin::MetaType< CMetar >
int getMetaTypeId () const
 Returns the Qt meta type ID of this object.
QString getClassName () const
 Class name.
bool isA (int metaTypeId) const
 Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses.
Public Member Functions inherited from swift::misc::mixin::DBusByMetaClass< CMetar >
void marshallToDbus (QDBusArgument &arg, Tags...) const
 Marshall without begin/endStructure, for when composed within another object.
void unmarshallFromDbus (const QDBusArgument &arg, Tags...)
 Unmarshall without begin/endStructure, for when composed within another object.
Public Member Functions inherited from swift::misc::mixin::DataStreamByMetaClass< CMetar >
void marshalToDataStream (QDataStream &stream) const
 Marshal a value to a QDataStream.
void unmarshalFromDataStream (QDataStream &stream)
 Unmarshal a value from a QDataStream.
Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< CMetar >
QJsonObject toJson () const
 Cast to JSON object.
QString toJsonString (QJsonDocument::JsonFormat format=QJsonDocument::Indented) const
 Convenience function JSON as string.
void convertFromJson (const QJsonObject &json)
 Assign from JSON object.
Public Member Functions inherited from swift::misc::mixin::String< CMetar >
QString toQString (bool i18n=false) const
 Cast as QString.
std::string toStdString (bool i18n=false) const
 To std string.
QString stringForStreaming () const
 String for streaming operators.
Public Member Functions inherited from swift::misc::mixin::Index< CMetar >
CPropertyIndexList apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false)
 Update by variant map.
void setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant)
 Set property by index.
QVariant propertyByIndex (CPropertyIndexRef index) const
 Property by index.
int comparePropertyByIndex (CPropertyIndexRef index, const CMetar &compareValue) const
 Compare for index.
bool equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const
 Is given variant equal to value of property index?
Public Member Functions inherited from swift::misc::mixin::Icon< CMetar >
CIcons::CIcons::StandardIconUnknown16 toIcon () const
 As icon, not implemented by all classes.

Static Public Member Functions

static CMetar CAVOK ()
 Return CAVOK metar.
Static Public Member Functions inherited from swift::misc::mixin::MetaType< CMetar >
static void registerMetadata ()
 Register metadata.
Static Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< CMetar >
static DerivedObj fromJson (const QJsonObject &json)
 Get object from QJsonObject.
static DerivedObj fromJsonNoThrow (const QString &jsonString, bool acceptCacheJson, bool &success, QString &errMsg)
 Get object from JSON string.

Additional Inherited Members

Protected Member Functions inherited from swift::misc::CValueObject< CMetar >
 CEmpty ()=default
 Inheriting constructors.
 CEmpty (const CEmpty &)=default
 Inheriting constructors.
 CValueObject ()=default
 Default constructor.
CValueObject & operator= (const CValueObject &)=default
 Copy assignment operator.
 ~CValueObject ()=default
 Destructor.
Protected Member Functions inherited from swift::misc::CEmpty
 CEmpty ()=default
 Protected default constructor.
 CEmpty (const CEmpty &)=default
 Protected copy constructor.
CEmpty & operator= (const CEmpty &)=default
 Protected copy assignment operator.
 ~CEmpty ()=default
 Non-virtual protected destructor.

Detailed Description

Value object encapsulating information about METAR FIXME: runway visibilities FIXME: runway wind shear FIXME: remarks.

Definition at line 37 of file metar.h.

Member Enumeration Documentation

◆ ReportType

Report type.

Definition at line 41 of file metar.h.

Constructor & Destructor Documentation

◆ CMetar()

swift::misc::weather::CMetar::CMetar ( )

Default constructor.

Definition at line 19 of file metar.cpp.

Member Function Documentation

◆ addCloudLayer()

void swift::misc::weather::CMetar::addCloudLayer ( const CCloudLayer & cloudLayer)

Add cloud layer.

Definition at line 55 of file metar.cpp.

◆ addPresentWeather()

void swift::misc::weather::CMetar::addPresentWeather ( const CPresentWeather & presentWeather)

Add information about present weather.

Definition at line 50 of file metar.cpp.

◆ CAVOK()

CMetar swift::misc::weather::CMetar::CAVOK ( )
static

Return CAVOK metar.

Definition at line 100 of file metar.cpp.

◆ convertToQString()

QString swift::misc::weather::CMetar::convertToQString ( bool i18n = false) const

Cast as QString.

Definition at line 93 of file metar.cpp.

◆ getAirportIcaoCode()

const aviation::CAirportIcaoCode & swift::misc::weather::CMetar::getAirportIcaoCode ( ) const
inline

Get airport icao code.

Definition at line 69 of file metar.h.

◆ getAltimeter()

const physical_quantities::CPressure & swift::misc::weather::CMetar::getAltimeter ( ) const
inline

Get altimeter.

Definition at line 132 of file metar.h.

◆ getCloudLayers()

const CCloudLayerList & swift::misc::weather::CMetar::getCloudLayers ( ) const
inline

Get all cloud layers.

Definition at line 111 of file metar.h.

◆ getDay()

int swift::misc::weather::CMetar::getDay ( ) const
inline

Get report day.

Definition at line 75 of file metar.h.

◆ getDewPoint()

const physical_quantities::CTemperature & swift::misc::weather::CMetar::getDewPoint ( ) const
inline

Get dew point.

Definition at line 126 of file metar.h.

◆ getMessage()

const QString & swift::misc::weather::CMetar::getMessage ( ) const
inline

Get METAR message.

Definition at line 54 of file metar.h.

◆ getMetarText()

QString swift::misc::weather::CMetar::getMetarText ( ) const

Returns the METAR in a descriptive text.

Definition at line 65 of file metar.cpp.

◆ getPresentWeather()

const CPresentWeatherList & swift::misc::weather::CMetar::getPresentWeather ( ) const
inline

Get present weather list.

Definition at line 105 of file metar.h.

◆ getReportType()

ReportType swift::misc::weather::CMetar::getReportType ( ) const
inline

Get report type.

Definition at line 63 of file metar.h.

◆ getTemperature()

physical_quantities::CTemperature swift::misc::weather::CMetar::getTemperature ( ) const

Get temperature.

Definition at line 59 of file metar.cpp.

◆ getTime()

const physical_quantities::CTime & swift::misc::weather::CMetar::getTime ( ) const
inline

Get report time.

Definition at line 78 of file metar.h.

◆ getVisibility()

physical_quantities::CLength swift::misc::weather::CMetar::getVisibility ( ) const

Get visibility.

Definition at line 48 of file metar.cpp.

◆ getWindLayer()

CWindLayer swift::misc::weather::CMetar::getWindLayer ( ) const
inline

Get wind layer.

Definition at line 93 of file metar.h.

◆ hasMessage()

bool swift::misc::weather::CMetar::hasMessage ( ) const

Has METAR message.

Definition at line 23 of file metar.cpp.

◆ isAutomated()

bool swift::misc::weather::CMetar::isAutomated ( ) const
inline

Is the station automated?

Definition at line 84 of file metar.h.

◆ removeAllClouds()

void swift::misc::weather::CMetar::removeAllClouds ( )
inline

Remove all cloud layers.

Definition at line 114 of file metar.h.

◆ setAirportIcaoCode()

void swift::misc::weather::CMetar::setAirportIcaoCode ( const swift::misc::aviation::CAirportIcaoCode & icao)

Set airport icao code.

Definition at line 27 of file metar.cpp.

◆ setAltimeter()

void swift::misc::weather::CMetar::setAltimeter ( const physical_quantities::CPressure & altimeter)

Set altimeter.

Definition at line 63 of file metar.cpp.

◆ setAutomated()

void swift::misc::weather::CMetar::setAutomated ( bool isAutomated)

Set the station to automated.

Definition at line 35 of file metar.cpp.

◆ setCavok()

void swift::misc::weather::CMetar::setCavok ( )

Set the weather to CAVOK.

Definition at line 37 of file metar.cpp.

◆ setDayTime()

void swift::misc::weather::CMetar::setDayTime ( int reportDay,
const physical_quantities::CTime & reportTime )

Set day and time.

Definition at line 29 of file metar.cpp.

◆ setDewPoint()

void swift::misc::weather::CMetar::setDewPoint ( const physical_quantities::CTemperature & dewPoint)

Set dew point.

Definition at line 61 of file metar.cpp.

◆ setMessage()

void swift::misc::weather::CMetar::setMessage ( const QString & message)

Set METAR message.

Definition at line 21 of file metar.cpp.

◆ setReportType()

void swift::misc::weather::CMetar::setReportType ( ReportType type)

Set report type.

Definition at line 25 of file metar.cpp.

◆ setTemperature()

void swift::misc::weather::CMetar::setTemperature ( const physical_quantities::CTemperature & temperature)

Set temperature.

Definition at line 57 of file metar.cpp.

◆ setVisibility()

void swift::misc::weather::CMetar::setVisibility ( const physical_quantities::CLength & visibility)

Set visibility information.

Definition at line 46 of file metar.cpp.

◆ setWindLayer()

void swift::misc::weather::CMetar::setWindLayer ( const CWindLayer & windLayer)

Set wind information.

Definition at line 44 of file metar.cpp.


The documentation for this class was generated from the following files: