InstrumentInfo.hh
3.21 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
/*
* InstrumentInfo.hh
*
* Created on: Oct 6, 2014
* Author: m.mazel
*/
#include <iostream>
#include <map>
#include <boost/shared_ptr.hpp>
#include <vector>
#include <utility>
#ifndef INSTRUMENTINFO_HH_
#define INSTRUMENTINFO_HH_
namespace AMDA {
namespace Info {
//Info keys for instrument
#define INSTRUMENT_ID "INSTRUMENT_ID"
#define INSTRUMENT_NAME "INSTRUMENT_NAME"
#define INSTRUMENT_DESC "INSTRUMENT_DESCRIPTION"
#define INSTRUMENT_URL "INSTRUMENT_URL"
#define INSTRUMENT_MEAS "INSTRUMENT_MEASUREMENT_TYPE"
#define INSTRUMENT_PI "INSTRUMENT_PI"
#define INSTRUMENT_TYPE "INSTRUMENT_TYPE"
/**
* @class InstrumentInfo
* @brief Information about an instrument.
* @details
*/
class InstrumentInfo {
public:
InstrumentInfo () :
_id(""),
_name(""),
_description(""),
_url(""),
_measurement(""),
_pi(""),
_instrument_type(""),
_missionId("")
{}
friend std::ostream& operator<<(std::ostream& out_, const InstrumentInfo& dsi);
/*
* @brief Get isntrument id
*/
const std::string& getId() const {
return _id;
}
/*
* @brief Set instrument id
*/
void setId(const std::string& id) {
_id = id;
}
/*
* @brief Get instrument name
*/
const std::string& getName() const {
return _name;
}
/*
* @brief Set instrument name
*/
void setName(const std::string& name) {
_name = name;
}
/*
* @brief Get instrument description
*/
const std::string& getDescription() const {
return _description;
}
/*
* @brief Set instrument description
*/
void setDescription(const std::string& description) {
_description = description;
}
/*
* @brief Get instrument URL
*/
const std::string& getUrl() const {
return _url;
}
/*
* @brief Set instrument URL
*/
void setUrl(const std::string& url) {
_url = url;
}
/*
* @brief Get instrument measurement
*/
const std::string& getMeasurement() const {
return _measurement;
}
/*
* @brief Set instrument measurement
*/
void setMeasurement(const std::string& measurement) {
_measurement = measurement;
}
/*
* @brief Get instrument PI
*/
const std::string& getPi() const {
return _pi;
}
/*
* @brief Set instrument PI
*/
void setPi(const std::string& pi) {
_pi = pi;
}
/*
* @brief Get instrument type
*/
const std::string& getInstrumentType() const {
return _instrument_type;
}
/*
* @brief Set instrument type
*/
void setInstrumentType(const std::string& instrumentType) {
_instrument_type = instrumentType;
}
/*
* @brief Get associated instrument mission id
*/
const std::string& getMissionId() const {
return _missionId;
}
/*
* @brief Set associated instrument mission id
*/
void setMissionId(const std::string& missionId) {
_missionId = missionId;
}
/*
* @brief Get a map of instrument info
*/
std::vector<std::pair<std::string,std::string>> getInfoMap();
protected:
std::string _id;
std::string _name;
std::string _description;
std::string _url;
std::string _measurement;
std::string _pi;
std::string _instrument_type;
std::string _missionId;
};
typedef boost::shared_ptr<InstrumentInfo> InstrumentInfoSPtr;
typedef std::map<std::string,InstrumentInfoSPtr> InstrumentInfoMap;
} /* namespace Info */
} /* namespace AMDA */
#endif /* INSTRUMENTINFO_HH_ */