Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2014-07-13 22:34:27 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:20:41 +0300
commit4100abc69e5aae53f8e2ee01c3c52164650e0ca5 (patch)
tree4cffc52bfa462492e4b7e1c7c82d90d37ec4e04d /routing/route.hpp
parent2aca4755f344d49a90009a33aa3c45ff2710547d (diff)
[routing] Added more constructors to the Route class.
Diffstat (limited to 'routing/route.hpp')
-rw-r--r--routing/route.hpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/routing/route.hpp b/routing/route.hpp
index eb9d9848c6..c368b1d027 100644
--- a/routing/route.hpp
+++ b/routing/route.hpp
@@ -12,8 +12,28 @@ namespace routing
class Route
{
public:
- Route() {}
- Route(string const & router, vector<m2::PointD> const & points, string const & name = "");
+ explicit Route(string const & router, string const & name = string())
+ : m_router(router), m_name(name)
+ {
+ }
+
+ template <class IterT>
+ Route(string const & router, IterT beg, IterT end,
+ string const & name = string())
+ : m_router(router), m_poly(beg, end), m_name(name)
+ {
+ }
+
+ Route(string const & router, vector<m2::PointD> const & points,
+ string const & name = string())
+ : m_router(router), m_poly(points), m_name(name)
+ {
+ }
+
+ template <class IterT> void SetGeometry(IterT beg, IterT end)
+ {
+ m2::PolylineD(beg, end).Swap(m_poly);
+ }
string const & GetRouterId() const { return m_router; }
m2::PolylineD const & GetPoly() const { return m_poly; }