wxFreeChart
ganttdataset.h
1 // Name: ganttdataset.h
3 // Purpose: gantt dataset declaration
4 // Author: Moskvichev Andrey V.
5 // Created: 2009/03/23
6 // Copyright: (c) 2008-2010 Moskvichev Andrey V.
7 // Licence: wxWidgets licence
9 
10 #ifndef GANTTDATASET_H_
11 #define GANTTDATASET_H_
12 
13 //#include <wx/dataset.h>
14 #include <wx/category/categorydataset.h>
15 
16 class GanttRenderer;
17 class GanttDataset;
18 
23 class WXDLLIMPEXP_FREECHART GanttDatasetDateHelper : public DateTimeDataset
24 {
25 public:
26  GanttDatasetDateHelper(GanttDataset *ganttDataset);
27  virtual ~GanttDatasetDateHelper();
28 
29  virtual time_t GetDate(size_t index);
30 
31  virtual size_t GetCount();
32 
33 private:
34  GanttDataset *m_ganttDataset;
35 };
36 
40 class WXDLLIMPEXP_FREECHART GanttDataset : public CategoryDataset
41 {
42  DECLARE_CLASS(GanttDataset)
43 public:
49  GanttDataset(size_t dateCount);
50  virtual ~GanttDataset();
51 
52  virtual DateTimeDataset *AsDateTimeDataset();
53 
58  virtual size_t GetCount() = 0;
59 
66  virtual time_t GetStart(size_t index, size_t serie) = 0;
67 
74  virtual time_t GetEnd(size_t index, size_t serie) = 0;
75 
81  virtual size_t GetCount(size_t serie);
82 
83  virtual time_t GetMinStart();
84 
85  virtual time_t GetMaxEnd();
86 
87  time_t GetDateInterval();
88 
89  size_t GetDateCount();
90 
91  GanttRenderer *GetRenderer()
92  {
93  return (GanttRenderer *) m_renderer;
94  }
95 
96 private:
97  GanttDatasetDateHelper m_dateHelper;
98 
99  size_t m_dateCount;
100 };
101 
102 #endif /* GANTTDATASET_H_ */
virtual time_t GetDate(size_t index)=0
Returns date/time for specified index.
Dataset for data values in form [category name, value].
Gantt data renderer.
Definition: ganttrenderer.h:20
Gantt chart dataset base class.
Definition: ganttdataset.h:40
Helper used to access gantt dataset as datetime dataset.
Definition: ganttdataset.h:23
virtual size_t GetCount()=0
Returns date/time count.
virtual size_t GetCount()=0
Returns category count.
Base class for datasets, with date/time.
Definition: dataset.h:153