FillSerieConstant.cc 3.52 KB
/*
 * FillSerieConstant.cc
 *
 *  Created on: 14/08/2014
 *      Author: AKKA
 */

#include "FillSerieConstant.hh"


namespace plot {

FillSerieConstant::FillSerieConstant() :
	_serieId(-1),
	_serieIndex(AMDA::Common::ParameterIndexComponent(-1,-1)),
	_constantId(-1),
	_colorGreaterSpecified(false),
	_colorGreater(),
	_colorLessSpecified(false),
	_colorLess()
{
}

FillSerieConstant::FillSerieConstant(const FillSerieConstant& ref_) :
	_serieId(ref_._serieId),
	_serieIndex(ref_._serieIndex),
	_constantId(ref_._constantId),
	_colorGreaterSpecified(ref_._colorGreaterSpecified),
	_colorGreater(ref_._colorGreater),
	_colorLessSpecified(ref_._colorLessSpecified),
	_colorLess(ref_._colorLess)
{
}

FillSerieConstant& FillSerieConstant::operator=(const FillSerieConstant& ref_) {
	_serieId			= ref_._serieId;
	_serieIndex         = ref_._serieIndex;
	_constantId			= ref_._constantId;
	_colorGreaterSpecified	= ref_._colorGreaterSpecified;
	_colorGreater				= ref_._colorGreater;
	_colorLessSpecified	= ref_._colorLessSpecified;
	_colorLess				= ref_._colorLess;
	return *this;
}

FillSerieConstant::~FillSerieConstant() {

}

const Color& FillSerieConstant::getColorGreater() const {
	return _colorGreater;
}
Color& FillSerieConstant::getColorGreater() {
	return _colorGreater;
}
void FillSerieConstant::setColorGreater(const Color& colorGreater) {
	_colorGreater = colorGreater;
}

const Color& FillSerieConstant::getColorLess() const {
	return _colorLess;
}
Color& FillSerieConstant::getColorLess() {
	return _colorLess;
}
void FillSerieConstant::setColorLess(const Color& colorLess) {
	_colorGreater = colorLess;
}

int FillSerieConstant::getConstantId() const {
	return _constantId;
}

void FillSerieConstant::setConstantId(int constantId) {
	_constantId = constantId;
}

int FillSerieConstant::getSerieId() const {
	return _serieId;
}

void FillSerieConstant::setSerieId(int serieId) {
	_serieId = serieId;
}

AMDA::Common::ParameterIndexComponent& FillSerieConstant::getSerieIndex()
{
	return _serieIndex;
}

void FillSerieConstant::setSerieIndex(AMDA::Common::ParameterIndexComponent& serieIndex)
{
	_serieIndex = serieIndex;
}

bool FillSerieConstant::isColorGreaterSpecified() const {
	return _colorGreaterSpecified;
}

void FillSerieConstant::setColorGreaterSpecified(bool colorGreaterSpecified) {
	_colorGreaterSpecified = colorGreaterSpecified;
}

bool FillSerieConstant::isColorLessSpecified() const {
	return _colorLessSpecified;
}

void FillSerieConstant::setColorLessSpecified(bool colorLessSpecified) {
	_colorLessSpecified = colorLessSpecified;
}

void FillSerieConstant::dump (std::ostream& out_, std::string& prefix_){
	out_ << prefix_ << "serieId="<< _serieId << std::endl;
	out_ << prefix_ << "constantId="<< _constantId << std::endl;
	out_ << prefix_ << "colorGreaterSpecified="<< _colorGreaterSpecified << std::endl;
	_colorGreater.dump(out_, prefix_);
	out_ << prefix_ << "colorLessSpecified="<< _colorLessSpecified << std::endl;
	_colorLess.dump(out_, prefix_);
}

std::ostream& operator<<(std::ostream& out_, const FillSerieConstant& prop_){
	out_ << "[FILL SERIE CONSTANT]" << std::endl;
	out_ << "{" << std::endl;
	out_ << "  serieId = "<< prop_._serieId << std::endl;
	out_ << "  constantId = "<< prop_._constantId << std::endl;
	out_ << "  colorGreaterSpecified = "<<prop_._colorGreaterSpecified << std::endl;
	out_ << "  colorGreater = "<<prop_._colorGreater << std::endl;
	out_ << "  colorLessSpecified = "<<prop_._colorLessSpecified << std::endl;
	out_ << "  colorLess = "<<prop_._colorLess << std::endl;
	out_ << "}" << std::endl;
	return out_;
}

} /* namespace plot */