/* * SeriesProperties.hh * * Created on: Jul 1, 2014 * Author: AKKA */ #ifndef SPECTROPROPERTIES_HH_ #define SPECTROPROPERTIES_HH_ #include #include #include #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(""), _tableParamsId(), _hasXAxis(true), _hasYAxis(true), _hasZAxis(true), _indexDef(""), _relatedDim(0), _useLog0AsMin(false) { } SpectroProperties(const DrawingProperties& ref_) : DrawingProperties(ref_), _paramId(""), _tableParamsId(), _hasXAxis(true), _hasYAxis(true), _hasZAxis(true), _indexDef(""), _relatedDim(0), _useLog0AsMin(false) { } SpectroProperties(const SpectroProperties& pParamDrawingProperties_) : DrawingProperties(pParamDrawingProperties_), _paramId(""), _tableParamsId(), _hasXAxis( pParamDrawingProperties_._hasXAxis),_hasYAxis( pParamDrawingProperties_._hasYAxis), _hasZAxis( pParamDrawingProperties_._hasZAxis), _indexDef( pParamDrawingProperties_._indexDef), _indexList( pParamDrawingProperties_._indexList), _relatedDim( pParamDrawingProperties_._relatedDim), _useLog0AsMin( pParamDrawingProperties_._useLog0AsMin) { } SpectroProperties& operator=(const SpectroProperties& ref_) { DrawingProperties::operator=(ref_); _paramId = ref_._paramId; _tableParamsId = ref_._tableParamsId; _hasYAxis = ref_._hasYAxis; _hasXAxis = ref_._hasXAxis; _hasZAxis = ref_._hasZAxis; _indexDef = ref_._indexDef; _indexList = ref_._indexList; _relatedDim = ref_._relatedDim; _useLog0AsMin = ref_._useLog0AsMin; return *this; } virtual ~SpectroProperties() { } std::string getParamId(){ return _paramId; } void setParamId(std::string paramId_) { _paramId = paramId_; } std::string getTableParamIdByName(std::string paramName){ return _tableParamsId[paramName]; } std::map& getTableParams() { return _tableParamsId; } void addTableParam(std::string paramName, std::string paramId) { _tableParamsId[paramName] = 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; } bool getUseLog0AsMin() const { return _useLog0AsMin; } void setUseLog0AsMin(bool useLog0AsMin) { _useLog0AsMin = useLog0AsMin; } std::string getNormalization(){ return _normalization; } void setNormalization(std::string normalization){ _normalization = normalization; } private: /** * @brief Calculated paramId (from resolution). */ std::string _paramId; /** * @brief Calculated tableParamsId (from resolution). */ std::map _tableParamsId; /** * @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; /* * @brief Flag to know if 0 values must shown as Min Values in log. scale */ bool _useLog0AsMin; std::string _normalization; }; } /* namespace plot */ #endif /* SPECTROPROPERTIES_HH_ */