Version: 0.6.0
juliantimeseriesdataset.h
1 // Name: JulianTimeSeriesDataset.h
3 // Purpose: An XY dataset where the X axis is a Julian Date
4 // Author: Carsten Arnholm
5 // Created: 2010/08/19
6 // Licence: wxWidgets licence
8 
9 #ifndef TIMESERIESDATA_H
10 #define TIMESERIESDATA_H
11 
12 #include <map> // XXX stl classes must be removed!
13 #include <vector>
14 using std::vector;
15 
16 #include <wx/dataset.h>
17 #include <wx/xy/xydataset.h>
18 
19 
21 {
22 public:
23  typedef std::pair<double,double> TimePair; // a pair with time (julian date) and value data
24 
26  JulianTimeSeriesDataset(const vector<TimePair>& data);
27  virtual ~JulianTimeSeriesDataset();
28 
29  virtual size_t GetSerieCount();
30 
31  virtual wxString GetSerieName(size_t serie);
32 
33  virtual size_t GetCount(size_t serie);
34 
35  virtual double GetX(size_t index, size_t serie);
36 
37  virtual double GetY(size_t index, size_t serie);
38 
39  void clear();
40  void reserve(size_t length);
41  void push_back(const TimePair& tvpair);
42 
43 private:
44  vector<TimePair> m_data; // XXX remove this, stl is not allowed
45 };
46 
47 #endif // TIMESERIESDATA_H
48 
virtual double GetY(size_t index, size_t serie)
Definition: juliantimeseriesdataset.cpp:42
virtual double GetX(size_t index, size_t serie)
Definition: juliantimeseriesdataset.cpp:37
virtual size_t GetSerieCount()
Definition: juliantimeseriesdataset.cpp:22
Definition: juliantimeseriesdataset.h:20
virtual wxString GetSerieName(size_t serie)
Definition: juliantimeseriesdataset.cpp:32
virtual size_t GetCount(size_t serie)
Definition: juliantimeseriesdataset.cpp:27
Definition: xydataset.h:21