ParameterInfo.hh 1.37 KB
/*
 * ParameterInfo.hh
 *
 *  Created on: Mar 18, 2016
 *      Author: b.renard
 */

#ifndef PARAMETERINFO_HH_
#define PARAMETERINFO_HH_

#include "ParamOutput.hh"

#include "ParamMgr.hh"
#include "ParameterInfoFileWriter.hh"

namespace AMDA {
namespace Parameters {

/**
 * @class ParameterInfo
 * @brief Get information about a given parameter.
 * @details
 */
class ParameterInfo: public AMDA::Parameters::ParamOutput {
public:
	/**
	 * Constructor.
	 */
	ParameterInfo(AMDA::Parameters::ParameterManager& pParameterManager);
	/**
	 * Destructor.
	 */
	virtual ~ParameterInfo();

	// Getter methods
	const std::string& getParamName() const { return _paramName; }

	// Setter methods
	void setParamName(const std::string& paramName) { _paramName = paramName; }

	/**
	 * @overload DataClient::establishConnection()
	*/
	virtual void establishConnection();

	/**
	 * @overload ParamOutput::apply()
	 * @brief Empty method.
	*/
	 virtual void apply() {}

protected:

	/**
	 * @overload ParamOutput::init()
	*/
	virtual void init();

private:
	AMDA::Parameters::Parameter* 		 _parameter;
	std::string      _paramName;

	std::vector<std::string> getComponents();

	void writeTable(boost::shared_ptr<AMDA::Info::ParamTable> table1SPtr, AMDA::ParameterInfo::ParameterInfoFileWriter& fileWriter, std::string relatedDim);
};

} /* namespace Parameters */
} /* namespace AMDA */
#endif /* PARAMETERINFO_HH_ */