|
Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
|
A data source which is validated with a checksum. More...
#include <validated_data_source.h>
Public Member Functions | |
| ValidatedDataSource (std::string source, const std::filesystem::path &root_path, std::string file_hash) | |
| Create a new ValidatedDataSource. | |
| ~ValidatedDataSource () override=default | |
| std::string | compute_file_hash (const std::filesystem::path &zip_file_path) const override |
| Compute the checksum for the file. | |
Public Member Functions inherited from hgps::input::DataSource | |
| DataSource (std::string source) | |
| Create a new DataSource. | |
| DataSource (std::string source, const std::filesystem::path &root_path) | |
| Create a new DataSource, rebasing relative paths if needed. | |
| virtual | ~DataSource ()=default |
| DataSource (const DataSource &) noexcept=default | |
| DataSource (DataSource &&) noexcept=default | |
| DataSource & | operator= (const DataSource &) noexcept=default |
| DataSource & | operator= (DataSource &&) noexcept=default |
| std::filesystem::path | get_data_directory () const |
| Get the path to a directory containing the data. | |
Additional Inherited Members | |
Protected Attributes inherited from hgps::input::DataSource | |
| std::string | source_ |
A data source which is validated with a checksum.
|
explicit |
Create a new ValidatedDataSource.
| source | File path or URL |
| root_path | Path to use as root for relative paths |
| file_hash | SHA256 hash of file contents |
|
overridedefault |
|
overridevirtual |
Compute the checksum for the file.
| zip_file_path | Path to zip file |
Reimplemented from hgps::input::DataSource.