diff options
author | Lev Dragunov <l.dragunov@corp.mail.ru> | 2015-09-30 20:11:08 +0300 |
---|---|---|
committer | Lev Dragunov <l.dragunov@corp.mail.ru> | 2015-10-07 14:49:51 +0300 |
commit | 41be2c71da413d654fdff23f23edc2c4b9e02cbc (patch) | |
tree | f8b1101b44a9396fc8ec59b0321e9c35e41f55d8 /routing/routing_session.hpp | |
parent | 37d22d29373bf0c8b5dc8d08ea1075f640cccfab (diff) |
Extract GetCurrentCam method to the routing session.
Diffstat (limited to 'routing/routing_session.hpp')
-rw-r--r-- | routing/routing_session.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/routing/routing_session.hpp b/routing/routing_session.hpp index 858c922f81..04b3fef8c5 100644 --- a/routing/routing_session.hpp +++ b/routing/routing_session.hpp @@ -23,6 +23,8 @@ class RouteMatchingInfo; namespace routing { +struct SpeedCameraRestriction; + class RoutingSession { public: @@ -116,6 +118,10 @@ private: void AssignRoute(Route & route, IRouter::ResultCode e); + /// Returns a nearest speed camera record on your way and distance to it. + /// Returns kInvalidSpeedCameraDistance if there is no cameras on your way. + double GetCurrentCam(SpeedCameraRestriction & camera, Index const & index); + /// RemoveRoute removes m_route and resets route attributes (m_state, m_lastDistance, m_moveAwayCounter). void RemoveRoute(); void RemoveRouteImpl(); @@ -126,6 +132,7 @@ private: State m_state; m2::PointD m_endPoint; size_t m_lastWarnedSpeedCamera; + size_t m_lastCheckedCamera; // TODO (ldragunov) Rewrite UI interop to message queue and avoid mutable. /// This field is mutable because it's modified in a constant getter. Note that the notification /// about camera will be sent at most once. |