alaCarte Maps
Renderer for OpenStreetMap tiles
relation.cpp
Go to the documentation of this file.
1 
23 #include "general/relation.hpp"
24 
25 
26 Relation::Relation( const std::vector<NodeId>& nodeIDs,
27  const DataMap<NodeId, CachedString>& nodeRoles,
28  const std::vector<WayId>& wayIDs,
29  const DataMap<WayId, CachedString>& wayRoles,
31  : GeoObject(tags)
32  , nodeIDs(nodeIDs)
33  , nodeRoles(nodeRoles)
34  , wayIDs(wayIDs)
35  , wayRoles(wayRoles)
36 {
37 }
38 
39 const std::vector<WayId>& Relation::getWayIDs() const
40 {
41  return wayIDs;
42 }
43 
44 const std::vector<NodeId>& Relation::getNodeIDs() const
45 {
46  return nodeIDs;
47 }
48 
50 {
51  assert(wayRoles.find(id) != wayRoles.end());
52  return wayRoles.at(id);
53 }
54 
56 {
57  assert(nodeRoles.find(id) != nodeRoles.end());
58  return nodeRoles.at(id);
59 
60 }
std::vector< NodeId > nodeIDs
Definition: relation.hpp:61
std::vector< WayId > wayIDs
Definition: relation.hpp:62
TESTABLE const std::vector< NodeId > & getNodeIDs() const
Definition: relation.cpp:44
DataMap< WayId, CachedString > wayRoles
Definition: relation.hpp:64
TESTABLE const std::vector< WayId > & getWayIDs() const
Definition: relation.cpp:39
DataMap< NodeId, CachedString > nodeRoles
Definition: relation.hpp:63
TESTABLE const CachedString & getWayRole(WayId id) const
Definition: relation.cpp:49
Represents a string which is cached into an internal cache.
TESTABLE const CachedString & getNodeRole(NodeId id) const
Definition: relation.cpp:55
Relation()=default