Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
data_source.h
Go to the documentation of this file.
1#pragma once
2
3#include <filesystem>
4#include <optional>
5#include <string>
6
7namespace hgps::input {
8
11 public:
14 explicit DataSource(std::string source);
15
19 explicit DataSource(std::string source, const std::filesystem::path &root_path);
20
21 virtual ~DataSource() = default;
22
23 // Copy and move constructors
24 DataSource(const DataSource &) noexcept = default;
25 DataSource(DataSource &&) noexcept = default;
26 DataSource &operator=(const DataSource &) noexcept = default;
27 DataSource &operator=(DataSource &&) noexcept = default;
28
32 virtual std::string compute_file_hash(const std::filesystem::path &zip_file_path) const;
33
37 std::filesystem::path get_data_directory() const;
38
39 protected:
40 std::string source_;
41};
42} // namespace hgps::input
Represents a data source, either a file/directory path or a URL.
Definition data_source.h:10
std::string source_
Definition data_source.h:40
DataSource(const DataSource &) noexcept=default
virtual ~DataSource()=default
std::filesystem::path get_data_directory() const
Get the path to a directory containing the data.
Definition data_source.cpp:50
virtual std::string compute_file_hash(const std::filesystem::path &zip_file_path) const
Compute the checksum for the file.
Definition data_source.cpp:46
DataSource(DataSource &&) noexcept=default
Data structures containing model parameters and configuration options.
Definition configuration.cpp:75
Global namespace.
Definition column_iterator.h:123