Stride Reference Manual  - generated for commit 9643b11
geopop::LocationsCSVReader Class Reference

Create a Reader that fills a GeoGrid with the Location data found in a CSV input stream. More...

#include <LocationsCSVReader.h>

Inheritance diagram for geopop::LocationsCSVReader:
Inheritance graph
Collaboration diagram for geopop::LocationsCSVReader:
Collaboration graph

Public Member Functions

 LocationsCSVReader (std::unique_ptr< std::istream > inputStream)
 Construct the CitiesCSVReader that reads istream CSV data. More...
 
void FillGeoGrid (GeoGrid &geoGrid) const override
 Add the locations read to the GeoGrid. More...
 
- Public Member Functions inherited from geopop::LocationsReader
 LocationsReader (std::unique_ptr< std::istream > inputStream)
 Construct the CitiesReader with an istream containing the file content. More...
 
virtual ~LocationsReader ()=default
 Default destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from geopop::LocationsReader
std::unique_ptr< std::istream > m_inputStream
 The istream with the file content. More...
 

Detailed Description

Create a Reader that fills a GeoGrid with the Location data found in a CSV input stream.

Data are expected in format: id, province, population, x_coord, y_coord, latitude, longitude, name The population here is the actual population. It is converted to a population fraction that later gets rescaled with the (fictitious) total population count used during simulation.

Definition at line 29 of file LocationsCSVReader.h.

Constructor & Destructor Documentation

geopop::LocationsCSVReader::LocationsCSVReader ( std::unique_ptr< std::istream >  inputStream)
explicit

Construct the CitiesCSVReader that reads istream CSV data.

Definition at line 26 of file LocationsCSVReader.cpp.

Member Function Documentation

void geopop::LocationsCSVReader::FillGeoGrid ( GeoGrid geoGrid) const
overridevirtual

Add the locations read to the GeoGrid.

Implements geopop::LocationsReader.

Definition at line 28 of file LocationsCSVReader.cpp.

References geopop::GeoGrid::AddLocation(), and geopop::LocationsReader::m_inputStream.

Here is the call graph for this function:


The documentation for this class was generated from the following files: