|
Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
|
Represents a data source, either a file/directory path or a URL. More...
#include <data_source.h>
Public Member Functions | |
| 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 |
| virtual std::string | compute_file_hash (const std::filesystem::path &zip_file_path) const |
| Compute the checksum for the file. | |
| std::filesystem::path | get_data_directory () const |
| Get the path to a directory containing the data. | |
Protected Attributes | |
| std::string | source_ |
Represents a data source, either a file/directory path or a URL.
|
explicit |
Create a new DataSource.
| source | File/directory path or URL |
|
explicit |
Create a new DataSource, rebasing relative paths if needed.
| source | File path or URL |
| root_path | Path to use as root for relative paths |
|
virtualdefault |
|
defaultnoexcept |
|
defaultnoexcept |
|
virtual |
Compute the checksum for the file.
| zip_file_path | Path to zip file |
Reimplemented in hgps::input::ValidatedDataSource.
| std::filesystem::path hgps::input::DataSource::get_data_directory | ( | ) | const |
Get the path to a directory containing the data.
This function will download, extract and validate data as needed
|
defaultnoexcept |
|
defaultnoexcept |
|
protected |