26 : m_input_stream(
std::move(inputStream))
31 std::vector<std::vector<unsigned int>>& ref_ages)
35 unsigned int p_count = 0U;
36 for (
const CSVRow& row : reader) {
38 vector<unsigned int> temp;
39 for (
unsigned int i = 0; i < 12; i++) {
42 age = row.GetValue<
unsigned int>(i);
43 }
catch (
const std::bad_cast& e) {
47 temp.emplace_back(age);
49 p_count += temp.size();
50 ref_ages.emplace_back(temp);
52 ref_person_count = p_count;
std::unique_ptr< std::istream > m_input_stream
Input stream connected to input data file.
Utilities for the project.
HouseholdCSVReader(std::unique_ptr< std::istream > inputStream)
Construct the HouseholdCSVReader with an istream containing the CSV data.
Namespace for the geographic and demograhic classes.
void SetReferenceHouseholds(unsigned int &ref_person_count, std::vector< std::vector< unsigned int >> &ref_ages) override
Add the locations to the GeoGrid.
A collection of CSVRow elements.
Header file of base class for config that needs to be read from a file.