diff options
Diffstat (limited to 'routing/routing_session.cpp')
-rw-r--r-- | routing/routing_session.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/routing/routing_session.cpp b/routing/routing_session.cpp index 0de247706d..bc57f7f772 100644 --- a/routing/routing_session.cpp +++ b/routing/routing_session.cpp @@ -523,6 +523,35 @@ void RoutingSession::EmitCloseRoutingEvent() const alohalytics::Location::FromLatLon(lastGoodPoint.lat, lastGoodPoint.lon)); } +bool RoutingSession::HasRouteAltitudeImpl() const +{ + return !m_route.GetAltitudes().empty(); +} + +bool RoutingSession::HasRouteAltitude() const +{ + threads::MutexGuard guard(m_routeSessionMutex); + return HasRouteAltitudeImpl(); +} + +bool RoutingSession::GetRouteAltitudes(feature::TAltitudes & routeAltitudes) const +{ + threads::MutexGuard guard(m_routeSessionMutex); + if (!HasRouteAltitudeImpl()) + return false; + routeAltitudes.assign(m_route.GetAltitudes().begin(), m_route.GetAltitudes().end()); + return true; +} + +bool RoutingSession::GetSegDistanceM(deque<double> & routeSegDistanceM) const +{ + threads::MutexGuard guard(m_routeSessionMutex); + if (!m_route.IsValid()) + return false; + routeSegDistanceM.assign(m_route.GetSegDistanceM().begin(), m_route.GetSegDistanceM().end()); + return true; +} + string DebugPrint(RoutingSession::State state) { switch (state) |