UNCLASSIFIED

GeographicTranslator
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
UPSCoordinates.cpp
Go to the documentation of this file.
1 // CLASSIFICATION: UNCLASSIFIED
2 
3 #include <string.h>
4 #include "UPSCoordinates.h"
5 
6 
7 using namespace MSP::CCS;
8 
9 
11  CoordinateTuple( CoordinateType::universalPolarStereographic ),
12  _hemisphere( 'N' ),
13  _easting( 0 ),
14  _northing( 0 )
15 {
16 }
17 
18 
20  CoordinateTuple( _coordinateType ),
21  _hemisphere( 'N' ),
22  _easting( 0 ),
23  _northing( 0 )
24 {
25 }
26 
27 
28 UPSCoordinates::UPSCoordinates( CoordinateType::Enum _coordinateType, char __hemisphere, double __easting, double __northing ) :
29  CoordinateTuple( _coordinateType ),
30  _hemisphere( __hemisphere ),
31  _easting( __easting ),
32  _northing( __northing )
33 {
34 }
35 
36 
37 UPSCoordinates::UPSCoordinates( CoordinateType::Enum _coordinateType, const char* __warningMessage, char __hemisphere, double __easting, double __northing ) :
38  CoordinateTuple( _coordinateType ),
39  _hemisphere( __hemisphere ),
40  _easting( __easting ),
41  _northing( __northing )
42 {
43  int length = strlen( __warningMessage );
44  strncpy( _warningMessage, __warningMessage, length );
45  _warningMessage[ length ] = '\0';
46 }
47 
48 
50 {
52 
53  _hemisphere = c._hemisphere;
54  _easting = c._easting;
55  _northing = c._northing;
56 
57  int length = strlen( c._warningMessage );
58  strncpy( _warningMessage, c._warningMessage, length );
59  _warningMessage[ length ] = '\0';
60 }
61 
62 
64 {
65 }
66 
67 
69 {
70  if( this != &c )
71  {
73 
74  _hemisphere = c._hemisphere;
75  _easting = c._easting;
76  _northing = c._northing;
77 
78  int length = strlen( c._warningMessage );
79  strncpy( _warningMessage, c._warningMessage, length );
80  _warningMessage[ length ] = '\0';
81  }
82 
83  return *this;
84 }
85 
86 
87 void UPSCoordinates::set( char __hemisphere, double __easting, double __northing )
88 {
89  _hemisphere = __hemisphere;
90  _easting = __easting;
91  _northing = __northing;
92 }
93 
94 
96 {
97  return _hemisphere;
98 }
99 
100 
102 {
103  return _easting;
104 }
105 
106 
108 {
109  return _northing;
110 }
111 
112 // CLASSIFICATION: UNCLASSIFIED