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.
21 #include "common/HereMaps_global.h"
22 #include "common/GeoCoordinates.h"
24 HERE_MAPS_BEGIN_NAMESPACE
27 typedef std::vector<Maneuver> ManeuverList;
31 * This class represents a route maneuver. A route maneuver contains information
32 * that allows for navigation instructions to be generated, which explain how
33 * the person following a route is to proceed from one segment of the route to
34 * another. A <code>Maneuver</code> instance contains instruction text for the
35 * person following the route, the geographic coordinates of the waypoint to
36 * which it applies, an indication of the direction of travel, as well
37 * as time and distance to the next instruction.
39 * Maneuvers are tightly coupled to the <code>Route</code> instance for which
44 class EXPORT_API Maneuver
49 * This enumeration defines identifiers for route maneuver directions.
51 enum InstructionDirection {
52 ID_NoDirection, ///< Indicates that no directional instruction
53 /// is set/specified; this is the default
54 /// direction set by the default constructor.
55 ID_DirectionForward, ///< Indicates instruction to travel forward.
56 ID_DirectionBearRight, ///< Indicates instruction to bear right.
57 ID_DirectionLightRight, ///< Indicates instruction to turn slightly to
59 ID_DirectionRight, ///< Indicates instruction to turn right.
60 ID_DirectionHardRight, ///< Indicates instruction to turn hard to the
62 ID_DirectionUTurnRight, ///< Indicates instruction to make a right
64 ID_DirectionUTurnLeft, ///< Indicates instruction to make a left
66 ID_DirectionHardLeft, ///< Indicates instruction to turn hard to the
68 ID_DirectionLeft, ///< Indicates instruction to turn left.
69 ID_DirectionLightLeft, ///< Indicates instruction to turn slightly to
71 ID_DirectionBearLeft ///< Indicates instruction to bear left.
75 * This method is the default constructor. It creates an invalid instance,
76 * with direction set to ID_NoDirection.
81 * This method is the copy constructor.
83 * @param rRhs A constant reference to an object whose contents are to be
84 * copied to the new instance of the class.
86 Maneuver(const Maneuver& rRhs);
89 * This method is the destructor.
94 * This method is the assignment operator.
96 * @param rRhs A constant reference to an object whose contents are to be
97 * copied to the given instance of the class.
99 * @return A reference to the given instance after the assignment.
101 Maneuver& operator = (const Maneuver& rRhs);
104 * This method checks if the given maneuver object is valid. The object is
105 * valid if at least its position property holds valid coordinates and
106 * direction is set to a value other than <code>ID_NoDirection</code>.
108 * @return <code>true</code> if the given object is valid, otherwise
109 * <code>false</code>.
111 bool IsValid() const;
114 * This method sets the position (location) of the maneuver.
116 * @param rPosition A constant reference to an object containing the
117 * geographic coordinates of the location at which the maneuver is to
120 void SetPosition(const GeoCoordinates& rPosition);
123 * This method retrieves the position (location) of the maneuver.
125 * @return An object containing the geographic coordinates of the location
126 * at which the maneuver is to be executed.
128 GeoCoordinates GetPosition() const;
131 * This method sets the maneuver instruction text.
133 * @param sInstructionText A constant reference to a string containing the
134 * maneuver instruction text.
136 void SetInstructionText(const String& sInstructionText);
139 * This method retrieves the maneuver instruction text.
141 * @return A constant reference to a string containing the maneuver
144 String GetInstructionText() const;
147 * This method sets the maneuver direction.
149 * @param aDirection A value indicating the maneuver direction.
151 void SetDirection(InstructionDirection aDirection);
154 * This method retrieves the maneuver direction.
156 * @return A value indicating the maneuver direction.
158 InstructionDirection GetDirection() const;
161 * This method sets the time to next instruction in the given maneuver.
163 * @param aSecs A value specifying the time to the next instruction in
166 void SetTimeToNextInstruction(int aSecs);
169 * This method retrieves the time to next instruction in the given maneuver.
171 * @return A value specifying the time to the next instruction in seconds.
173 int GetTimeToNextInstruction() const;
176 * This method sets the distance to next instruction in the given maneuver.
178 * @param aDistance A value specifying the distance to the next instruction
181 void SetDistanceToNextInstruction(double aDistance);
184 * This method retrieves the distance to next instruction in the given
187 * @return A value specifying the distance to the next instruction
190 double GetDistanceToNextInstruction() const;
194 ManeuverImpl* m_pImpl;
196 friend class ManeuverImpl;
199 HERE_MAPS_END_NAMESPACE
201 #endif /* MANEUVER_H */