changed attributes of header files
[platform/core/location/maps-plugin-here.git] / inc / engine / common / GeoCoordinates.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 GEOCOORDINATES_H
19 #define GEOCOORDINATES_H
20
21 #include <vector>
22
23 #include "common/HereMaps_global.h"
24
25 HERE_MAPS_BEGIN_NAMESPACE
26
27 class GeoCoordinates;
28 typedef std::vector<GeoCoordinates> GeoCoordinateList;
29
30 /**
31  * This class represents a geographic location defined in terms of WGS84
32  * coordinates. The coordinates (latitude, longitude and altitude) are stored
33  * as doubles.
34  */
35 class EXPORT_API GeoCoordinates
36 {
37 public:
38     static const double LATITUDE_RANGE;
39     static const double LONGITUDE_RANGE;
40
41     /**
42      * This method is the default constructor.
43      */
44     GeoCoordinates();
45
46     /**
47      * This method is the copy constructor.
48      * 
49      * @param rRhs A constant reference to an instance of
50      *        <code>GeoCoordinates</code> whose contents are to be copied into
51      *        the object being created.
52      */
53     GeoCoordinates(const GeoCoordinates& rRhs);
54
55     /**
56      * This method is a constructor.
57      *
58      * @param fLatitude A value specifying WGS84 latitude in degrees.
59      * 
60      * @param fLongitude A value specifying WGS84 longitude in degrees.
61      * 
62      * @param fAltitude A value specifying the altitude in meters, 
63      *        as height above the WGS84 geoid; optional, the default
64      *        is 0.
65      */
66     GeoCoordinates(double fLatitude, double fLongitude, double fAltitude = 0.);
67
68     /**
69      * This method is the destructor.
70      */
71     ~GeoCoordinates();
72
73     /**
74      * This is the assignment operator.
75      * 
76      * @param rRhs A constant reference to an instance of
77      *        <code>GeoCoordinates</code> whose contents are to be copied into
78      *        the given instance.
79      */
80     GeoCoordinates& operator=(const GeoCoordinates& rRhs);
81     
82     /**
83      * This method sets the value of longitude. 
84      *
85      * @param fValue A value specifying WGS84 longitude in degrees.  
86      */
87     void SetLongitude(double fValue);
88     
89     /**
90      * This method retrieves the value of longitude. 
91      *
92      * @return A value specifying WGS84 longitude in degrees.  
93      */
94     double GetLongitude() const;
95
96     /**
97      * This method sets the value of latitude. 
98      *
99      * @param fValue A value specifying WGS84 latitude in degrees.  
100      */
101     void SetLatitude(double fValue);
102
103     /**
104      * This method retrieves the value of latitude. 
105      *
106      * @return A value specifying WGS84 latitude in degrees.  
107      */
108     double GetLatitude() const;
109
110     /**
111      * This method sets the value of altitude. 
112      *
113      * @param fValue  A value representing altitude as height above
114      *        the WGS84 geoid in meters.
115      */
116     void SetAltitude(double fValue);
117
118     /**
119      * This method retrieves the value of altitude. 
120      *
121      * @return  A value representing altitude as height above
122      *        the WGS84 geoid in meters.
123      */
124     double GetAltitude() const;
125     
126     /** 
127      * This method checks if the given object is valid. 
128      * 
129      * The object is valid if the latitude and longitude have been set,
130      * latitude is in the range [-85.015113..85.015113] (degrees) and longitude is
131      * in the range [-180..180] (degrees).
132      * 
133      * @return <code>true</code> if the object is valid, otherwise
134      *        <code>false</code>.
135      */
136     bool IsValid() const;
137
138     /**
139      * This operator checks if the given object is identical to the right-hand
140      * object. 
141      * 
142      * @param other A constant reference to an object which is to be compared to
143      *        the given instance. 
144      * 
145      * @return <code>true</code> if the two objects are identical, otherwise
146      *        <code>false</code>. 
147      */
148     bool operator == (const GeoCoordinates& other) const;
149
150     /** 
151      * This operator checks if the given object differs (is not equal to) the
152      * right-hand object.
153      * 
154      * @param other A constant reference to an object which is to be compared to
155      *        the given instance. 
156      * 
157      * @return <code>true</code> if the two objects are different, otherwise
158      *        <code>false</code>. 
159      */
160     bool operator != (const GeoCoordinates& other) const;    
161
162 private:
163     class GeoCoordinatesImpl;
164     GeoCoordinatesImpl* m_pImpl;
165 };
166
167 HERE_MAPS_END_NAMESPACE
168
169 #endif