diff --git a/routing/helicopter_router.cpp b/routing/helicopter_router.cpp index 7cc5ad4a9a..6aa4251e59 100644 --- a/routing/helicopter_router.cpp +++ b/routing/helicopter_router.cpp @@ -1,6 +1,7 @@ #include "helicopter_router.hpp" #include "route.hpp" +#include "../base/timer.hpp" #include "../base/macros.hpp" namespace routing @@ -14,7 +15,7 @@ void HelicopterRouter::SetFinalPoint(m2::PointD const & finalPt) void HelicopterRouter::CalculateRoute(m2::PointD const & startingPt, ReadyCallback const & callback) { m2::PointD points[] = {startingPt, m_finalPt}; - Route route(vector(&points[0], &points[0] + ARRAY_SIZE(points))); + Route route(GetName(), vector(&points[0], &points[0] + ARRAY_SIZE(points)), my::FormatCurrentTime()); callback(route); } diff --git a/routing/route.cpp b/routing/route.cpp index 51bd28ea6f..02b900def1 100644 --- a/routing/route.cpp +++ b/routing/route.cpp @@ -3,7 +3,8 @@ namespace routing { -Route::Route(vector const & points) : m_poly(points) +Route::Route(string const & router, vector const & points, string const & name) + : m_router(router), m_poly(points), m_name(name) { } diff --git a/routing/route.hpp b/routing/route.hpp index 4d94d04bd4..5f3bb0bd54 100644 --- a/routing/route.hpp +++ b/routing/route.hpp @@ -4,6 +4,7 @@ #include "../geometry/point2d.hpp" #include "../std/vector.hpp" +#include "../std/string.hpp" namespace routing { @@ -11,12 +12,19 @@ namespace routing class Route { public: - Route(vector const & points); + Route(string const & router, vector const & points, string const & name = ""); + string const & GetRouterId() const { return m_router; } m2::PolylineD const & GetPoly() const { return m_poly; } + string const & GetName() const { return m_name; } + + bool IsValid() const { return m_poly.GetSize(); } private: + /// The source which created the route + string m_router; m2::PolylineD m_poly; + string m_name; }; } // namespace routing