Version: 0.6.0
ganttsimpledataset.h
1 // Name: ganttsimpledataset.h
3 // Purpose: gantt simple dataset declaration
4 // Author: Moskvichev Andrey V.
5 // Created: 2009/11/25
6 // Copyright: (c) 2009 Moskvichev Andrey V.
7 // Licence: wxWidgets licence
9 
10 #ifndef GANTTSIMPLEDATASET_H_
11 #define GANTTSIMPLEDATASET_H_
12 
13 #include <wx/gantt/ganttdataset.h>
14 
15 #include <wx/dynarray.h>
16 
17 class WXDLLIMPEXP_FREECHART GanttSerie
18 {
19 public:
20  struct TaskTime
21  {
22  time_t start;
23  time_t end;
24  };
25 
26  GanttSerie(TaskTime *tasks, size_t taskCount, const wxString &name);
27  virtual ~GanttSerie();
28 
29  time_t GetStart(size_t index);
30 
31  time_t GetEnd(size_t index);
32 
33  const wxString &GetName();
34 
35 private:
36  TaskTime *m_taskTimes;
37  size_t m_taskTimesCount;
38 
39  wxString m_name;
40 };
41 
42 WX_DECLARE_OBJARRAY(GanttSerie *, GanttSerieArray);
43 
47 class WXDLLIMPEXP_FREECHART GanttSimpleDataset : public GanttDataset
48 {
49 public:
56  GanttSimpleDataset(size_t dateCount, const wxChar **taskNames, size_t taskNamesCount);
57  virtual ~GanttSimpleDataset();
58 
63  void AddSerie(GanttSerie *serie);
64 
65  virtual wxString GetName(size_t index);
66 
67  virtual double GetValue(size_t index, size_t serie);
68 
69  virtual size_t GetSerieCount();
70 
71  virtual wxString GetSerieName(size_t serie);
72 
73  virtual size_t GetCount();
74 
75  virtual time_t GetStart(size_t index, size_t serie);
76 
77  virtual time_t GetEnd(size_t index, size_t serie);
78 
79 private:
80  wxArrayString m_taskNames;
81  GanttSerieArray m_series;
82 };
83 
84 #endif /* GANTTSIMPLEDATASET_H_ */
virtual time_t GetStart(size_t index, size_t serie)=0
Definition: ganttsimpledataset.h:20
virtual size_t GetSerieCount()=0
virtual double GetValue(size_t index, size_t serie)=0
Definition: ganttsimpledataset.h:47
Definition: ganttsimpledataset.h:17
virtual wxString GetName(size_t index)=0
virtual size_t GetCount()=0
Definition: ganttdataset.h:40
virtual time_t GetEnd(size_t index, size_t serie)=0
virtual wxString GetSerieName(size_t serie)=0