mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 21:20:06 +00:00
Slight rework to nexrad data provider interface
This commit is contained in:
parent
4ddff43813
commit
f0ef6b35dd
4 changed files with 56 additions and 10 deletions
|
|
@ -170,6 +170,11 @@ std::string AwsNexradDataProvider::FindLatestKey()
|
|||
return key;
|
||||
}
|
||||
|
||||
std::chrono::system_clock::time_point AwsNexradDataProvider::FindLatestTime()
|
||||
{
|
||||
return GetTimePointByKey(FindLatestKey());
|
||||
}
|
||||
|
||||
std::vector<std::chrono::system_clock::time_point>
|
||||
AwsNexradDataProvider::GetTimePointsByDate(
|
||||
std::chrono::system_clock::time_point date)
|
||||
|
|
@ -327,6 +332,25 @@ AwsNexradDataProvider::LoadObjectByKey(const std::string& key)
|
|||
return nexradFile;
|
||||
}
|
||||
|
||||
std::shared_ptr<wsr88d::NexradFile> AwsNexradDataProvider::LoadObjectByTime(
|
||||
std::chrono::system_clock::time_point time)
|
||||
{
|
||||
const std::string key = FindKey(time);
|
||||
if (key.empty())
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
return LoadObjectByKey(key);
|
||||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<wsr88d::NexradFile> AwsNexradDataProvider::LoadLatestObject()
|
||||
{
|
||||
return LoadObjectByKey(FindLatestKey());
|
||||
}
|
||||
|
||||
std::pair<size_t, size_t> AwsNexradDataProvider::Refresh()
|
||||
{
|
||||
using namespace std::chrono;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue