wxFreeChart
sinefunction.h
1 // Name: sinefunction.h
3 // Purpose: sine function dataset declaration
4 // Author: Moskvichev Andrey V.
5 // Created: 2008/11/07
6 // Copyright: (c) 2008-2010 Moskvichev Andrey V.
7 // Licence: wxWidgets licence
9 
10 #ifndef SINEFUNCTION_H_
11 #define SINEFUNCTION_H_
12 
13 #include <wx/xy/xydataset.h>
14 
18 class WXDLLIMPEXP_FREECHART SineFunction : public XYDataset
19 {
20 public:
28  SineFunction(double a, double minX, double maxX, double step);
29  virtual ~SineFunction();
30 
31  virtual double GetX(size_t index, size_t serie);
32 
33  virtual double GetY(size_t index, size_t serie);
34 
35  virtual size_t GetCount(size_t serie);
36 
37  virtual size_t GetSerieCount();
38 
39  virtual wxString GetSerieName(size_t serie);
40 
41 private:
42  double m_a;
43 
44  double m_minX;
45  double m_maxX;
46  double m_step;
47 };
48 
49 #endif /*SINEFUNCTION_H_*/
Sine function of type: y = a * sin(x)
Definition: sinefunction.h:18
virtual size_t GetSerieCount()=0
Returns serie count in this dataset.
virtual double GetX(size_t index, size_t serie)=0
Returns x value at index.
virtual double GetY(size_t index, size_t serie)=0
Returns y value at index.
virtual size_t GetCount(size_t serie)=0
Returns value count in serie specified by index.
Base class for XY datasets.
Definition: xydataset.h:21
virtual wxString GetSerieName(size_t serie)=0
Returns serie name.