2 * Copyright (C) 2013 HERE Global B.V. All rights reserved.
3 * This software, including documentation, is protected by copyright controlled by
4 * HERE Global B.V. (“Software”). All rights are reserved. Copying, including reproducing,
5 * storing, adapting or translating, any or all of this material requires the prior
6 * written consent of HERE Global B.V. You may use this
7 * Software in accordance with the terms and conditions defined in the
8 * HERE Location Platform Services Terms and Conditions, available at
9 * http://developer.here.com/terms-conditions-base
11 * As an additional permission to the above, you may distribute Software,
12 * in object code format as part of an Application, according to, and subject to, terms and
13 * conditions defined in the Tizen Software Development kit (“SDK”) License Agreement.
14 * You may distribute such object code format Application under terms of your choice,
15 * provided that the header and source files of the Software have not been modified.
23 #include "common/HereMaps_global.h"
24 #include "common/GeoCoordinates.h"
25 #include "routes/GeoRouteQuery.h"
26 #include "routes/RouteSegment.h"
28 HERE_MAPS_BEGIN_NAMESPACE
36 * This typedef defines a list (vector) of instances of <code>GeoRoute</code> as
41 typedef std::vector<GeoRoute> GeoRouteList;
44 * This class encapsulates a route. Instances of the class are data objects. The
45 * information they contain can be used to draw routes on the map.
47 * A route object contains member variables that represent:
50 * <li> route segments - sections of the route encapsulated as instances of
51 * <code>RouteSegment</code></li>
53 * <li> maneuvers - instances of <code>Maneuver</code></li> that contain
54 * navigation instructions for the person following the route, indicating
55 * how to continue from one section of the route to the next</li>
57 * <li> route geometry - a list of instances of <code>GeoCoordinates</code></li>
58 * that contains the point objects with the coordinates of the geographical
59 * locations through which the route passes</li>
61 * <li> duration - the length of time required to travel the route from start
66 * Note that the above list is indicative, rather than comprehensive.
68 class EXPORT_API GeoRoute
73 * This is the default constructor.
78 * This method is the copy constructor.
80 * @param rRhs An object whose contents are to be copied to the instance
83 GeoRoute(const GeoRoute& rRhs);
86 * This method is the destructor.
91 * This method sets the id of the route object.
93 * @param rId A constant reference to a string containing the unique id of
96 void SetRouteId(const String& rId);
99 * This method retrieves the id of the route object.
101 * @return A string containing the unique id of
104 String GetRouteId() const;
107 * This method sets class property holding the request used to obtain the
110 * @param rRequest A constant reference to an object that encapsulates the
111 * query used to obtain the route data.
113 void SetRequest(const GeoRouteQuery& rRequest);
116 * This method retrieves the value class property holding the request used
117 * to obtain the route data.
119 * @return An object that encapsulates the query used to obtain the route
122 GeoRouteQuery GetRequest() const;
125 * This method sets a property that holds the bounding box enclosing
126 * the route. The bounding box is defined by the geographic coordinates of
127 * its top-left and bottom-right corners.
129 * @param rBounds A constant reference to an object containing the bounding
132 void SetBounds(const GeoBoundingBox& rBounds);
135 * This method retrieves the value of a class property that holds the
136 * bounding box enclosing the route. The bounding box is defined by the
137 * geographic coordinates of its top-left and bottom-right corners.
139 * @return An object containing the bounding box.
141 GeoBoundingBox GetBounds() const;
144 * This method sets a class property that holds the list of segments of the
147 * @param vRouteSegmentList A constant reference to an object that defines
148 * the first segment of the route.
150 void SetRouteSegmentList(const RouteSegmentList& vRouteSegmentList);
153 * This method retrieves the value of a class property that holds the list of
154 * segments of the route.
156 * @return An object that defines the list of segments of the route.
158 RouteSegmentList GetRouteSegmentList() const;
161 * This method sets a class property that holds the time required to travel
162 * the length of the route.
164 * @param aSecs An integer value specifying the time required to travel the
165 * length of the route in seconds.
167 void SetTravelTime(int aSecs);
170 * This method retrieves the value of a class property that holds the time
171 * required to travel the length of the route.
173 * @return An integer value specifying the time required to travel the
174 * length of the route in seconds.
176 int GetTravelTime() const;
178 #ifdef TIZEN_MIGRATION
180 * This method sets a class property that holds the time required to traffic
181 * the length of the route.
183 * @param aSecs An integer value specifying the time required to traffic the
184 * length of the route in seconds.
186 void SetTrafficTime(int aSecs);
189 * This method retrieves the value of a class property that holds the time
190 * required to traffic the length of the route.
192 * @return An integer value specifying the time required to traffic the
193 * length of the route in seconds.
195 int GetTrafficTime() const;
199 * This method sets a class property that holds the length of the route --
200 * the total distance to travel between the start and end points of the
203 * @param aDistance A value specifying the length of the route in meters.
205 void SetDistance(double aDistance);
208 * This method retrieves the value of a class property that holds the length
209 * of the route -- the total distance to travel between the start and end
210 * points of the route.
212 * @return A value specifying the length of the route in meters.
214 double GetDistance() const;
217 * This method sets a class property indicating the travel mode for which
218 * the route was calculated.
220 * @param aTravelMode A value indicating the mode of travel for the route.
222 void SetTravelMode(GeoRouteQuery::TravelMode aTravelMode);
225 * This method retrieves the value of a class property indicating the travel
226 * mode for which the route was calculated.
228 * @return A value indicating the mode of travel for the route.
230 GeoRouteQuery::TravelMode GetTravelMode() const;
233 * This method sets a class property that defines the geometry of the route
234 * (it holds the coordinates of the points through which the route passes,
235 * the vertices of the route).
237 * @param rPath A constant reference to an object containing the geographic
238 * coordinates of the points through which the route passes (the route
241 void SetPath(const GeoCoordinateList& rPath);
244 * This method retrieves the value of a class property that defines the
245 * geometry of the route (it holds the coordinates of the points through
246 * which the route passes, the vertices of the route).
248 * @return An object containing the geographic coordinates of the points
249 * through which the route passes (the route vertices).
251 GeoCoordinateList GetPath() const;
254 * This is the assignment operator.
256 * @param rRhs A constant reference to an object whose properties are to be
257 * copied to the given instance of the class.
259 * @return A reference to the given instance of the class after its member
260 * elements have been updated.
262 GeoRoute& operator = (const GeoRoute& rRhs);
266 GeoRouteImpl* m_pImpl;
269 HERE_MAPS_END_NAMESPACE
271 #endif /* GEOROUTE_H */