CurveFunctionWriter.hh 927 Bytes
/*
 * CurveFunctionWriter.hh
 *
 *  Created on: Sep 19, 2014
 *      Author: AKKA
 */

#ifndef CURVEFUNCTIONWRITER_HH_
#define CURVEFUNCTIONWRITER_HH_

#include <string>
#include <map>
#include <list>

namespace plot {

class CurveFunctionWriter {
public:
	typedef std::map<std::string, double> AttributeList;
	typedef struct{double x,y,z;} CurvePoint;
	typedef std::list<CurvePoint> CurvePointList;
	typedef void (*CurveFunctionProcess)(double, AttributeList&, CurvePointList&);

	CurveFunctionWriter();
	virtual ~CurveFunctionWriter();
	
	void setFunctionName(const std::string& name);
	
	std::string getFunctionName(void);
	
	void addAttribute(const std::string& name,double value);
	
	void call(double resolution, CurvePointList &curvePointList);

private:
	std::string _functionName;

	AttributeList _attributeList;
};

} /* namespace plot */
#endif /* CURVEFUNCTIONWRITER_HH_ */