mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 16:00:08 +00:00
Radar site configuration
This commit is contained in:
parent
19efb0e58c
commit
883626ebf5
5 changed files with 63 additions and 1 deletions
13
wxdata/include/scwx/common/sites.hpp
Normal file
13
wxdata/include/scwx/common/sites.hpp
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace common
|
||||
{
|
||||
|
||||
std::string GetSiteId(const std::string& radarId);
|
||||
|
||||
} // namespace common
|
||||
} // namespace scwx
|
||||
18
wxdata/source/scwx/common/sites.cpp
Normal file
18
wxdata/source/scwx/common/sites.cpp
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#include <scwx/common/products.hpp>
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace common
|
||||
{
|
||||
|
||||
std::string GetSiteId(const std::string& radarId)
|
||||
{
|
||||
size_t siteIdIndex = std::max<size_t>(radarId.length(), 3u) - 3u;
|
||||
std::string siteId = radarId.substr(siteIdIndex);
|
||||
return siteId;
|
||||
}
|
||||
|
||||
} // namespace common
|
||||
} // namespace scwx
|
||||
|
|
@ -25,10 +25,12 @@ set(HDR_COMMON include/scwx/common/characters.hpp
|
|||
include/scwx/common/constants.hpp
|
||||
include/scwx/common/geographic.hpp
|
||||
include/scwx/common/products.hpp
|
||||
include/scwx/common/sites.hpp
|
||||
include/scwx/common/types.hpp
|
||||
include/scwx/common/vcp.hpp)
|
||||
set(SRC_COMMON source/scwx/common/color_table.cpp
|
||||
source/scwx/common/products.cpp
|
||||
source/scwx/common/sites.cpp
|
||||
source/scwx/common/vcp.cpp)
|
||||
set(HDR_UTIL include/scwx/util/iterator.hpp
|
||||
include/scwx/util/rangebuf.hpp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue