wxFreeChart
timeseriesdataset.h
1 // Name: timeseriesdataset.h
3 // Purpose: Time series dataset declaration
4 // Author: Moskvichev Andrey V.
5 // Created: 16.02.2012
6 // RCS-ID: $Id: wxAdvTable.h,v 1.3 2008/11/07 16:42:58 moskvichev Exp $
7 // Copyright: (c) 2012 Moskvichev Andrey V.
8 // Licence: wxWidgets licence
10 
11 #ifndef TIMESERIESDATASET_H_
12 #define TIMESERIESDATASET_H_
13 
14 #include <wx/xy/xydataset.h>
15 
19 class WXDLLIMPEXP_FREECHART TimeSeriesDataset : public XYDataset, public DateTimeDataset
20 {
21  DECLARE_CLASS(TimeSeriesDataset)
22 public:
23  TimeSeriesDataset(double *data, time_t *times, size_t count);
24  virtual ~TimeSeriesDataset();
25 
26  virtual size_t GetSerieCount();
27 
28  virtual wxString GetSerieName(size_t serie);
29 
30  virtual size_t GetCount(size_t serie);
31 
32  virtual double GetX(size_t index, size_t serie);
33 
34  virtual double GetY(size_t index, size_t serie);
35 
36  virtual DateTimeDataset *AsDateTimeDataset();
37 
38  //
39  // DateTimeDataset
40  //
41  virtual time_t GetDate(size_t index);
42 
43  virtual size_t GetCount();
44 
45 private:
46  double *m_data;
47  time_t *m_times;
48  size_t m_count;
49 };
50 
51 #endif /* TIMESERIESDATASET_H_ */
52 
virtual size_t GetSerieCount()=0
Returns serie count in this dataset.
virtual time_t GetDate(size_t index)=0
Returns date/time for specified index.
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.
Time series dataset.
virtual size_t GetCount()=0
Returns date/time count.
Base class for XY datasets.
Definition: xydataset.h:21
Base class for datasets, with date/time.
Definition: dataset.h:153
virtual wxString GetSerieName(size_t serie)=0
Returns serie name.