Look for specific impact based warning tags in text products

This commit is contained in:
Dan Paulat 2024-06-03 00:09:32 -05:00
parent 60aed45450
commit 9437b0bfce
5 changed files with 109 additions and 10 deletions

View file

@ -0,0 +1,24 @@
#pragma once
#include <string>
namespace scwx
{
namespace awips
{
enum class ThreatCategory
{
Base,
Significant,
Considerable,
Destructive,
Catastrophic,
Unknown
};
ThreatCategory GetThreatCategory(const std::string& name);
const std::string& GetThreatCategoryName(ThreatCategory threatCategory);
} // namespace awips
} // namespace scwx

View file

@ -2,6 +2,7 @@
#include <scwx/awips/coded_location.hpp>
#include <scwx/awips/coded_time_motion_location.hpp>
#include <scwx/awips/impact_based_warnings.hpp>
#include <scwx/awips/message.hpp>
#include <scwx/awips/pvtec.hpp>
#include <scwx/awips/ugc.hpp>
@ -56,15 +57,16 @@ struct SegmentHeader
struct Segment
{
std::optional<SegmentHeader> header_;
std::vector<std::string> productContent_;
std::optional<CodedLocation> codedLocation_;
std::optional<CodedTimeMotionLocation> codedMotion_;
std::optional<SegmentHeader> header_ {};
std::vector<std::string> productContent_ {};
std::optional<CodedLocation> codedLocation_ {};
std::optional<CodedTimeMotionLocation> codedMotion_ {};
Segment() :
header_ {}, productContent_ {}, codedLocation_ {}, codedMotion_ {}
{
}
bool observed_ {false};
ThreatCategory threatCategory_ {ThreatCategory::Base};
bool tornadoPossible_ {false};
Segment() = default;
Segment(const Segment&) = delete;
Segment& operator=(const Segment&) = delete;