ec7d79b2d1e52e83ebf0543bf10a7525f6e74a31
[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      * Assignment operator.
37      * @param rhs the object that is copied.
38      * @return this object.
39      */
40     KKJ& operator=(const KKJ &rhs);
41
42     /**
43      * Returns the northing of the coordinate.
44      * @return the northing.
45      */
46     unsigned int northing() const;
47
48     /**
49      * Returns the easting of the coordinate.
50      * @return the easting.
51      */
52     unsigned int easting() const;
53
54 protected:
55     /**
56      * Constructs a new KKJ coordinate with the given values.
57      * @param dd a private implementation member.
58      * @param northing the northing coordinate.
59      * @param easting the easting coordinate.
60      */
61     KKJ(KKJPrivate &dd, unsigned int northing, unsigned int easting);
62
63
64 private:
65     /// Pointer to the private member
66     KKJPrivate *const d_ptr;
67
68     Q_DECLARE_PRIVATE(KKJ)
69
70 };
71
72 #endif // KKJ_H