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

A Factory for creating the correct implementation of the different Readers which parse the information needed to construct a GeoGrid, based on the file extension. More...

#include <ReaderFactory.h>

Collaboration diagram for geopop::ReaderFactory:
Collaboration graph

Static Public Member Functions

static std::shared_ptr< LocationsReaderCreateLocationsReader (const std::string &filename)
 Create a Reader based on the filename relative to the data directory. More...
 
static std::shared_ptr< LocationsReaderCreateLocationsReader (const filesys::path &path)
 Create a Reader based on an absolute filesystem path for the input file. More...
 
static std::shared_ptr< CommutesReaderCreateCommutesReader (const std::string &filename)
 Create a CommutesReader based on the filename relative to the data directory. More...
 
static std::shared_ptr< CommutesReaderCreateCommutesReader (const filesys::path &path)
 Create a CommutesReader based on the absolute filesystem path the input file. More...
 
static std::shared_ptr< HouseholdReaderCreateHouseholdReader (const std::string &filename)
 Create a HouseholdReader based on the filename relative to the data directory. More...
 
static std::shared_ptr< HouseholdReaderCreateHouseholdReader (const filesys::path &path)
 Create a HouseholdReader based on the absolute filesystem path the input file. More...
 

Static Private Member Functions

static std::unique_ptr< std::istream > OpenFile (const filesys::path &path)
 Create an istream based on the filesystem path. More...
 

Detailed Description

A Factory for creating the correct implementation of the different Readers which parse the information needed to construct a GeoGrid, based on the file extension.

Currently only CSV Readers are implemented.

Definition at line 42 of file ReaderFactory.h.

Member Function Documentation

shared_ptr< LocationsReader > geopop::ReaderFactory::CreateLocationsReader ( const std::string &  filename)
static

Create a Reader based on the filename relative to the data directory.

Definition at line 32 of file ReaderFactory.cpp.

References stride::util::FileSys::GetDataDir().

Referenced by stride::GeoPopBuilder::MakeLocations().

Here is the call graph for this function:

Here is the caller graph for this function:

shared_ptr< LocationsReader > geopop::ReaderFactory::CreateLocationsReader ( const filesys::path &  path)
static

Create a Reader based on an absolute filesystem path for the input file.

Definition at line 37 of file ReaderFactory.cpp.

std::shared_ptr< CommutesReader > geopop::ReaderFactory::CreateCommutesReader ( const std::string &  filename)
static

Create a CommutesReader based on the filename relative to the data directory.

Definition at line 42 of file ReaderFactory.cpp.

References stride::util::FileSys::GetDataDir().

Referenced by stride::GeoPopBuilder::MakeLocations().

Here is the call graph for this function:

Here is the caller graph for this function:

shared_ptr< CommutesReader > geopop::ReaderFactory::CreateCommutesReader ( const filesys::path &  path)
static

Create a CommutesReader based on the absolute filesystem path the input file.

Definition at line 47 of file ReaderFactory.cpp.

std::shared_ptr< HouseholdReader > geopop::ReaderFactory::CreateHouseholdReader ( const std::string &  filename)
static

Create a HouseholdReader based on the filename relative to the data directory.

Definition at line 52 of file ReaderFactory.cpp.

References stride::util::FileSys::GetDataDir().

Referenced by geopop::GeoGridConfig::SetData().

Here is the call graph for this function:

Here is the caller graph for this function:

shared_ptr< HouseholdReader > geopop::ReaderFactory::CreateHouseholdReader ( const filesys::path &  path)
static

Create a HouseholdReader based on the absolute filesystem path the input file.

Definition at line 57 of file ReaderFactory.cpp.

std::unique_ptr< std::istream > geopop::ReaderFactory::OpenFile ( const filesys::path &  path)
staticprivate

Create an istream based on the filesystem path.

Definition at line 62 of file ReaderFactory.cpp.


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