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
7
namespace
hgps::input
{
8
10
class
DataSource
{
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
hgps::input::DataSource
Represents a data source, either a file/directory path or a URL.
Definition
data_source.h:10
hgps::input::DataSource::source_
std::string source_
Definition
data_source.h:40
hgps::input::DataSource::DataSource
DataSource(const DataSource &) noexcept=default
hgps::input::DataSource::~DataSource
virtual ~DataSource()=default
hgps::input::DataSource::get_data_directory
std::filesystem::path get_data_directory() const
Get the path to a directory containing the data.
Definition
data_source.cpp:50
hgps::input::DataSource::compute_file_hash
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
hgps::input::DataSource::DataSource
DataSource(DataSource &&) noexcept=default
hgps::input
Data structures containing model parameters and configuration options.
Definition
configuration.cpp:75
std
Global namespace.
Definition
column_iterator.h:123
HealthGPS.Input
data_source.h
Generated by
1.9.8