Blame view

src/ParamOutputImpl/Plot/CurveFunction/CurveFunctionWriter.hh 927 Bytes
fbe3c2bb   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
 * 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_ */