Modify documentation of APIs
[platform/core/csapi/tizenfx.git] / src / Tizen.Maps / Tizen.Maps / RouteSegment.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17
18 using System;
19 using System.Collections.Generic;
20
21 namespace Tizen.Maps
22 {
23     /// <summary>
24     /// Place Segment information, used in Route Search requests
25     /// </summary>
26     public class RouteSegment
27     {
28         private Geocoordinates _origin;
29         private Geocoordinates _destination;
30         private double _distance;
31         private double _duration;
32         private Area _boundingBox;
33
34         private List<RouteManeuver> _maneuvers = new List<RouteManeuver>();
35         private List<Geocoordinates> _path = new List<Geocoordinates>();
36
37         internal RouteSegment(Interop.RouteSegmentHandle handle)
38         {
39             _origin = new Geocoordinates(handle.Origin);
40             _destination = new Geocoordinates(handle.Destination);
41             _distance = handle.Distance;
42             _duration = handle.Duration;
43             _boundingBox = new Area(handle.BoundingBox);
44
45             handle.ForeachManeuver(maneuverHandle => _maneuvers.Add(new RouteManeuver(maneuverHandle)));
46             handle.ForeachPath(pathHandle => _path.Add(new Geocoordinates(pathHandle)));
47         }
48
49         /// <summary>
50         /// Gets an origin coordinates for this segment.
51         /// </summary>
52         public Geocoordinates Origin { get { return _origin; } }
53
54         /// <summary>
55         /// Gets a destination coordinates for this segment.
56         /// </summary>
57         public Geocoordinates Destination { get { return _destination; } }
58
59         /// <summary>
60         /// Gets total distance for this segment.
61         /// </summary>
62         public double Distance { get { return _distance; } }
63
64         /// <summary>
65         /// Gets total duration to cover this segment.
66         /// </summary>
67         public double Duration { get { return _duration; } }
68
69         /// <summary>
70         /// Gets a maneuver list for this segment.
71         /// </summary>
72         public IEnumerable<RouteManeuver> Maneuvers { get { return _maneuvers; } }
73
74         /// <summary>
75         /// Gets a coordinates list for this segment.
76         /// </summary>
77         public IEnumerable<Geocoordinates> Path { get { return _path; } }
78
79         private Area BoundingBox { get { return _boundingBox; } }
80     }
81 }