rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvCombinedChartDataSet Class Reference

Abstract base class for combined data sets. More...

#include <ilviews/charts/data.h>

Inheritance diagram for IlvCombinedChartDataSet:
IlvChartDataSet IlvAddChartDataSet IlvHiLoChartDataSet IlvPieChartDataSet IlvStacked100ChartDataSet

List of all members.

Public Member Functions

void addDataSet (IlvChartDataSet *dataSet)
 Adds a component data set to the combined data set.
virtual IlUInt getDataCount () const
 Returns the number of considered data points.
IlvChartDataSetgetDataSet (IlUInt index=0) const
 Returns a component data set of the combined data set.
IlUInt getDataSetIndex (const IlvChartDataSet *dataSet) const
 Returns the index of a component data set in the combined data set.
IlUInt getDataSetsCount () const
 Returns the number of component data sets.
virtual IlUInt getIndexInCombined (const IlvChartDataSet *dataSet, IlUInt indexInDataSet) const
 Maps a point index in a component data set to an index in the combined data set.
virtual IlUInt getIndexInDataSet (IlvChartDataSet *&dataSet, IlUInt indexInCombined) const
 Maps a point index in the current combined data set to an index in a component data set.
virtual const IlvCoordIntervalgetXRange () const
 Returns the abscissa bounding values of the managed data.
virtual const IlvCoordIntervalgetYRange () const
 Returns the ordinate bounding values of the managed data.
virtual void insertDataSet (IlvChartDataSet *dataSet, IlUInt index=0)
 Inserts a component data set into a combined data set.
virtual IlBoolean isIncreasingOnX () const
 Indicates whether the managed data items have increasing abscissa values.
virtual void removeDataSet (IlUInt index=0)
 Removes a component data set from the combined data set.
void removeDataSets ()
 Removes all the component data sets from the combined data set.
virtual IlBoolean retrieveDataSetPoint (IlvChartDataSet *&dataSet, IlUInt ptidx, const IlvDoublePoint &point, IlUInt &dataSetPointIndex, IlvDoublePoint &dataSetPoint) const =0
 Retrieves from a data point of the current combined data set the corresponding data point of a component data set.
virtual void setDataCount (IlUInt count)
 Sets the number of considered data points from the number of data items considered in the component data sets.
virtual void setDataSet (IlvChartDataSet *dataSet, IlUInt index=0)
 Sets a component data set of the combined data set.
virtual IlBoolean setPoint (IlUInt ptidx, const IlvDoublePoint &point)
 Propagates the change made to a given data point of the combined data set to the component data sets.
virtual void updateDataCount ()
 Updates the number of considered data points.
virtual IlBoolean useDataSet (const IlvChartDataSet *dataSet) const
 Indicates whether a data set is one of the data sets that make up the combined data set.
virtual void write (IlvOutputFile &file) const
 Writes the attributes of the current object in a file.

Protected Member Functions

 IlvCombinedChartDataSet (const IlvCombinedChartDataSet &dataSet)
 Constructor.
 IlvCombinedChartDataSet (IlvInputFile &file)
 Constructor.
 IlvCombinedChartDataSet ()
 Constructor.

Detailed Description

Abstract base class for combined data sets.

Library: ilvcharts

This is an abstract subclass of IlvChartDataSet that allows you to define a data set that is a combination of other data sets. For example, you can define a data set as the addition of any number of other data sets. These data sets that make up the combined data set are called component data sets. The nth data point of such a combined data set will correspond to the sum of the nth data points of all the component data sets.

The data points of the combined data set are not stored. They are computed from the component data sets whenever needed.

Warning:
[note] IlvCombinedChartDataSet is an abstract class. Its constructors are defined as protected since it is not possible to create an instance of this class directly.
See also:
IlvChartDataSet, IlvAbstractChartData.

Constructor & Destructor Documentation

IlvCombinedChartDataSet::IlvCombinedChartDataSet (  )  [protected]

Constructor.

Initializes a new IlvCombinedChartDataSet object.

IlvCombinedChartDataSet::IlvCombinedChartDataSet ( IlvInputFile file  )  [protected]

Constructor.

Initializes a new IlvCombinedChartDataSet object from the description read in the input file named file.

Parameters:
file The file used to initialize the current data set.
IlvCombinedChartDataSet::IlvCombinedChartDataSet ( const IlvCombinedChartDataSet dataSet  )  [protected]

Constructor.

Initializes a new IlvCombinedChartDataSet object that is a copy of dataSet.

Parameters:
dataSet The data set used to initialize the current one.

Member Function Documentation

void IlvCombinedChartDataSet::addDataSet ( IlvChartDataSet dataSet  ) 

Adds a component data set to the combined data set.

A listener is added to the new data set so that the number of data items considered in the data sets that make up the combined data set can be updated when the data of this new data set are modified.

Warning:
[note] The number of data items considered in the data sets that make up the combined data set is updated by using the IlvCombinedChartDataSet::updateDataCount method.
Parameters:
dataSet The new data set that is added to the combined data set.
virtual IlUInt IlvCombinedChartDataSet::getDataCount (  )  const [virtual]

Returns the number of considered data points.

Returns:
The number of data points considered for the current combined data set.
Warning:
[note] The considered data points are not stored. They are computed on the fly whenever needed from the data points of the component data sets.

Implements IlvChartDataSet.

IlvChartDataSet* IlvCombinedChartDataSet::getDataSet ( IlUInt  index = 0  )  const

Returns a component data set of the combined data set.

Parameters:
index The index of the data set that is returned.
Returns:
A pointer to the data set at the index index (if it exists) in the collection of data sets that make up the combined data set and 0 otherwise.
IlUInt IlvCombinedChartDataSet::getDataSetIndex ( const IlvChartDataSet dataSet  )  const

Returns the index of a component data set in the combined data set.

Parameters:
dataSet The component data set for which we want to get the index.
Returns:
The index of the data set dataSet in the combined data set if dataSet is one of the data sets that make up the current combined data set. Otherwise, it returns IlvBadIndex.
IlUInt IlvCombinedChartDataSet::getDataSetsCount (  )  const

Returns the number of component data sets.

Returns:
The number of data sets that make up the combined data set.
virtual IlUInt IlvCombinedChartDataSet::getIndexInCombined ( const IlvChartDataSet dataSet,
IlUInt  indexInDataSet 
) const [virtual]

Maps a point index in a component data set to an index in the combined data set.

Maps the point index indexInDataSet in the data set dataSet to an index in the current combined data set.

Parameters:
dataSet The data set considered in the combined data set.
indexInDataSet The index of the data point in the data set dataSet.
Warning:
[note] The default implementation returns the same index.

Reimplemented in IlvHiLoChartDataSet, and IlvPieChartDataSet.

virtual IlUInt IlvCombinedChartDataSet::getIndexInDataSet ( IlvChartDataSet *&  dataSet,
IlUInt  indexInCombined 
) const [virtual]

Maps a point index in the current combined data set to an index in a component data set.

Maps the point index indexInCombined in the current combined data set to an index in the corresponding data set among the data sets that make up the current combined data set.

Parameters:
dataSet This parameter is set to the corresponding data set in the combined data set.
indexInCombined The index of the point in the combined data set.
Warning:
[note] The default implementation returns the same index and set dataSet as the first data set in the combined data set.

Reimplemented in IlvHiLoChartDataSet, and IlvPieChartDataSet.

virtual const IlvCoordInterval& IlvCombinedChartDataSet::getXRange (  )  const [virtual]

Returns the abscissa bounding values of the managed data.

Returns:
The defined interval for the abscissa of the data managed by the current data set.

Reimplemented from IlvChartDataSet.

virtual const IlvCoordInterval& IlvCombinedChartDataSet::getYRange (  )  const [virtual]

Returns the ordinate bounding values of the managed data.

Returns:
The defined interval for the ordinate of the data managed by the current data set.

Reimplemented from IlvChartDataSet.

virtual void IlvCombinedChartDataSet::insertDataSet ( IlvChartDataSet dataSet,
IlUInt  index = 0 
) [virtual]

Inserts a component data set into a combined data set.

A listener is added to the new inserted data set so that the number of data items considered in the data sets that make up the combined data set can be updated when the data of this new data set are modified.

Warning:
[note] The number of data items considered in the data sets that make up the combined data set is updated using the IlvCombinedChartDataSet::updateDataCount method.
Parameters:
dataSet The new data set that is inserted in the combined data set.
index The index at which the new data set is inserted.
virtual IlBoolean IlvCombinedChartDataSet::isIncreasingOnX (  )  const [virtual]

Indicates whether the managed data items have increasing abscissa values.

Returns:
IlTrue if all the data sets that make up the current combined data set have an abscissa that increases or stays the same. Otherwise, it returns IlFalse.

Reimplemented from IlvChartDataSet.

virtual void IlvCombinedChartDataSet::removeDataSet ( IlUInt  index = 0  )  [virtual]

Removes a component data set from the combined data set.

Warning:
[note] The number of data items considered in the data sets that make up the combined data set is updated by using the IlvCombinedChartDataSet::updateDataCount method.
Parameters:
index The index at which the data set is removed.
void IlvCombinedChartDataSet::removeDataSets (  ) 

Removes all the component data sets from the combined data set.

Warning:
[note] The number of data items considered in the data sets that make up the combined data set is updated by using the IlvCombinedChartDataSet::updateDataCount method. The data count is set to the minimum number of data items in the data sets that make up the combined data set.
virtual IlBoolean IlvCombinedChartDataSet::retrieveDataSetPoint ( IlvChartDataSet *&  dataSet,
IlUInt  ptidx,
const IlvDoublePoint point,
IlUInt dataSetPointIndex,
IlvDoublePoint dataSetPoint 
) const [pure virtual]

Retrieves from a data point of the current combined data set the corresponding data point of a component data set.

Warning:
[note] If no data set is specified (dataSet is equal to 0), dataSet is set to a default data set which is one of the data sets that make up the current combined data set.
Parameters:
dataSet The component data set for which we want to retrieve a data point. This data set is one of the data sets that make up the current combined data set.
ptidx The index of the data point of the current combined data set from which we want to retrieve the corresponding point in dataSet.
point The point of the current combined data set from which we want to retrieve the corresponding point in dataSet.
dataSetPointIndex The index of the retrieved point in the data set dataSet.
dataSetPoint The retrieved point in the data set dataSet.
Returns:
IlTrue if the data point has been successfully retrieved and IlFalse otherwise.

Implemented in IlvAddChartDataSet, IlvStacked100ChartDataSet, IlvHiLoChartDataSet, and IlvPieChartDataSet.

virtual void IlvCombinedChartDataSet::setDataCount ( IlUInt  count  )  [virtual]

Sets the number of considered data points from the number of data items considered in the component data sets.

Sets the number of data points considered for the current combined data set. This number is set to the number of data points that can be computed from the component data sets when count data items are considered in each component data set.

Parameters:
count The number of data items considered in the data sets that make up the combined data set.

Reimplemented in IlvHiLoChartDataSet, and IlvPieChartDataSet.

virtual void IlvCombinedChartDataSet::setDataSet ( IlvChartDataSet dataSet,
IlUInt  index = 0 
) [virtual]

Sets a component data set of the combined data set.

If a data set already exists at the index index, it is replaced by the new one. Otherwise, the new data set is added at the end of the collection of data sets by a call to the IlvCombinedChartDataSet::addDataSet method.

Warning:
[note] The number of data considered in the data sets that make up the combined data set is updated by using the IlvCombinedChartDataSet::updateDataCount method.
Parameters:
dataSet The new data set that is set within the combined data set.
index The index at which the new data set is set in the collection of data sets that make up the current data set.
virtual IlBoolean IlvCombinedChartDataSet::setPoint ( IlUInt  ptidx,
const IlvDoublePoint point 
) [virtual]

Propagates the change made to a given data point of the combined data set to the component data sets.

Parameters:
ptidx The index of the point of the current combined data set that is changed.
point The new value of the point of index ptidx for the current combined data set.
Returns:
IlTrue if the propagation has been successfully performed and IlFalse otherwise.

Reimplemented from IlvChartDataSet.

virtual void IlvCombinedChartDataSet::updateDataCount (  )  [virtual]

Updates the number of considered data points.

Warning:
[note] The considered data points are usually not stored. They are computed on the fly whenever needed from the data points of the component data sets.

The default implementation first computes the minimum number of data items in all the data sets that make up the combined data set, then calls the IlvCombinedChartDataSet::setDataCount method by passing this minimum number as a parameter.

virtual IlBoolean IlvCombinedChartDataSet::useDataSet ( const IlvChartDataSet dataSet  )  const [virtual]

Indicates whether a data set is one of the data sets that make up the combined data set.

Parameters:
dataSet The data set for which we want to know if it is one of the data sets that make up the current combined data set.
Returns:
IlTrue if the data set dataSet is one of the data sets that make up the current combined data set and IlFalse otherwise.

Reimplemented from IlvChartDataSet.

virtual void IlvCombinedChartDataSet::write ( IlvOutputFile file  )  const [virtual]

Writes the attributes of the current object in a file.

Called by the IlvChartDataSet::save method. This method can be overloaded in subclasses that define new attributes. The information written by the write method is read by the IO constructor, which takes an IlvInputFile as its only argument. Both this method and the IO constructor can be automatically declared by using the DeclareChartDataSetTypeInfo macro within the class declaration.

Parameters:
file The file where the attributes of the current object are written.

Reimplemented from IlvChartDataSet.


© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.