UNCLASSIFIED
GeographicTranslator
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Friends
Macros
master
geotrans3.7
CCS
src
dtcc
CoordinateTuples
CoordinateTuple.cpp
Go to the documentation of this file.
1
// CLASSIFICATION: UNCLASSIFIED
2
3
#include <stdio.h>
4
#include <string.h>
5
#include "
CoordinateTuple.h
"
6
#include "
CoordinateType.h
"
7
8
9
using namespace
MSP::CCS;
10
11
12
CoordinateTuple::CoordinateTuple
() :
13
_coordinateType(
CoordinateType
::geodetic )
14
{
15
strcpy(
_errorMessage
,
""
);
16
strcpy(
_warningMessage
,
""
);
17
// _warningMessage[0] = '\0';
18
}
19
20
21
CoordinateTuple::CoordinateTuple
(
CoordinateType::Enum
__coordinateType ) :
22
_coordinateType( __coordinateType )
23
{
24
strcpy(
_errorMessage
,
""
);
25
strcpy(
_warningMessage
,
""
);
26
// _warningMessage[0] = '\0';
27
}
28
29
30
CoordinateTuple::CoordinateTuple
(
MSP::CCS::CoordinateType::Enum
__coordinateType,
const
char
* __warningMessage ) :
31
_coordinateType( __coordinateType )
32
{
33
strcpy(
_errorMessage
,
""
);
34
35
// _warningMessage[0] = '\0';
36
strcpy(
_warningMessage
, __warningMessage );
37
}
38
39
40
CoordinateTuple::CoordinateTuple
(
const
CoordinateTuple
&ct )
41
{
42
_coordinateType
= ct.
_coordinateType
;
43
44
// _errorMessage[0] = '\0';
45
strcpy(
_errorMessage
, ct.
_errorMessage
);
46
47
// _warningMessage[0] = '\0';
48
strcpy(
_warningMessage
, ct.
_warningMessage
);
49
}
50
51
52
CoordinateTuple::~CoordinateTuple
()
53
{
54
// if( strlen( _warningMessage ) > 0 )
55
// delete [] _warningMessage;
56
}
57
58
59
CoordinateTuple
&
CoordinateTuple::operator=
(
const
CoordinateTuple
&ct )
60
{
61
if
(
this
!= &ct )
62
{
63
_coordinateType
= ct.
_coordinateType
;
64
65
// _errorMessage[0] = '\0';
66
strcpy(
_errorMessage
, ct.
_errorMessage
);
67
68
// _warningMessage[0] = '\0';
69
strcpy(
_warningMessage
, ct.
_warningMessage
);
70
}
71
72
return
*
this
;
73
}
74
75
76
void
CoordinateTuple::setCoordinateType
(
MSP::CCS::CoordinateType::Enum
__coordinateType )
77
{
78
_coordinateType
= __coordinateType;
79
}
80
81
82
CoordinateType::Enum
CoordinateTuple::coordinateType
()
const
83
{
84
return
_coordinateType
;
85
}
86
87
88
void
CoordinateTuple::set
(
MSP::CCS::CoordinateType::Enum
__coordinateType,
const
char
* __warningMessage,
const
char
* __errorMessage)
89
{
90
_coordinateType
= __coordinateType;
91
strcpy(
_warningMessage
, __warningMessage );
92
strcpy(
_errorMessage
, __errorMessage );
93
}
94
95
96
void
CoordinateTuple::setErrorMessage
(
const
char
* __errorMessage )
97
{
98
// _errorMessage[0] = '\0';
99
strcpy(
_errorMessage
, __errorMessage );
100
}
101
102
103
const
char
*
CoordinateTuple::errorMessage
()
const
104
{
105
return
_errorMessage
;
106
}
107
108
109
void
CoordinateTuple::setWarningMessage
(
const
char
* __warningMessage )
110
{
111
// _warningMessage[0] = '\0';
112
strcpy(
_warningMessage
, __warningMessage );
113
}
114
115
116
const
char
*
CoordinateTuple::warningMessage
()
const
117
{
118
return
_warningMessage
;
119
}
120
121
122
123
// CLASSIFICATION: UNCLASSIFIED
Generated on Tue Feb 16 2016 14:54:02 for GeographicTranslator by doxygen 1.8.2