Changed KKJ class to use private member implementation
[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      * Returns the northing of the coordinate.
28      * @return the northing.
29      */
30     unsigned int northing() const;
31
32     /**
33      * Returns the easting of the coordinate.
34      * @return the easting.
35      */
36     unsigned int easting() const;
37
38 protected:
39     /**
40      * Constructs a new KKJ coordinate with the given values.
41      * @param dd a private implementation member.
42      * @param northing the northing coordinate.
43      * @param easting the easting coordinate.
44      */
45     KKJ(KKJPrivate &dd, unsigned int northing, unsigned int easting);
46
47
48 private:
49     /// Pointer to the private member
50     KKJPrivate *const d_ptr;
51
52     Q_DECLARE_PRIVATE(KKJ)
53
54 };
55
56 #endif // KKJ_H