|
Stride Reference Manual
- generated for commit 9643b11
|
Writes a GeoGrid to a JSON file. More...
#include <GeoGridJSONWriter.h>


Public Member Functions | |
| GeoGridJSONWriter () | |
| Construct the GeoGridJSONWriter. More... | |
| void | Write (GeoGrid &geoGrid, std::ostream &stream) override |
| Write the provided GeoGrid to the proved ostream in JSON format. More... | |
Public Member Functions inherited from geopop::GeoGridWriter | |
| virtual | ~GeoGridWriter ()=default |
| Construct the Writer. More... | |
Private Member Functions | |
| boost::property_tree::ptree | WriteContactCenter (std::shared_ptr< ContactCenter > contactCenter) |
| Create a Boost Property Tree containing all info needed to reconstruct a ContactCenter. More... | |
| boost::property_tree::ptree | WriteContactPool (stride::ContactPool *contactPool) |
| Create a Boost Property Tree containing all info needed to reconstruct a ContactPool. More... | |
| boost::property_tree::ptree | WriteCoordinate (const Coordinate &coordinate) |
| Create a Boost Property Tree containing all info needed to reconstruct a Coordinate. More... | |
| boost::property_tree::ptree | WriteLocation (const Location &location) |
| Create a Boost Property Tree containing all info needed to reconstruct a Location. More... | |
| boost::property_tree::ptree | WritePerson (stride::Person *person) |
| Create a Boost Property Tree containing all info needed to reconstruct a Person. More... | |
Private Attributes | |
| std::set< stride::Person * > | m_persons_found |
| The persons found when looping over the ContactPools. More... | |
Writes a GeoGrid to a JSON file.
Definition at line 36 of file GeoGridJSONWriter.h.
| geopop::GeoGridJSONWriter::GeoGridJSONWriter | ( | ) |
Construct the GeoGridJSONWriter.
Definition at line 34 of file GeoGridJSONWriter.cpp.
|
overridevirtual |
Write the provided GeoGrid to the proved ostream in JSON format.
Implements geopop::GeoGridWriter.
Definition at line 36 of file GeoGridJSONWriter.cpp.
References m_persons_found, WriteLocation(), and WritePerson().

|
private |
Create a Boost Property Tree containing all info needed to reconstruct a ContactCenter.
Definition at line 60 of file GeoGridJSONWriter.cpp.
References stride::ContactLogMode::ToString(), and WriteContactPool().
Referenced by WriteLocation().


|
private |
Create a Boost Property Tree containing all info needed to reconstruct a ContactPool.
Definition at line 77 of file GeoGridJSONWriter.cpp.
References stride::ContactPool::GetId(), and m_persons_found.
Referenced by WriteContactCenter().


|
private |
Create a Boost Property Tree containing all info needed to reconstruct a Coordinate.
Definition at line 92 of file GeoGridJSONWriter.cpp.
Referenced by WriteLocation().

|
private |
Create a Boost Property Tree containing all info needed to reconstruct a Location.
Definition at line 100 of file GeoGridJSONWriter.cpp.
References geopop::Location::CRefOutgoingCommutes(), geopop::Location::GetCoordinate(), geopop::Location::GetID(), geopop::Location::GetName(), geopop::Location::GetPopCount(), geopop::Location::GetProvince(), stride::ContactType::IdList, WriteContactCenter(), and WriteCoordinate().
Referenced by Write().


|
private |
Create a Boost Property Tree containing all info needed to reconstruct a Person.
Definition at line 131 of file GeoGridJSONWriter.cpp.
References stride::Person::GetAge(), stride::Person::GetId(), and stride::Person::GetPoolId().
Referenced by Write().


|
private |
The persons found when looping over the ContactPools.
Definition at line 62 of file GeoGridJSONWriter.h.
Referenced by Write(), and WriteContactPool().