SpectroProperties.hh 3.25 KB
/*
 * SeriesProperties.hh
 *
 *  Created on: Jul 1, 2014
 *      Author: AKKA
 */

#ifndef SPECTROPROPERTIES_HH_
#define SPECTROPROPERTIES_HH_

#include <iostream>
#include <cmath>
#include <string>

#include "DrawingProperties.hh"

namespace plot {

/**
 * Drawing properties for a parameter spectro.
 */
class SpectroProperties: public DrawingProperties {
public:

	friend std::ostream& operator<<(std::ostream& out_,
			const SpectroProperties& lprop_);

	/*
	 * @brief Dumps properties for test.
	 */
	void dump(std::ostream& out_, std::string& prefix_);

	SpectroProperties() :
			DrawingProperties(), _paramId(""),
			_hasXAxis(true), _hasYAxis(true), _hasZAxis(true), _indexDef(""),
			_relatedDim(0) {
	}

	SpectroProperties(const DrawingProperties& ref_) :
			DrawingProperties(ref_), _paramId(""),
			_hasXAxis(true), _hasYAxis(true), _hasZAxis(true), _indexDef(""),
			_relatedDim(0) {

	}

	SpectroProperties(const SpectroProperties& pParamDrawingProperties_) :
			DrawingProperties(pParamDrawingProperties_), _paramId(""), _hasXAxis(
					pParamDrawingProperties_._hasXAxis),_hasYAxis(
					pParamDrawingProperties_._hasYAxis), _hasZAxis(
					pParamDrawingProperties_._hasZAxis), _indexDef(
					pParamDrawingProperties_._indexDef), _indexList(
					pParamDrawingProperties_._indexList), _relatedDim(
					pParamDrawingProperties_._relatedDim) {
	}

	SpectroProperties& operator=(const SpectroProperties& ref_) {
		DrawingProperties::operator=(ref_);
		_paramId    = ref_._paramId;
		_hasYAxis   = ref_._hasYAxis;
		_hasXAxis   = ref_._hasXAxis;
		_hasZAxis   = ref_._hasZAxis;
		_indexDef   = ref_._indexDef;
		_indexList  = ref_._indexList;
		_relatedDim = ref_._relatedDim;
		return *this;
	}

	virtual ~SpectroProperties() {
	}

	std::string getParamId(){
		return _paramId;
	}

	void setParamId(std::string paramId_) {
		_paramId = paramId_;
	}

	bool hasXAxis() const {
		return _hasXAxis;
	}

	void setXAxis(bool hasXAxis) {
		_hasXAxis = hasXAxis;
	}

	bool hasYAxis() const {
		return _hasYAxis;
	}

	void setYAxis(bool hasYAxis) {
		_hasYAxis = hasYAxis;
	}

	bool hasZAxis() const {
		return _hasZAxis;
	}

	void setZAxis(bool hasZAxis) {
		_hasZAxis = hasZAxis;
	}

	std::string getIndexDef() const {
		return _indexDef;
	}

	void setIndexDef(std::string indexDef) {
		_indexDef = indexDef;
	}

	AMDA::Common::ParameterIndexComponentList& getIndexes()
	{
		return _indexList;
	}

	void setIndexes(AMDA::Common::ParameterIndexComponentList indexList)
	{
		_indexList = indexList;
	}

	int getRelatedDim() const
	{
		return _relatedDim;
	}

	void setRelatedDim(int relatedDim)
	{
		_relatedDim = relatedDim;
	}

private:
	/**
	 * @brief Calculated paramId (from resolution).
	 */
	std::string _paramId;

	/**
	 * @brief Flag that indicates the serie has X Axis
	 */
	bool _hasXAxis;

	/**
	 * @brief Flag that indicates the serie has Y Axis (tickplot has no Y axis)
	 */
	bool _hasYAxis;

	/**
	 * @brief Flag that indicates the spectro has Z Axis (= colorAxis)
	 */
	bool _hasZAxis;

	/**
	 * @brief Index definition (give by the request)
	 */
	std::string _indexDef;

	/*
	 * @brief List of components used by the spectro
	 */
	AMDA::Common::ParameterIndexComponentList _indexList;

	/*
	 * @brief Related dimension
	 */
	int _relatedDim;
};

} /* namespace plot */

#endif /* SPECTROPROPERTIES_HH_ */