Stride Reference Manual
- generated for commit 9643b11
|
An abstract base class for creating a GeoGrid that was read from a file, can be implemented using multiple file types (proto and json are currently implemented) More...
#include <GeoGridReader.h>
Public Member Functions | |
GeoGridReader (std::unique_ptr< std::istream > inputStream, stride::Population *pop) | |
Parametrized constructor. More... | |
GeoGridReader (const GeoGridReader &)=delete | |
No copy constructor. More... | |
GeoGridReader & | operator= (const GeoGridReader &)=delete |
No copy assignment. More... | |
virtual | ~GeoGridReader ()=default |
Default destructor. More... | |
virtual void | Read ()=0 |
Perform the actual read and return the created GeoGrid. More... | |
Protected Member Functions | |
void | AddCommutes (GeoGrid &geoGrid) |
Add the commutes that were found to their respective Locations symmetrically. More... | |
Protected Attributes | |
std::map< unsigned int, stride::Person * > | m_people |
< Store the persons (id->person) that were found while loping over the ContactPools. More... | |
std::vector< std::tuple< unsigned int, unsigned int, double > > | m_commutes |
std::unique_ptr< std::istream > | m_inputStream |
File to read. More... | |
stride::Population * | m_population |
Population to use in the GeoGrid may be nullptr. More... | |
An abstract base class for creating a GeoGrid that was read from a file, can be implemented using multiple file types (proto and json are currently implemented)
Definition at line 37 of file GeoGridReader.h.
geopop::GeoGridReader::GeoGridReader | ( | std::unique_ptr< std::istream > | inputStream, |
stride::Population * | pop | ||
) |
Parametrized constructor.
Definition at line 23 of file GeoGridReader.cpp.
|
delete |
No copy constructor.
|
virtualdefault |
Default destructor.
|
delete |
No copy assignment.
|
pure virtual |
Perform the actual read and return the created GeoGrid.
Implemented in geopop::GeoGridProtoReader, and geopop::GeoGridJSONReader.
|
protected |
Add the commutes that were found to their respective Locations symmetrically.
Definition at line 27 of file GeoGridReader.cpp.
References geopop::GeoGrid::GetById(), and m_commutes.
Referenced by geopop::GeoGridJSONReader::Read(), and geopop::GeoGridProtoReader::Read().
|
protected |
< Store the persons (id->person) that were found while loping over the ContactPools.
Commutes from, to, number.
Definition at line 61 of file GeoGridReader.h.
Referenced by geopop::GeoGridJSONReader::ParseContactPool(), geopop::GeoGridProtoReader::ParseContactPool(), geopop::GeoGridJSONReader::Read(), and geopop::GeoGridProtoReader::Read().
|
protected |
Definition at line 64 of file GeoGridReader.h.
Referenced by AddCommutes(), geopop::GeoGridJSONReader::ParseLocation(), geopop::GeoGridProtoReader::ParseLocation(), geopop::GeoGridJSONReader::Read(), and geopop::GeoGridProtoReader::Read().
|
protected |
File to read.
Definition at line 66 of file GeoGridReader.h.
Referenced by geopop::GeoGridJSONReader::Read(), and geopop::GeoGridProtoReader::Read().
|
protected |
Population to use in the GeoGrid may be nullptr.
Definition at line 67 of file GeoGridReader.h.
Referenced by geopop::GeoGridJSONReader::ParseContactPool(), geopop::GeoGridProtoReader::ParseContactPool(), geopop::GeoGridJSONReader::ParsePerson(), geopop::GeoGridProtoReader::ParsePerson(), geopop::GeoGridJSONReader::Read(), and geopop::GeoGridProtoReader::Read().