refactoring
This commit is contained in:
parent
2fb157ef37
commit
4733b0c676
26 changed files with 774 additions and 406 deletions
|
|
@ -129,6 +129,12 @@ util::json::Dict NodePL::getAttrs() const {
|
|||
obj["station_group"] =
|
||||
std::to_string(reinterpret_cast<size_t>(_si->getGroup()));
|
||||
|
||||
#ifdef PFAEDLE_STATION_IDS
|
||||
// only print this in debug mode
|
||||
obj["station_id"] = _si->getId();
|
||||
#endif
|
||||
|
||||
|
||||
std::stringstream gtfsIds;
|
||||
if (_si->getGroup()) {
|
||||
for (auto* s : _si->getGroup()->getStops()) {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@ StatInfo::StatInfo(const StatInfo& si)
|
|||
_fromOsm(si._fromOsm),
|
||||
_group(0) {
|
||||
setGroup(si._group);
|
||||
#ifdef PFAEDLE_STATION_IDS
|
||||
_id = si._id;
|
||||
#endif
|
||||
}
|
||||
|
||||
// _____________________________________________________________________________
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ class StatInfo {
|
|||
// Set this stop as coming from osm
|
||||
void setIsFromOsm(bool is);
|
||||
|
||||
#ifdef PFAEDLE_STATION_IDS
|
||||
const std::string& getId() const { return _id; }
|
||||
void setId(const std::string& id) { _id = id; }
|
||||
#endif
|
||||
|
||||
private:
|
||||
std::string _name;
|
||||
std::vector<std::string> _altNames;
|
||||
|
|
@ -62,6 +67,12 @@ class StatInfo {
|
|||
bool _fromOsm;
|
||||
StatGroup* _group;
|
||||
|
||||
#ifdef PFAEDLE_STATION_IDS
|
||||
// debug feature to store station ids from both OSM
|
||||
// and GTFS
|
||||
std::string _id;
|
||||
#endif
|
||||
|
||||
static std::unordered_map<const StatGroup*, size_t> _groups;
|
||||
static void unRefGroup(StatGroup* g);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue