5daddde696e577ed1605975ff6475b8ffc744303
[ptas] / src / kkj.h
1 #ifndef KKJ_H
2 #define KKJ_H
3
4 #include <QtGlobal>
5
6 class KKJPrivate;
7
8 /**
9  * A class representing the Finnish KKJ coordinate.
10  */
11 class KKJ
12 {
13 public:
14     /**
15      * Constructs a new KKJ coordinate with the given values.
16      * @param northing the northing coordinate.
17      * @param easting the easting coordinate.
18      */
19     KKJ(unsigned int northing, unsigned int easting);
20
21     /**
22      * Destructor.
23      */
24     virtual ~KKJ();
25
26     /**
27      * Equals operator.
28      * Tests the equality of this coordinate and another coordinate and returns \c true
29      * if the coordinates represent the same position.
30      * @param rhs the other coordinate to test against.
31      * @return \c true if the coordinates are the same, \c false otherwise.
32      */
33     bool operator==(const KKJ &rhs) const;
34
35     /**
36      * Returns the northing of the coordinate.
37      * @return the northing.
38      */
39     unsigned int northing() const;
40
41     /**
42      * Returns the easting of the coordinate.
43      * @return the easting.
44      */
45     unsigned int easting() const;
46
47 protected:
48     /**
49      * Constructs a new KKJ coordinate with the given values.
50      * @param dd a private implementation member.
51      * @param northing the northing coordinate.
52      * @param easting the easting coordinate.
53      */
54     KKJ(KKJPrivate &dd, unsigned int northing, unsigned int easting);
55
56
57 private:
58     /// Pointer to the private member
59     KKJPrivate *const d_ptr;
60
61     Q_DECLARE_PRIVATE(KKJ)
62
63 };
64
65 #endif // KKJ_H