diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2015-07-17 09:35:34 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:56:16 +0300 |
commit | 7c200954721510d787e0b491bec196ea83d17788 (patch) | |
tree | 32c89c9c5314d662dd42f6b9106683b716012c12 /platform/location.hpp | |
parent | 9084cb6e7fef2a4cc4cd7cb4a0cf437c283d51fe (diff) |
Removing a dependence routing unit from map unit.
Diffstat (limited to 'platform/location.hpp')
-rw-r--r-- | platform/location.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/platform/location.hpp b/platform/location.hpp index d6dd544b52..587b74a2e6 100644 --- a/platform/location.hpp +++ b/platform/location.hpp @@ -147,4 +147,23 @@ namespace location bool IsValid() const { return !m_distToTarget.empty(); } }; + class RouteMatchingInfo + { + m2::PointD m_matchedPosition; + size_t m_indexInRoute; + bool m_isPositionMatched; + + public: + RouteMatchingInfo() : m_matchedPosition(0., 0.), m_indexInRoute(0), m_isPositionMatched(false) {} + void Set(m2::PointD const & matchedPosition, size_t indexInRoute) + { + m_matchedPosition = matchedPosition; + m_indexInRoute = indexInRoute; + m_isPositionMatched = true; + } + void Reset() { m_isPositionMatched = false; } + bool IsMatched() const { return m_isPositionMatched; } + size_t GetIndexInRoute() const { return m_indexInRoute; } + m2::PointD GetPosition() const { return m_matchedPosition; } + }; } // namespace location |