-
Notifications
You must be signed in to change notification settings - Fork 21
/
Warning.h
90 lines (75 loc) · 2.14 KB
/
Warning.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//####################################################################
//
// FILENAME: Warning.h
//
// CLASSIFICATION: Unclassified
//
// DESCRIPTION:
//
// Header for the warning structure used by the CSM.
//
// LIMITATIONS: None
//
//
// SOFTWARE HISTORY:
// Date Author Comment
// ----------- ------ -------
// 01-Jun-2004 Kevin Lam CCB Change
// 02-Mar-2012 SCM Refactored interface.
// 30-Oct-2012 SCM Renamed to Warning.h
// 17-Dec-2012 BAH Documentation updates.
//
// NOTES:
//
//###################################################################
#ifndef __CSM_WARNING_H
#define __CSM_WARNING_H
#include "csm.h"
#include <string>
#include <list>
namespace csm
{
class CSM_EXPORT_API Warning
{
public:
enum WarningType
{
UNKNOWN_WARNING = 1,
DATA_NOT_AVAILABLE,
PRECISION_NOT_MET,
NEGATIVE_PRECISION,
IMAGE_COORD_OUT_OF_BOUNDS,
IMAGE_ID_TOO_LONG,
NO_INTERSECTION,
DEPRECATED_FUNCTION
};
Warning() : theWarning(UNKNOWN_WARNING), theMessage(), theFunction() {}
Warning(const WarningType& aWarningType,
const std::string& aMessage,
const std::string& aFunction)
: theWarning(aWarningType),theMessage(aMessage),theFunction(aFunction) {}
WarningType getWarning() const { return theWarning; }
const std::string& getMessage() const { return theMessage; }
const std::string& getFunction() const { return theFunction; }
void setWarning(const WarningType& aWarningType,
const std::string& aMessage,
const std::string& aFunction)
{
theWarning = aWarningType;
theMessage = aMessage;
theFunction = aFunction;
}
private:
WarningType theWarning;
//> This enumeration of the warning is used for application control.
//<
std::string theMessage;
//> This string describes the warning.
//<
std::string theFunction;
//> This string identifies the function in which the warning occurred.
//<
};
typedef std::list<Warning> WarningList;
} // namespace csm
#endif