|
Stride Reference Manual
- generated for commit 9643b11
|
An implementation of the GeoGridReader using JSON. More...
#include <GeoGridJSONReader.h>


Public Member Functions | |
| GeoGridJSONReader (std::unique_ptr< std::istream > inputStream, stride::Population *pop) | |
| Construct the GeoGridJSONReader with the istream which contains the JSON. More... | |
| GeoGridJSONReader (const GeoGridJSONReader &)=delete | |
| No copy constructor. More... | |
| GeoGridJSONReader | operator= (const GeoGridJSONReader &)=delete |
| No copy assignement. More... | |
| void | Read () override |
| Actually perform the read and return the GeoGrid. More... | |
Public Member Functions inherited from geopop::GeoGridReader | |
| 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... | |
Private Member Functions | |
| std::shared_ptr< ContactCenter > | ParseContactCenter (boost::property_tree::ptree &contactCenter) |
| Create a ContactCenter based on the information stored in the provided boost property tree. More... | |
| stride::ContactPool * | ParseContactPool (boost::property_tree::ptree &contactPool, stride::ContactType::Id typeId) |
| Create a ContactCenter based on the information stored in the provided boost property tree. More... | |
| Coordinate | ParseCoordinate (boost::property_tree::ptree &coordinate) |
| Create a Coordinate based on the information stored in the provided boost property tree. More... | |
| std::shared_ptr< Location > | ParseLocation (boost::property_tree::ptree &location) |
| Create a Location based on the information stored in the provided boost property tree. More... | |
| stride::Person * | ParsePerson (boost::property_tree::ptree &person) |
| Create a Person based on the information stored in the provided boost property tree. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from geopop::GeoGridReader | |
| void | AddCommutes (GeoGrid &geoGrid) |
| Add the commutes that were found to their respective Locations symmetrically. More... | |
Protected Attributes inherited from geopop::GeoGridReader | |
| 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 implementation of the GeoGridReader using JSON.
This class is used to read a GeoGrid from a JSON file.
Definition at line 33 of file GeoGridJSONReader.h.
| geopop::GeoGridJSONReader::GeoGridJSONReader | ( | std::unique_ptr< std::istream > | inputStream, |
| stride::Population * | pop | ||
| ) |
Construct the GeoGridJSONReader with the istream which contains the JSON.
Definition at line 34 of file GeoGridJSONReader.cpp.
|
delete |
No copy constructor.
|
delete |
No copy assignement.
|
overridevirtual |
Actually perform the read and return the GeoGrid.
Implements geopop::GeoGridReader.
Definition at line 39 of file GeoGridJSONReader.cpp.
References geopop::GeoGridReader::AddCommutes(), geopop::GeoGridReader::m_commutes, geopop::GeoGridReader::m_inputStream, geopop::GeoGridReader::m_people, geopop::GeoGridReader::m_population, ParseLocation(), ParsePerson(), and stride::Population::RefGeoGrid().

|
private |
Create a ContactCenter based on the information stored in the provided boost property tree.
Definition at line 103 of file GeoGridJSONReader.cpp.
References ParseContactPool(), and stride::ContactLogMode::ToString().
Referenced by ParseLocation().


|
private |
Create a ContactCenter based on the information stored in the provided boost property tree.
Definition at line 135 of file GeoGridJSONReader.cpp.
References stride::ContactPoolSys::CreateContactPool(), geopop::GeoGridReader::m_people, geopop::GeoGridReader::m_population, and stride::Population::RefPoolSys().
Referenced by ParseContactCenter().


|
private |
Create a Coordinate based on the information stored in the provided boost property tree.
Definition at line 96 of file GeoGridJSONReader.cpp.
Referenced by ParseLocation().

|
private |
Create a Location based on the information stored in the provided boost property tree.
Definition at line 68 of file GeoGridJSONReader.cpp.
References geopop::GeoGridReader::m_commutes, ParseContactCenter(), and ParseCoordinate().
Referenced by Read().


|
private |
Create a Person based on the information stored in the provided boost property tree.
Definition at line 152 of file GeoGridJSONReader.cpp.
References stride::Population::CreatePerson(), and geopop::GeoGridReader::m_population.
Referenced by Read().

