AsciiPlotOutput.cc 1.01 KB
/*
 * AsciiPlotOutput.cc
 *
 *  Created on: 30 oct. 2013
 *      Author: CS
 */

#include "AsciiPlotOutput.hh"
#include <fstream>

namespace plot {

AsciiPlotOutput::AsciiPlotOutput(AMDA::Parameters::ParameterManager& manager,
		boost::shared_ptr<Panel> panel) :
		XYPlot(manager, panel) {

}

AsciiPlotOutput::~AsciiPlotOutput() {

}

bool AsciiPlotOutput::draw(double startTime, double stopTime, int intervalIndex,
		bool isFirstInterval, bool isLastInterval) {
	// draw panel
	bool dataPloted = PanelPlotOutput::draw(startTime,stopTime,intervalIndex,isFirstInterval,isLastInterval);

	std::ofstream out("asciiplot.txt");
	out << *(_panel->_page) << std::endl;
	out << *_panel << std::endl;
	out.close();

	return dataPloted;
}

void AsciiPlotOutput::drawSeries(double /*startDate*/, double /*stopDate*/, int /*intervalIndex*/, std::string /*pParamId*/,
		SeriesProperties& /*pSerie*/,
		AMDA::Common::ParameterIndexComponent /*pParamIndex*/, ParameterAxes& /*param*/,
		bool /*moreThanOneSerieForAxis*/) {
}

}
/* namespace plot */