/* * ErrorBarProperties.hh * * Created on: Jul 22, 2014 * Author: AKKA */ #ifndef ERRORBARPROPERTIES_HH_ #define ERRORBARPROPERTIES_HH_ #include #include #include #include "LineProperties.hh" #include "ParameterIndexesTool.hh" namespace plot { /** * ErrorBar minMax properties. Defines minmax errorbar drawing properties for each series */ class ErrorMinMaxProperties { public: friend std::ostream& operator<<(std::ostream& out_, const ErrorMinMaxProperties& prop_); /* * Dumps properties for test. */ void dump(std::ostream& out_, std::string& prefix_); ErrorMinMaxProperties() : _originalParamMin(), _indexMin(-1,-1), _originalParamMax(), _indexMax(-1,-1), _usedParamMin(), _usedParamMax() { } ErrorMinMaxProperties(const ErrorMinMaxProperties& pErrorMinMaxProperties_) : _originalParamMin(pErrorMinMaxProperties_._originalParamMin), _indexMin(pErrorMinMaxProperties_._indexMin), _originalParamMax(pErrorMinMaxProperties_._originalParamMax), _indexMax(pErrorMinMaxProperties_._indexMax), _usedParamMin(pErrorMinMaxProperties_._usedParamMin), _usedParamMax(pErrorMinMaxProperties_._usedParamMax) { } ErrorMinMaxProperties& operator=(const ErrorMinMaxProperties& pErrorMinMaxProperties_) { _originalParamMin = pErrorMinMaxProperties_._originalParamMin; _indexMin = pErrorMinMaxProperties_._indexMin; _originalParamMax = pErrorMinMaxProperties_._originalParamMax; _indexMax = pErrorMinMaxProperties_._indexMax; _usedParamMin = pErrorMinMaxProperties_._usedParamMin; _usedParamMax = pErrorMinMaxProperties_._usedParamMax; return *this; } virtual ~ErrorMinMaxProperties() { } const std::string& getOriginalParamMax() const { return _originalParamMax; } void setOriginalParamMax(const std::string& originalParamMax) { _originalParamMax = originalParamMax; } const std::string& getOriginalParamMin() const { return _originalParamMin; } void setOriginalParamMin(const std::string& originalParamMin) { _originalParamMin = originalParamMin; } const std::string& getUsedParamMax() const { return _usedParamMax; } void setUsedParamMax(const std::string& usedParamMax) { _usedParamMax = usedParamMax; } const std::string& getUsedParamMin() const { return _usedParamMin; } void setUsedParamMin(const std::string& usedParamMin) { _usedParamMin = usedParamMin; } AMDA::Common::ParameterIndexComponent getIndexMax() const { return _indexMax; } void setIndexMax(AMDA::Common::ParameterIndexComponent indexMax) { _indexMax = indexMax; } AMDA::Common::ParameterIndexComponent getIndexMin() const { return _indexMin; } void setIndexMin(AMDA::Common::ParameterIndexComponent indexMin) { _indexMin = indexMin; } private: /** * @brief Parameter id representing the min values for the error bars in the request */ std::string _originalParamMin; /** * @brief Component index for paramMin */ AMDA::Common::ParameterIndexComponent _indexMin; /** * @brief Parameter id representing the max values for the error bars in the request */ std::string _originalParamMax; /** * @brief Component index for paramMax */ AMDA::Common::ParameterIndexComponent _indexMax; /** * @brief Parameter id representing the min values for the error bars in the plot */ std::string _usedParamMin; /** * @brief Parameter id representing the max values for the error bars in the plot */ std::string _usedParamMax; }; /** * ErrorBar properties. Defines errobar drawing properties for each series */ class ErrorBarProperties { public: friend std::ostream& operator<<(std::ostream& out_, const ErrorBarProperties& prop_); /* * Dumps properties for test. */ void dump(std::ostream& out_, std::string& prefix_); ErrorBarProperties() : _lineProperties(), _errorMinMax() { } ErrorBarProperties(const ErrorBarProperties& pErrorBarProperties_) : _lineProperties(pErrorBarProperties_._lineProperties), _errorMinMax(pErrorBarProperties_._errorMinMax) { } ErrorBarProperties& operator=(const ErrorBarProperties& pErrorBarProperties_) { _lineProperties = pErrorBarProperties_._lineProperties; _errorMinMax = pErrorBarProperties_._errorMinMax; return *this; } virtual ~ErrorBarProperties() { } const LineProperties& getLineProperties() const { return _lineProperties; } LineProperties& getLineProperties() { return _lineProperties; } void setLineProperties(const LineProperties& lineProperties) { _lineProperties = lineProperties; } const boost::shared_ptr& getErrorMinMax() const { return _errorMinMax; } void setErrorMinMax( const boost::shared_ptr& errorMinMax) { _errorMinMax = errorMinMax; } private: /** * @brief Line properties for the error bars */ LineProperties _lineProperties; /** * @brief Proprerty for min max or delta error bars */ boost::shared_ptr _errorMinMax; }; } /* namespace plot */ #endif /* ERRORBARPROPERTIES_HH_ */