mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 16:40:05 +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
|
|
@ -39,12 +39,16 @@ public:
|
|||
|
||||
std::string FindKey(std::chrono::system_clock::time_point time) override;
|
||||
std::string FindLatestKey() override;
|
||||
std::chrono::system_clock::time_point FindLatestTime() override;
|
||||
std::vector<std::chrono::system_clock::time_point>
|
||||
GetTimePointsByDate(std::chrono::system_clock::time_point date) override;
|
||||
std::tuple<bool, size_t, size_t>
|
||||
ListObjects(std::chrono::system_clock::time_point date) override;
|
||||
std::shared_ptr<wsr88d::NexradFile>
|
||||
LoadObjectByKey(const std::string& key) override;
|
||||
std::shared_ptr<wsr88d::NexradFile>
|
||||
LoadObjectByTime(std::chrono::system_clock::time_point time) override;
|
||||
std::shared_ptr<wsr88d::NexradFile> LoadLatestObject() override;
|
||||
std::pair<size_t, size_t> Refresh() override;
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -59,6 +59,13 @@ public:
|
|||
*/
|
||||
virtual std::string FindLatestKey() = 0;
|
||||
|
||||
/**
|
||||
* Finds the most recent time in the cache.
|
||||
*
|
||||
* @return NEXRAD data key
|
||||
*/
|
||||
virtual std::chrono::system_clock::time_point FindLatestTime() = 0;
|
||||
|
||||
/**
|
||||
* Lists NEXRAD objects for the date supplied, and adds them to the cache.
|
||||
*
|
||||
|
|
@ -81,6 +88,24 @@ public:
|
|||
virtual std::shared_ptr<wsr88d::NexradFile>
|
||||
LoadObjectByKey(const std::string& key) = 0;
|
||||
|
||||
/**
|
||||
* Loads a NEXRAD file object at the given time
|
||||
*
|
||||
* @param time NEXRAD time
|
||||
*
|
||||
* @return NEXRAD data
|
||||
*/
|
||||
virtual std::shared_ptr<wsr88d::NexradFile>
|
||||
LoadObjectByTime(std::chrono::system_clock::time_point time) = 0;
|
||||
|
||||
/**
|
||||
* Loads the latest NEXRAD file object
|
||||
*
|
||||
* @return NEXRAD data
|
||||
*/
|
||||
virtual std::shared_ptr<wsr88d::NexradFile>
|
||||
LoadLatestObject() = 0;
|
||||
|
||||
/**
|
||||
* Lists NEXRAD objects for the current date, and adds them to the cache. If
|
||||
* no objects have been added to the cache for the current date, the previous
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue