SeriesProperties.cc 1.79 KB
/*
 * SeriesProperties.cc
 *
 *  Created on: Dec 4, 2013
 *      Author: amdadev
 */
#ifndef SERIESPROPERTIES_CC_
#define SERIESPROPERTIES_CC_

#include "SeriesProperties.hh"
#include "DrawingProperties.hh"
#include <sstream>

namespace plot {

/*
 * Dumps properties for test.
 */
void SeriesProperties::dump(std::ostream& out_, std::string& prefix_) {
	out_ << "[SERIES PROPERTIES]" << std::endl;
	out_ << prefix_ << "index=" << getIndex().getDim1Index() << "x" << getIndex().getDim2Index() << std::endl;
	out_ << prefix_ << "id=" << getId() << std::endl;
	out_ << prefix_ << "xAxisId=" << getXAxisId() << std::endl;
	out_ << prefix_ << "yAxisId=" << getYAxisId() << std::endl;;
	out_ << prefix_ << "zAxisId=" << getZAxisId() << std::endl;;
	out_ << prefix_ << "colorSerieId=" << getColorSerieId() << std::endl;
	out_ << prefix_ << "paramId=" << getParamId() << std::endl;;
	getColor().dump(out_, prefix_);
	getLineProperties().dump(out_, prefix_);
	getSymbolProperties().dump(out_, prefix_);
}

std::ostream& operator<<(std::ostream& out_, const SeriesProperties& prop_) {
	out_ << "[SERIES PROPERTIES]" << std::endl;
	out_ << "{" << std::endl;
	out_ << "  index=" << prop_._index.getDim1Index() << "x" << prop_._index.getDim2Index() << std::endl;
	out_ << "  id=" << prop_._id << std::endl;
	out_ << "  xAxis Id = " << prop_.getXAxisId() << std::endl;
	out_ << "  yAxis Id = " << prop_.getYAxisId() << std::endl;
	out_ << "  zAxis Id = " << prop_.getZAxisId() << std::endl;
	out_ << "  colorSerieId = " << prop_.getColorSerieId() << std::endl;
	out_ << "  default color = " << prop_.getColor() << std::endl;
	out_ << "  " << prop_.getLineProperties() << std::endl;
	out_ << "  " << prop_.getSymbolProperties() << std::endl;
	out_ << "}" << std::endl;
	return out_;
}

}  // namespace plot

#endif /* SERIESPROPERTIES_CC_ */