mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 03:40:05 +00:00 
			
		
		
		
	Refactoring AWS level 2 data provider, pushing up common functions
This commit is contained in:
		
							parent
							
								
									394aba2d83
								
							
						
					
					
						commit
						c5c54fbfa2
					
				
					 13 changed files with 512 additions and 439 deletions
				
			
		|  | @ -1,18 +1,16 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include <scwx/provider/level2_data_provider.hpp> | ||||
| #include <scwx/provider/aws_nexrad_data_provider.hpp> | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace provider | ||||
| { | ||||
| 
 | ||||
| class AwsLevel2DataProviderImpl; | ||||
| 
 | ||||
| /**
 | ||||
|  * @brief AWS Level 2 Data Provider | ||||
|  */ | ||||
| class AwsLevel2DataProvider : public Level2DataProvider | ||||
| class AwsLevel2DataProvider : public AwsNexradDataProvider | ||||
| { | ||||
| public: | ||||
|    explicit AwsLevel2DataProvider(const std::string& radarSite); | ||||
|  | @ -27,26 +25,18 @@ public: | |||
|    AwsLevel2DataProvider(AwsLevel2DataProvider&&) noexcept; | ||||
|    AwsLevel2DataProvider& operator=(AwsLevel2DataProvider&&) noexcept; | ||||
| 
 | ||||
|    size_t cache_size() const; | ||||
| 
 | ||||
|    std::chrono::system_clock::time_point last_modified() const; | ||||
|    std::chrono::seconds                  update_period() const; | ||||
| 
 | ||||
|    std::string FindKey(std::chrono::system_clock::time_point time); | ||||
|    std::string FindLatestKey(); | ||||
|    std::pair<size_t, size_t> | ||||
|    ListObjects(std::chrono::system_clock::time_point date); | ||||
|    std::shared_ptr<wsr88d::Ar2vFile> LoadObjectByKey(const std::string& key); | ||||
|    size_t                            Refresh(); | ||||
| 
 | ||||
|    std::chrono::system_clock::time_point | ||||
|    GetTimePointByKey(const std::string& key) const; | ||||
| 
 | ||||
|    static std::chrono::system_clock::time_point | ||||
|    GetTimePointFromKey(const std::string& key); | ||||
| 
 | ||||
| protected: | ||||
|    std::string GetPrefix(std::chrono::system_clock::time_point date); | ||||
| 
 | ||||
| private: | ||||
|    std::unique_ptr<AwsLevel2DataProviderImpl> p; | ||||
|    class Impl; | ||||
|    std::unique_ptr<Impl> p; | ||||
| }; | ||||
| 
 | ||||
| } // namespace provider
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat