wxFreeChart
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Dataset Class Referenceabstract

Base class for all datasets (XYDatasets, XYZDatasets, CategoryDatasets, OHLCDatasets, etc). More...

#include <dataset.h>

Inheritance diagram for Dataset:
Inheritance graph
[legend]
Collaboration diagram for Dataset:
Collaboration graph
[legend]

Public Member Functions

void SetRenderer (Renderer *renderer)
 Sets renderer for this dataset. More...
 
RendererGetBaseRenderer ()
 
void BeginUpdate ()
 Called to begin dataset update. More...
 
void EndUpdate ()
 Called to end dataset update. More...
 
virtual size_t GetSerieCount ()=0
 Returns serie count in this dataset. More...
 
virtual size_t GetCount (size_t serie)=0
 Returns value count in serie specified by index. More...
 
virtual wxString GetSerieName (size_t serie)=0
 Returns serie name. More...
 
virtual double GetMinValue (bool vertical)=0
 Returns minimal value. More...
 
virtual double GetMaxValue (bool vertical)=0
 Returns maximal value. More...
 
virtual DateTimeDatasetAsDateTimeDataset ()
 
void AddMarker (Marker *marker)
 Adds marker to plot. More...
 
size_t GetMarkersCount ()
 Returns marker count. More...
 
MarkerGetMarker (size_t index)
 Returns marker at specified index. More...
 
virtual void NeedRedraw (DrawObject *obj)
 
void DatasetChanged ()
 Called to indicate, that dataset is changed. More...
 
- Public Member Functions inherited from RefObject
void AddRef ()
 
void Unref ()
 
int RefCount ()
 

Protected Member Functions

virtual bool AcceptRenderer (Renderer *r)=0
 Checks whether renderer is acceptable by this dataset. More...
 

Protected Attributes

Rendererm_renderer
 

Detailed Description

Base class for all datasets (XYDatasets, XYZDatasets, CategoryDatasets, OHLCDatasets, etc).

Definition at line 39 of file dataset.h.

Member Function Documentation

virtual bool Dataset::AcceptRenderer ( Renderer r)
protectedpure virtual

Checks whether renderer is acceptable by this dataset.

TODO: this method must be removed, because acceptable renderer type depends on plot type.

Implemented in OHLCDataset, XYDataset, and CategoryDataset.

void Dataset::AddMarker ( Marker marker)

Adds marker to plot.

Plot takes ownership of marker.

Parameters
markermarker to be added
void Dataset::BeginUpdate ( )

Called to begin dataset update.

Each call must have corresponding EndUpdate call. Increment dataset update counter.

void Dataset::DatasetChanged ( )

Called to indicate, that dataset is changed.

For call by derivate classes.

void Dataset::EndUpdate ( )

Called to end dataset update.

Decrement dataset update counter, and fires DatasetChanged event when counter equal zero.

virtual size_t Dataset::GetCount ( size_t  serie)
pure virtual

Returns value count in serie specified by index.

Parameters
serieindex
Returns
value count

Implemented in XYDynamicDataset, XYSimpleDataset, GanttDataset, OHLCDataset, CategoryDataset, Polynom, VectorDataset, MovingAverage, SineFunction, JulianTimeSeriesDataset, and TimeSeriesDataset.

Marker* Dataset::GetMarker ( size_t  index)

Returns marker at specified index.

Parameters
indexindex of marker
Returns
marker at specified index
size_t Dataset::GetMarkersCount ( )

Returns marker count.

Returns
marker count
virtual double Dataset::GetMaxValue ( bool  vertical)
pure virtual

Returns maximal value.

Parameters
verticalfor datasets with XY coordinates, specifies direction
Returns
maximal value

Implemented in XYDataset, OHLCDataset, and CategoryDataset.

virtual double Dataset::GetMinValue ( bool  vertical)
pure virtual

Returns minimal value.

Parameters
verticalfor datasets with XY coordinates, specifies direction
Returns
minimal value

Implemented in XYDataset, OHLCDataset, and CategoryDataset.

virtual size_t Dataset::GetSerieCount ( )
pure virtual
virtual wxString Dataset::GetSerieName ( size_t  serie)
pure virtual
void Dataset::SetRenderer ( Renderer renderer)

Sets renderer for this dataset.

Parameters
renderernew renderer

The documentation for this class was generated from the following file: