Add types for audio alerts

This commit is contained in:
Dan Paulat 2023-11-29 06:00:30 -06:00
parent e1ccc1ebb8
commit 9486d2364a
7 changed files with 97 additions and 1 deletions

View file

@ -0,0 +1,20 @@
#pragma once
#define SCWX_GET_ENUM(Type, FunctionName, nameMap) \
Type FunctionName(const std::string& name) \
{ \
auto result = \
std::find_if(nameMap.cbegin(), \
nameMap.cend(), \
[&](const std::pair<Type, std::string>& pair) -> bool \
{ return boost::iequals(pair.second, name); }); \
\
if (result != nameMap.cend()) \
{ \
return result->first; \
} \
else \
{ \
return Type::Unknown; \
} \
}

View file

@ -66,7 +66,8 @@ set(SRC_PROVIDER source/scwx/provider/aws_level2_data_provider.cpp
source/scwx/provider/nexrad_data_provider.cpp
source/scwx/provider/nexrad_data_provider_factory.cpp
source/scwx/provider/warnings_provider.cpp)
set(HDR_UTIL include/scwx/util/environment.hpp
set(HDR_UTIL include/scwx/util/enum.hpp
include/scwx/util/environment.hpp
include/scwx/util/float.hpp
include/scwx/util/hash.hpp
include/scwx/util/iterator.hpp