InstrumentInfo.hh 3.17 KB
/*
 * InstrumentInfo.hh
 *
 *  Created on: Oct 6, 2014
 *      Author: m.mazel
 */

#include <iostream>
#include <map>
#include <boost/shared_ptr.hpp>

#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_ */