changed attributes of header files
[platform/core/location/maps-plugin-here.git] / inc / engine / routes / RouteSegment.h
1 /*
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
10  *
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.
16  */
17
18 #ifndef ROUTESEGMENT_H
19 #define ROUTESEGMENT_H
20
21 #include "common/HereMaps_global.h"
22 #include "common/GeoCoordinates.h"
23 #include "routes/Maneuver.h"
24
25 HERE_MAPS_BEGIN_NAMESPACE
26
27 class Maneuver;
28 class RouteSegmentImpl;
29
30 class RouteSegment;
31
32 /**
33  * This typedef defines a vector of instances of <code>RouteSegment</code> as a
34  * type.  
35  * 
36  * \ingroup routes
37  */
38 typedef std::vector<RouteSegment> RouteSegmentList;
39
40
41 /**
42  * This class encapsulates a route segment which is a section of a route between
43  * two waypoints. A number of properties define a route segment, including the
44  * time required to travel it, its length, path (geometry), and maneuvers.
45  * 
46  * \ingroup routes
47  */
48 class EXPORT_API RouteSegment
49 {
50
51 public:
52     /**
53      * This method is the default constructor. It creates an invalid object,
54      * with both travel time and distance set to zero. 
55      */
56     RouteSegment();
57
58     /**
59      * This method is a copy constructor that initializes a new instance of the
60      * class, using the property values from the object supplied by the caller.
61      * 
62      * @param rRhs A constant reference to an object whose property values are to
63      *        be used to initialize a new instance of <code>RouteSegment</code>.
64      */
65     RouteSegment(const RouteSegment& rRhs);
66
67     /**
68      * This method is the destructor. 
69      */
70     ~RouteSegment();
71
72     /**
73      * This is the assignment operator. 
74      * 
75      * @param rRhs A constant reference to an object whose property values are to
76      *        be copied to the given instance of <code>RouteSegment</code>.
77      * 
78      * @return A reference to the given instance of the class after the
79      *        assignment.
80      */
81     RouteSegment& operator = (const RouteSegment& rRhs);
82
83     
84     /**
85      * This method checks if the given instance of the class is valid. A segment
86      * is valid if, at a minimum, its path property is defined.
87      * 
88      * @return <code>true</code> if the object is valid, otherwise
89      *        <code>false</code>. 
90      */
91     bool IsValid() const;
92
93     /**
94      * This method sets the route segment travel time. 
95      * 
96      * @param aSecs A value indicating the length of time required to travel the
97      *        length of the route segment in seconds.
98      */
99     void SetTravelTime(int aSecs);
100
101     /**
102      * This method retrieves the route segment travel time. 
103      * 
104      * @return A value indicating time required to travel the
105      *        length of the route segment in seconds.
106      */
107     int GetTravelTime() const;
108
109     /**
110      * This method sets the route segment length. 
111      * 
112      * @param aDistance A value indicating the length of the
113      *        the route segment in meters.
114      */
115     void SetDistance(double aDistance);
116
117     /**
118      * This method retrieves the length of the route segment. 
119      * 
120      * @return A value indicating the length of the
121      *        the route segment in meters.
122      */
123     double GetDistance() const;
124
125     /**
126      * This method sets the path (geometry) of the route segment. 
127      * 
128      * @param rPath A constant reference to a vector of instances of
129      *        <code>GeoCoordinates</code> which defines the path (geometry) of
130      *        the route segment.
131      */
132     void SetPath(const GeoCoordinateList& rPath);
133
134     /**
135      * This method retrieves the path (geometry) of the route segment. 
136      * 
137      * @return A vector of instances of <code>GeoCoordinates</code> which
138      *        defines the path (geometry) of the route segment.
139      */
140     GeoCoordinateList GetPath() const;
141
142     /**
143      * This method adds a maneuver to the given route segment.
144      * 
145      * @param rManeuver A constant reference to an object that defines a route
146      *        maneuver.
147      */
148     void addManeuver(const Maneuver& rManeuver);
149
150     /**
151      * This method associates a list of maneuvers with the given route segment.
152      * 
153      * @param vManeuverList A constant reference to a vector of route maneuver
154      *        objects.
155      */
156     void SetManeuverList(const ManeuverList& vManeuverList);
157
158     /**
159      * This method retrieves a list of maneuvers associated with the given route
160      * segment. 
161      * 
162      * @return A vector of route maneuver objects.
163      */
164     ManeuverList GetManeuverList() const;
165
166 private:
167     RouteSegmentImpl* m_pImpl;
168
169     friend class RouteSegmentImpl;
170 };
171
172 HERE_MAPS_END_NAMESPACE
173
174 #endif /* ROUTESEGMENT_H */