MissionInfo.hh 1.86 KB
/*
 * MissionInfo.hh
 *
 *  Created on: Oct 6, 2014
 *      Author: m.mazel
 */

#ifndef MISSIONINFO_HH_
#define MISSIONINFO_HH_

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

namespace AMDA {
namespace Info {

//Info keys for mission
#define MISSION_ID   "MISSION_ID"
#define MISSION_NAME "MISSION_NAME"
#define MISSION_DESC "MISSION_DESCRIPTION"
#define MISSION_URL  "MISSION_URL"

/**
 * @class MissionInfo
 * @brief Information about a mission.
 * @details
 */
class MissionInfo {
public:
	MissionInfo () :
		_name(""),
		_description(""),
		_url("")
	{}

	friend std::ostream& operator<<(std::ostream& out_, const MissionInfo& dsi);

	/*
	 * @brief Get mission id
	 */
	const std::string& getId() const {
		return _id;
	}

	/*
	 * @brief Set mission id
	 */
	void setId(const std::string& id) {
		_id = id;
	}

	/*
	 * @brief Get mission name
	 */
	const std::string& getName() const {
		return _name;
	}

	/*
	 * @brief Set mission name
	 */
	void setName(const std::string& name) {
		_name = name;
	}

	/*
	 * @brief Get mission description
	 */
	const std::string& getDescription() const {
		return _description;
	}

	/*
	 * @brief Set mission description
	 */
	void setDescription(const std::string& description) {
		_description = description;
	}

	/*
	 * @brief Get mission URL
	 */
	const std::string& getUrl() const {
		return _url;
	}

	/*
	 * @brief Set mission URL
	 */
	void setUrl(const std::string& url) {
		_url = url;
	}

	/*
	 * @brief Get a map of mission info
	 */
	std::vector<std::pair<std::string,std::string>> getInfoMap();

protected:
	std::string	_id;

	std::string _name;
	std::string _description;
	std::string _url;
};

typedef boost::shared_ptr<MissionInfo> MissionInfoSPtr;
typedef std::map<std::string,MissionInfoSPtr> MissionInfoMap;

} /* namespace Info */
} /* namespace AMDA */


#endif /* MISSIONINFO_HH_ */