rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvChartPointSet Class Reference

Class for data sets described by a set of points with two coordinates. More...

#include <ilviews/charts/data.h>

Inheritance diagram for IlvChartPointSet:
IlvChartDataSet IlvChartCyclicPointSet

List of all members.

Public Member Functions

 IlvChartPointSet (const char *name=0, IlvPointInfoCollection *ptInfoCollection=0)
 Constructor.
virtual ~IlvChartPointSet ()
 Destructor.
virtual void dataPointAdded (IlUInt position)
 Performs the updates needed when a new data point is added.
virtual void dataPointChanged (IlUInt ptidx, IlBoolean beforeChange)
 Performs the necessary updates when a data point is changed.
virtual IlUInt getDataCount () const
 Returns the number of defined data items.
virtual void getPoint (IlUInt i, IlvDoublePoint &point) const
 Returns a represented data point.
virtual IlvDoublePointgetPointsBetween (IlUInt indexMin, IlUInt indexMax, IlUInt &count) const
 Returns some of the data points represented by the current data set.
virtual IlBoolean insertPoint (const IlvDoublePoint &point, IlUInt ptidx, IlvChartDataPointInfo *pointInfo=0, IlBoolean copyPointInfo=IlFalse)
 Inserts a represented data point (and its associated point information object if any) .
virtual IlBoolean insertPoints (IlUInt count, const IlvDoublePoint *points, IlUInt position=IlvLastPositionIndex, IlvChartDataPointInfo *const *pInfos=0, IlBoolean copyPointInfo=IlFalse)
 Inserts several represented data points (and their associated point information objects if any).
virtual IlBoolean isIncreasingOnX () const
 Indicates whether the managed data has increasing abscissa values.
virtual IlBoolean removePointAndInfo (IlUInt ptidx)
 Removes a represented data point (and its associated point information object if any).
virtual void removePointsAndInfo ()
 Removes all the represented data points (and their associated point information objects if any).
virtual IlBoolean setPoint (IlUInt ptidx, const IlvDoublePoint &point)
 Sets a represented data point.

Protected Member Functions

virtual void computeMinMaxValues (IlvCoordInterval &xRange, IlvCoordInterval &yRange) const
 Computes the abscissa and ordinate bounding values of the managed data.
void updateBoundingValues (const IlvDoublePoint &newPoint)
 Updates the bounding values of the managed data.

Detailed Description

Class for data sets described by a set of points with two coordinates.

Library: ilvcharts

This class is a subclass of IlvChartDataSet, for which the data points are described by IlvDoublePoint objects stored in an array. An IlvDoublePoint is a point with two coordinates (an abscissa and an ordinate) of type IlDouble.

Example of data that can be represented by an IlvChartPointSet object:

X Y
0.5 1.0
1.2 2.3
1.6 3.1
Warning:
[note] Each point (X, Y) is stored by using an IlvDoublePoint instance within the IlvChartPointSet object.
See also:
IlvChartDataSet, IlvDoublePoint, IlvPointInfoCollection, IlvChartDataPointInfo.

Constructor & Destructor Documentation

IlvChartPointSet::IlvChartPointSet ( const char *  name = 0,
IlvPointInfoCollection ptInfoCollection = 0 
)

Constructor.

Initializes a new IlvChartPointSet object.

Parameters:
name If not 0, this string becomes the name of the created data set. The name passed as a parameter is copied.
pointInfoCollection The object used to manage the point information for the created data set.
virtual IlvChartPointSet::~IlvChartPointSet (  )  [virtual]

Destructor.

The destructor removes all the data points managed by the current data set if the removal is allowed (see the IlvChartDataSet::isRemovalAllowed method).


Member Function Documentation

virtual void IlvChartPointSet::computeMinMaxValues ( IlvCoordInterval xRange,
IlvCoordInterval yRange 
) const [protected, virtual]

Computes the abscissa and ordinate bounding values of the managed data.

Computes and returns in xRange and yRange the abscissa and ordinate bounding values of the data managed by the current data set.

Parameters:
xRange The bounding values for the abscissa of the data managed by the current data set.
yRange The bounding values for the ordinate of the data managed by the current data set.
Warning:
[note] This method is called in the IlvChartDataSet::computeBoundingValues method.

Reimplemented from IlvChartDataSet.

virtual void IlvChartPointSet::dataPointAdded ( IlUInt  position  )  [virtual]

Performs the updates needed when a new data point is added.

This method first calls the IlvChartDataSet::dataPointAdded method and then updates the flag indicating whether the data managed by the current data set have an abscissa that increases or stays the same, by taking the new data point into account.

Parameters:
position The index at which the data point is added.

Reimplemented from IlvChartDataSet.

Reimplemented in IlvChartCyclicPointSet.

virtual void IlvChartPointSet::dataPointChanged ( IlUInt  ptidx,
IlBoolean  beforeChange 
) [virtual]

Performs the necessary updates when a data point is changed.

This method updates the flag indicating whether the data managed by the current data set have an abscissa that increases or stays the same, by taking into account the new data point if beforeChange is equal to IlFalse. Then, this method calls the IlvChartDataSet::dataPointChanged method.

Parameters:
ptidx The index at which an existing data point is changed.
beforeChange A Boolean value indicating whether the method is called before the data point is changed or after it has been changed.

Reimplemented from IlvChartDataSet.

virtual IlUInt IlvChartPointSet::getDataCount (  )  const [virtual]

Returns the number of defined data items.

Returns:
The number of data items (points or values) defined for the data set.

Implements IlvChartDataSet.

virtual void IlvChartPointSet::getPoint ( IlUInt  i,
IlvDoublePoint point 
) const [virtual]

Returns a represented data point.

The returned point is simply the point stored in the data set at the index i since the IlvChartPointSet object directly manages IlvDoublePoint objects.

Parameters:
i The index of the returned data point.
point The returned data point.

Implements IlvChartDataSet.

Reimplemented in IlvChartCyclicPointSet.

virtual IlvDoublePoint* IlvChartPointSet::getPointsBetween ( IlUInt  indexMin,
IlUInt  indexMax,
IlUInt count 
) const [virtual]

Returns some of the data points represented by the current data set.

Parameters:
indexMin The index of the first returned data point.
indexMax The index of the last returned data point.
count The number of returned points.
Returns:
An array of the data points represented by the current data set that are between the indexMin and the indexMax indexes. The array is stored in an IlPoolOf(Pointer) and should not be deleted or modified.

Reimplemented from IlvChartDataSet.

Reimplemented in IlvChartCyclicPointSet.

virtual IlBoolean IlvChartPointSet::insertPoint ( const IlvDoublePoint point,
IlUInt  ptidx,
IlvChartDataPointInfo pointInfo = 0,
IlBoolean  copyPointInfo = IlFalse 
) [virtual]

Inserts a represented data point (and its associated point information object if any) .

Parameters:
point The new data point.
ptidx The index at which the new data point is inserted.
pointInfo The point information associated with the new data point. This point information is locked.
copyPointInfo A Boolean value indicating whether the point information passed as a parameter must be copied. If copyPointInfo is IlTrue, the point information is copied. Otherwise, a pointer to the point information stored in pointInfo is kept and so its contents should not be deleted.
Returns:
IlTrue if the point and its associated point information have been successfully inserted and IlFalse otherwise.
Warning:
[note] The IlvChartPointSet::dataPointAdded method is called within this method after inserting the point in order to perform the updates needed because of the change to the data set.
Before you insert the point information object associated with a data item of the current data set, you must set the object used to manage the point information objects for the current data set. (See the IlvChartDataSet::setPointInfoCollection method or the constructor IlvChartDataSet::IlvChartDataSet(const char*, IlvPointInfoCollection*).)

Reimplemented from IlvChartDataSet.

Reimplemented in IlvChartCyclicPointSet.

virtual IlBoolean IlvChartPointSet::insertPoints ( IlUInt  count,
const IlvDoublePoint points,
IlUInt  position = IlvLastPositionIndex,
IlvChartDataPointInfo *const *  pInfos = 0,
IlBoolean  copyPointInfo = IlFalse 
) [virtual]

Inserts several represented data points (and their associated point information objects if any).

Inserts an array of data points in current the data set. This method uses the IlvChartDataSet::startBatch and IlvChartDataSet::endBatch methods to ensure that a single notification is sent. The default implementation uses the IlvChartDataSet::insertPoint method to insert the points. It can be overloaded in subclasses to use specific knowledge on how the data points are stored.

Parameters:
count The number of data points.
points The data points to insert.
position The index at which the new data points are inserted.
pInfos The point information objects associated with the new data points.
copyPointInfo A Boolean value indicating whether the point information objects stored in pInfos must be copied.
Returns:
A Boolean value indicating whether the data points were successfully inserted.

Reimplemented from IlvChartDataSet.

virtual IlBoolean IlvChartPointSet::isIncreasingOnX (  )  const [virtual]

Indicates whether the managed data has increasing abscissa values.

Returns:
IlTrue if the data managed by the current object have increasing abscissa values, and IlFalse otherwise.

Reimplemented from IlvChartDataSet.

virtual IlBoolean IlvChartPointSet::removePointAndInfo ( IlUInt  ptidx  )  [virtual]

Removes a represented data point (and its associated point information object if any).

When you remove a point information object, the point information is not deleted but unlocked (that is, the IlvChartDataPointInfo::unLock method is called). It will be deleted only when no objects reference it (see the IlvChartDataPointInfo::unLock method).

Parameters:
ptidx The index of the data point and its associated point information (if any) that are removed.
Returns:
IlTrue if the point and its associated point information (if any) have been removed and IlFalse otherwise.
Warning:
[note] The IlvChartDataSet::dataPointRemoved method is called within this method after removing the point in order to perform the updates needed because of the change to the data set.

Reimplemented from IlvChartDataSet.

virtual void IlvChartPointSet::removePointsAndInfo (  )  [virtual]

Removes all the represented data points (and their associated point information objects if any).

Warning:
[note] When you remove a point information object, the point information is not deleted but unlocked (that is, the IlvChartDataPointInfo::unLock method is called). It will be deleted only when no objects reference it (see the IlvChartDataPointInfo::unLock method).

Reimplemented from IlvChartDataSet.

Reimplemented in IlvChartCyclicPointSet.

virtual IlBoolean IlvChartPointSet::setPoint ( IlUInt  ptidx,
const IlvDoublePoint point 
) [virtual]

Sets a represented data point.

If a point already exists at the index ptidx, it is replaced by the new one. Otherwise, the new point is added at the end.

Parameters:
ptidx The index at which the new data point is set.
point The new data point.
Returns:
IlTrue if the point has been successfully set, and IlFalse otherwise.
Warning:
[note] If a point already exists at the index ptidx, the IlvChartDataSet::dataPointChanged method is called within this method before and after the point is changed in order to do the updates needed because of the change to the data set.

Reimplemented from IlvChartDataSet.

Reimplemented in IlvChartCyclicPointSet.

void IlvChartPointSet::updateBoundingValues ( const IlvDoublePoint newPoint  )  [protected]

Updates the bounding values of the managed data.

Updates the minimum and maximum values of the abscissa and the ordinate for the data managed by the current data set, by taking into account the new data point that has been added.

Parameters:
newPoint The new point that has been added to the data set.
Warning:
[note] This method is called when the bounding values have already been computed by using the IlvChartDataSet::computeBoundingValues method and need to be updated in order to take into account a new added data point.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© 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.