Coordinate system transformer
[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  * This is the rectangular grid coordinate version.
11  */
12 class KKJ
13 {
14 public:
15     /**
16      * Constructs a new KKJ coordinate with the given values.
17      * @param northing the northing coordinate.
18      * @param easting the easting coordinate.
19      */
20     KKJ(unsigned int northing, unsigned int easting);
21
22     /**
23      * Destructor.
24      */
25     virtual ~KKJ();
26
27     /**
28      * Equals operator.
29      * Tests the equality of this coordinate and another coordinate and returns \c true
30      * if the coordinates represent the same position.
31      * @param rhs the other coordinate to test against.
32      * @return \c true if the coordinates are the same, \c false otherwise.
33      */
34     bool operator==(const KKJ &rhs) const;
35
36     /**
37      * Assignment operator.
38      * @param rhs the object that is copied.
39      * @return this object.
40      */
41     KKJ& operator=(const KKJ &rhs);
42
43     /**
44      * Returns the northing of the coordinate.
45      * @return the northing.
46      */
47     unsigned int northing() const;
48
49     /**
50      * Returns the easting of the coordinate.
51      * @return the easting.
52      */
53     unsigned int easting() const;
54
55 protected:
56     /**
57      * Constructs a new KKJ coordinate with the given values.
58      * @param dd a private implementation member.
59      * @param northing the northing coordinate.
60      * @param easting the easting coordinate.
61      */
62     KKJ(KKJPrivate &dd, unsigned int northing, unsigned int easting);
63
64
65 private:
66     /// Pointer to the private member
67     KKJPrivate *const d_ptr;
68
69     Q_DECLARE_PRIVATE(KKJ)
70
71 };
72
73 #endif // KKJ_H