-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #240 from dpaulat/feature/enhanced-alerts
Show severity in Alert Dock
- Loading branch information
Showing
7 changed files
with
219 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
|
||
namespace scwx | ||
{ | ||
namespace awips | ||
{ | ||
|
||
enum class ThreatCategory : int | ||
{ | ||
Base = 0, | ||
Significant = 1, | ||
Considerable = 2, | ||
Destructive = 3, | ||
Catastrophic = 4, | ||
Unknown | ||
}; | ||
|
||
ThreatCategory GetThreatCategory(const std::string& name); | ||
const std::string& GetThreatCategoryName(ThreatCategory threatCategory); | ||
|
||
} // namespace awips | ||
} // namespace scwx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include <scwx/awips/impact_based_warnings.hpp> | ||
#include <scwx/util/enum.hpp> | ||
|
||
#include <unordered_map> | ||
|
||
#include <boost/algorithm/string.hpp> | ||
|
||
namespace scwx | ||
{ | ||
namespace awips | ||
{ | ||
|
||
static const std::string logPrefix_ = "scwx::awips::impact_based_warnings"; | ||
|
||
static const std::unordered_map<ThreatCategory, std::string> | ||
threatCategoryName_ {{ThreatCategory::Base, "Base"}, | ||
{ThreatCategory::Significant, "Significant"}, | ||
{ThreatCategory::Considerable, "Considerable"}, | ||
{ThreatCategory::Destructive, "Destructive"}, | ||
{ThreatCategory::Catastrophic, "Catastrophic"}, | ||
{ThreatCategory::Unknown, "?"}}; | ||
|
||
SCWX_GET_ENUM(ThreatCategory, GetThreatCategory, threatCategoryName_) | ||
|
||
const std::string& GetThreatCategoryName(ThreatCategory threatCategory) | ||
{ | ||
return threatCategoryName_.at(threatCategory); | ||
} | ||
|
||
} // namespace awips | ||
} // namespace scwx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters