Rogue Wave Views
Charts Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions
IlvChartDataSet Class Referenceabstract

Abstract base class for managing a set of data. More...

#include <ilviews/charts/data.h>

Inheritance diagram for IlvChartDataSet:
IlvValueInterface IlvAbstractChartFunction IlvChartPointSet IlvChartYValueSet IlvCombinedChartDataSet IlvCallbackChartFunction IlvScriptChartFunction IlvChartCyclicPointSet IlvAddChartDataSet IlvHiLoChartDataSet IlvPieChartDataSet IlvStacked100ChartDataSet

Public Member Functions

virtual ~IlvChartDataSet ()
 Destructor. More...
 
void addListener (IlvChartDataSetListener *listener)
 Adds a listener. More...
 
IlBoolean addPoint (const IlvDoublePoint &point, IlvChartDataPointInfo *pointInfo=0, IlBoolean copyPointInfo=IlFalse)
 Adds a represented data point (and its associated point information object if any). More...
 
IlBoolean areListenersEnabled () const
 Indicates whether the listeners are enabled. More...
 
virtual IlvChartDataSetcopy () const =0
 Creates and returns a copy of the current object. More...
 
virtual void dataAllPointsRemoved ()
 Performs the necessary updates when all data points are removed. More...
 
virtual void dataPointAdded (IlUInt position)
 Performs the necessary updates when a new data point is added. More...
 
virtual void dataPointChanged (IlUInt ptidx, IlBoolean beforeChange)
 Performs the necessary updates when a data point is changed. More...
 
virtual void dataPointRemoved (IlUInt ptidx)
 Performs the necessary updates when a data point is removed. More...
 
void enableListeners (IlBoolean b)
 Specifies whether the listeners should be enabled. More...
 
virtual void endBatch ()
 Specifies the end of a set of modifications. More...
 
IlUInt getAddMaxIdx () const
 Returns the maximum index of the data points that have been added between the first call of the startBatch() method and the last call of the endBatch() method. More...
 
IlUInt getAddMinIdx () const
 Returns the minimum index of the data points that have been added between the first call of the startBatch() method and the last call of the endBatch() method. More...
 
void getBoundingValues (IlvCoordInterval &xRange, IlvCoordInterval &yRange) const
 Returns the bounding values of the managed data. More...
 
virtual IlUInt getDataCount () const =0
 Returns the number of defined data items. More...
 
IlvChartDataSetListener *const * getListeners (IlUInt &count) const
 Returns all the listeners. More...
 
IlUInt getMaxCount () const
 Returns the maximum number of data items that can be managed. More...
 
const char * getName () const
 Returns the name of the current data set. More...
 
virtual void getPoint (IlUInt i, IlvDoublePoint &point) const =0
 Returns a represented data point. More...
 
IlvChartDataPointInfogetPointInfo (IlUInt ptidx) const
 Returns the point information associated with a data item. More...
 
IlvPointInfoCollectiongetPointInfoCollection () const
 Returns the object used to manage the point information. More...
 
IlUInt getPointInfoCount () const
 Returns the number of defined point information items. More...
 
IlvDoublePointgetPoints (IlUInt &count) const
 Returns all the represented data points. More...
 
virtual IlvDoublePointgetPointsBetween (IlUInt indexMin, IlUInt indexMax, IlUInt &count) const
 Returns some of the data points represented by the current data set. More...
 
virtual IlvDoublePointgetPointsInRange (IlUInt &count, IlUInt *&dataPointIndexes, const IlvCoordInterval &xRange, const IlvCoordInterval &yRange, IlBoolean needContinuity) const
 Returns a range of data points represented by the current data set. More...
 
virtual const IlvCoordIntervalgetXRange () const
 Returns the abscissa bounding values of the managed data. More...
 
virtual const IlvCoordIntervalgetYRange () const
 Returns the ordinate bounding values of the managed data. More...
 
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). More...
 
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). More...
 
virtual IlBoolean isIncreasingOnX () const
 Indicates whether the managed data items have increasing abscissa values. More...
 
IlBoolean isLimited () const
 Indicates whether the number of managed data items is limited. More...
 
virtual IlBoolean isRemovalAllowed () const
 Indicates whether managed data can be removed. More...
 
virtual IlBoolean isWritable () const
 Indicates whether managed data can be modified. More...
 
void lock ()
 Locks the current IlvChartDataSet object. More...
 
void removeAllPointInfo ()
 Removes all the defined point information. More...
 
virtual void removeAllPoints ()
 Removes all the represented data points (and their associated point information objects if any). More...
 
IlvChartDataSetListenerremoveListener (IlvChartDataSetListener *l)
 Removes a listener. More...
 
void removeListeners ()
 Removes all the listeners.
 
virtual IlBoolean removePointAndInfo (IlUInt ptidx)
 Removes a represented data point (and its associated point information object if any). More...
 
IlBoolean removePointInfo (IlUInt ptidx)
 Removes the point information associated with a data item. More...
 
virtual void removePointsAndInfo ()
 Removes all the represented data points (and their associated point information objects if any). More...
 
IlvOutputFilesave (IlvOutputFile &file) const
 Writes a complete description of the current object in a file. More...
 
void setMaxCount (IlUInt maxCount)
 Sets the maximum number of managed data items. More...
 
void setName (const char *name)
 Sets the name of the current data set. More...
 
virtual IlBoolean setPoint (IlUInt ptidx, const IlvDoublePoint &point)
 Sets a represented data point. More...
 
IlBoolean setPointInfo (IlUInt ptidx, IlvChartDataPointInfo *pointInfo, IlBoolean copyPointInfo=IlFalse)
 Sets the point information associated with a data item. More...
 
void setPointInfoCollection (IlvPointInfoCollection *ptic)
 Sets the object used to manage the point information. More...
 
virtual void startBatch ()
 Specifies the beginning of a set of modifications. More...
 
void unLock ()
 Unlocks the current IlvChartDataSet object. More...
 
virtual void write (IlvOutputFile &file) const
 Writes the attributes of the current object in a file. More...
 

Static Public Member Functions

static IlvChartDataSetLoad (IlvInputFile &file)
 Reads a data set object from a file. More...
 

Protected Member Functions

 IlvChartDataSet (const char *name=0, IlvPointInfoCollection *pointInfoCollection=0)
 Initializes a new IlvChartDataSet object. More...
 
 IlvChartDataSet (const IlvChartDataSet &dataSet)
 Initializes a new IlvChartDataSet object as a copy of another IlvChartDataSet. More...
 
 IlvChartDataSet (IlvInputFile &file)
 Initializes a new IlvChartDataSet object from an input file. More...
 
void computeBoundingValues ()
 Computes the bounding values of the managed data. More...
 
virtual void computeMinMaxValues (IlvCoordInterval &xRange, IlvCoordInterval &yRange) const
 Computes the abscissa and ordinate bounding values of the managed data. More...
 

Detailed Description

Abstract base class for managing a set of data.

Library: ilvcharts
This abstract class manages a set of data that is displayed with a given type of representation within a chart (for example, with a polyline or with markers).

A set of data can be of various types. For example, it can be a set of points with two coordinates or a set of values, or it can be described by a function. To handle these different types of data sets, there needs to be a way to represent data which is independent of the data set type. Data that will be displayed within a chart are represented by IlvDoublePoint objects and are commonly called data points. All the types of data sets can return their data in the form of IlvDoublePoint instances, whatever the type of the data they manage is. Similarly, they can set their new data from the IlvDoublePoint instances, whatever the type of the data they manage is.

The various data sets used for a given chart are managed by a specific class that is a subclass of IlvAbstractChartData. A lock/unlock system is provided to share a data set among different instances of subclasses of IlvAbstractChartData. The lock/unlock system ensures that the data set will not be deleted as long as an object needs it. (See the IlvChartDataSet::lock() and IlvChartDataSet::unLock() methods for more details.)

In order to propagate all the modifications that are made to a data set to all the objects that use it (which is the case for all the instances of subclasses of IlvAbstractChartData that share the data set), listeners are set on the data set. These listeners are automatically set when the data set is added to the instance of the subclass of IlvAbstractChartData that manages it.

Note
IlvChartDataSet is an abstract class. Its constructors are defined as protected because it is not possible to create an instance of this class directly.
See also
IlvAbstractChartData, IlvChartPointSet, IlvChartYValueSet, IlvAbstractChartFunction, IlvCombinedChartDataSet, IlvPointInfoCollection, IlvChartDataPointInfo, IlvDoublePoint, IlvChartDataSetListener.

Constructor & Destructor Documentation

§ ~IlvChartDataSet()

virtual IlvChartDataSet::~IlvChartDataSet ( )
virtual

Destructor.

The destructor calls the IlvPointInfoCollection::unLock() method of the IlvPointInfoCollection object used to manage the point information for the data set, if any.

§ IlvChartDataSet() [1/3]

IlvChartDataSet::IlvChartDataSet ( const char *  name = 0,
IlvPointInfoCollection pointInfoCollection = 0 
)
protected

Initializes a new IlvChartDataSet object.

By default, the maximum data count is set to IlvNoCountLimit, which means that the number of data items that can be managed by this object is not limited.

Parameters
nameIf not 0, this string becomes the name of the created data set. The name passed as a parameter is copied.
pointInfoCollectionThe object used to manage the point information objects for the created data set.

§ IlvChartDataSet() [2/3]

IlvChartDataSet::IlvChartDataSet ( const IlvChartDataSet dataSet)
protected

Initializes a new IlvChartDataSet object as a copy of another IlvChartDataSet.

Parameters
dataSetThe data set that is copied to initialize the new data set object.

§ IlvChartDataSet() [3/3]

IlvChartDataSet::IlvChartDataSet ( IlvInputFile file)
protected

Initializes a new IlvChartDataSet object from an input file.

Parameters
fileThe file that is read to initialize the new data set.

Member Function Documentation

§ addListener()

void IlvChartDataSet::addListener ( IlvChartDataSetListener listener)

Adds a listener.

Parameters
listenerThe new listener that is added to the current data set.

§ addPoint()

IlBoolean IlvChartDataSet::addPoint ( const IlvDoublePoint point,
IlvChartDataPointInfo pointInfo = 0,
IlBoolean  copyPointInfo = IlFalse 
)

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

At this level of the class hierarchy, this method just returns IlFalse because the data are not stored in the IlvChartDataSet class, but only in its derived classes.

Parameters
pointThe new data point to add.
pointInfoThe point information associated with the new data point.
copyPointInfoIndicates whether the point information passed as a parameter must be copied.
Returns
A value indicating whether the data point has been successfully added.
Warning
Before you add 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*).)

§ areListenersEnabled()

IlBoolean IlvChartDataSet::areListenersEnabled ( ) const

Indicates whether the listeners are enabled.

Returns
IlTrue if the listeners are enabled for the current data set and IlFalse otherwise.
See also
enableListeners().

§ computeBoundingValues()

void IlvChartDataSet::computeBoundingValues ( )
protected

Computes the bounding values of the managed data.

Computes the minimum and maximum values of the abscissa and the ordinate for the data managed by the current data set.

This method is called when the bounding values must be computed or recomputed (for example, when data are set).

§ computeMinMaxValues()

virtual void IlvChartDataSet::computeMinMaxValues ( IlvCoordInterval xRange,
IlvCoordInterval yRange 
) const
protectedvirtual

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
xRangeThe bounding values for the abscissa of the data managed by the current data set.
yRangeThe bounding values for the ordinate of the data managed by the current data set.
Note
This method is called in the IlvChartDataSet::computeBoundingValues() method.

Reimplemented in IlvChartYValueSet, IlvChartPointSet, and IlvPieChartDataSet.

§ copy()

virtual IlvChartDataSet* IlvChartDataSet::copy ( ) const
pure virtual

Creates and returns a copy of the current object.

This method must be overloaded in subclasses. It is automatically declared by the DeclareChartDataSetTypeInfo macro. The IlvPredefinedChartDataSetIOMembers macro lets you define a default implementation, which returns an instance initialized with the copy constructor.

Returns
A copy of the current object.

§ dataAllPointsRemoved()

virtual void IlvChartDataSet::dataAllPointsRemoved ( )
virtual

Performs the necessary updates when all data points are removed.

At this level of the class hierarchy, this method calls the IlvChartDataSetListener::dataAllPointsRemoved() method for each data set listener, if the listeners are enabled (see the IlvChartDataSet::areListenersEnabled() method).

§ dataPointAdded()

virtual void IlvChartDataSet::dataPointAdded ( IlUInt  position)
virtual

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

At this level of the class hierarchy, this method calls the IlvChartDataSetListener::dataPointAdded() method for each data set listener if the listeners are enabled (see the IlvChartDataSet::areListenersEnabled() method).

Parameters
positionThe index at which the data point is added.

Reimplemented in IlvChartPointSet, and IlvChartCyclicPointSet.

§ dataPointChanged()

virtual void IlvChartDataSet::dataPointChanged ( IlUInt  ptidx,
IlBoolean  beforeChange 
)
virtual

Performs the necessary updates when a data point is changed.

At this level of the class hierarchy, this method calls the IlvChartDataSetListener::dataPointChanged() method for each data set listener if the listeners are enabled (see the IlvChartDataSet::areListenersEnabled() method).

Parameters
ptidxThe index at which an existing data point is changed.
beforeChangeIndicates whether the method is called before the data point is changed or after it has been changed.

Reimplemented in IlvChartPointSet.

§ dataPointRemoved()

virtual void IlvChartDataSet::dataPointRemoved ( IlUInt  ptidx)
virtual

Performs the necessary updates when a data point is removed.

At this level of the class hierarchy, this method calls the IlvChartDataSetListener::dataPointRemoved() method for each data set listener, if the listeners are enabled (see the IlvChartDataSet::areListenersEnabled() method).

Parameters
ptidxThe index at which the data point is removed.

§ enableListeners()

void IlvChartDataSet::enableListeners ( IlBoolean  b)

Specifies whether the listeners should be enabled.

Parameters
bThe new value for the Boolean indicating whether the listeners should be enabled for the current data set. If the listeners are enabled (that is b is equal to IlTrue), they will be considered. Otherwise, even if some listeners have been defined, they will not be considered and thus the modifications will not be transmitted to the listeners.

§ endBatch()

virtual void IlvChartDataSet::endBatch ( )
virtual

Specifies the end of a set of modifications.

This method is used to notify all subscribed listeners that a set of modifications has occurred. This method must be called explicitly. The IlvChartDataSet::startBatch() method may have been called several times in succession before the call of the endBatch() method. In this case, the endBatch() method must be called in succession as many times as the IlvChartDataSet::startBatch() method was called.

The default implementation decrements the counter indicating the number of calls of the IlvChartDataSet::startBatch() method. When this number reaches zero, it calls IlvChartDataSetListener::endBatch() for each data set listener, if the listeners are enabled (see the IlvChartDataSet::areListenersEnabled() method).

See also
startBatch().

§ getAddMaxIdx()

IlUInt IlvChartDataSet::getAddMaxIdx ( ) const

Returns the maximum index of the data points that have been added between the first call of the startBatch() method and the last call of the endBatch() method.

This method is used only with the IlvChartDataSet::startBatch() and IlvChartDataSet::endBatch() method.

The minimum and maximum indexes of the data points that are added are initialized to IlvBadIndex at the first call of the IlvChartDataSet::startBatch() method. The IlvChartDataSet::startBatch() method can be called several times in succession. The minimum and maximum indexes of the data points that are added are updated until the last call of the IlvChartDataSet::endBatch() method is performed. The IlvChartDataSet::endBatch() method must be called as many times as the IlvChartDataSet::startBatch() method has been called. (See the IlvChartDataSet::startBatch() and IlvChartDataSet::endBatch() methods for more details.)

Returns
The maximum index of the data points that have been added between the first call of the IlvChartDataSet::startBatch() method and the last call of the IlvChartDataSet::endBatch() method.
See also
getAddMinIdx().

§ getAddMinIdx()

IlUInt IlvChartDataSet::getAddMinIdx ( ) const

Returns the minimum index of the data points that have been added between the first call of the startBatch() method and the last call of the endBatch() method.

This method is used only with the IlvChartDataSet::startBatch() and IlvChartDataSet::endBatch() methods.

The minimum and maximum indexes of the data points that are added are initialized to IlvBadIndex at the first call of the IlvChartDataSet::startBatch() method. The IlvChartDataSet::startBatch() method can be called several times in succession. The minimum and maximum indexes of the data points that are added are updated until the last call of the IlvChartDataSet::endBatch() method is performed. The IlvChartDataSet::endBatch() method must be called as many times as the IlvChartDataSet::startBatch() method has been called. (See the IlvChartDataSet::startBatch() and IlvChartDataSet::endBatch() methods for more details.)

Returns
The minimum index of the data points that have been added between the first call of the IlvChartDataSet::startBatch() method and the last call of the IlvChartDataSet::endBatch() method.
See also
getAddMaxIdx().

§ getBoundingValues()

void IlvChartDataSet::getBoundingValues ( IlvCoordInterval xRange,
IlvCoordInterval yRange 
) const

Returns the bounding values of the managed data.

Parameters
xRangeThe returned bounding values for the abscissa of the data managed by the current data set.
yRangeThe returned bounding values for the ordinate of the data managed by the current data set.

§ getDataCount()

virtual IlUInt IlvChartDataSet::getDataCount ( ) const
pure virtual

Returns the number of defined data items.

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

Implemented in IlvAbstractChartFunction, IlvChartYValueSet, IlvChartPointSet, and IlvCombinedChartDataSet.

§ getListeners()

IlvChartDataSetListener* const* IlvChartDataSet::getListeners ( IlUInt count) const

Returns all the listeners.

Parameters
countThe number of listeners defined for the current data set.
Returns
An array of all the listeners defined for the current data set.
Note
The returned array should not be freed or reallocated directly since it is maintained internally.

§ getMaxCount()

IlUInt IlvChartDataSet::getMaxCount ( ) const

Returns the maximum number of data items that can be managed.

Returns
IlvNoCountLimit if the number of data items that can be managed by the object is not limited. Otherwise, it returns the maximum number of data items that can be managed by the object.

§ getName()

const char* IlvChartDataSet::getName ( ) const
virtual

Returns the name of the current data set.

Returns
The name that has been set for the current data set.

Reimplemented from IlvValueInterface.

§ getPoint()

virtual void IlvChartDataSet::getPoint ( IlUInt  i,
IlvDoublePoint point 
) const
pure virtual

Returns a represented data point.

Parameters
iThe index of the returned data point.
pointThe returned data point.

Implemented in IlvCallbackChartFunction, IlvChartYValueSet, IlvChartPointSet, IlvPieChartDataSet, IlvHiLoChartDataSet, IlvStacked100ChartDataSet, IlvAddChartDataSet, IlvScriptChartFunction, and IlvChartCyclicPointSet.

§ getPointInfo()

IlvChartDataPointInfo* IlvChartDataSet::getPointInfo ( IlUInt  ptidx) const

Returns the point information associated with a data item.

Parameters
ptidxThe index of the data item with which the returned point information is associated.
Returns
A pointer to the point information associated with the data item of index ptidx.
Note
The point information object should not be deleted because it is maintained internally.

§ getPointInfoCollection()

IlvPointInfoCollection* IlvChartDataSet::getPointInfoCollection ( ) const

Returns the object used to manage the point information.

Returns
A pointer to the object used to manage the point information for the current data set.

§ getPointInfoCount()

IlUInt IlvChartDataSet::getPointInfoCount ( ) const

Returns the number of defined point information items.

Returns
The number of point information items defined for the data set.

§ getPoints()

IlvDoublePoint* IlvChartDataSet::getPoints ( IlUInt count) const

Returns all the represented data points.

Parameters
countThe number of returned data points.
Returns
An array of all the data points represented by the current data set. The array is stored in an IlPoolOf(Pointer) and should not be deleted or modified.

§ getPointsBetween()

virtual IlvDoublePoint* IlvChartDataSet::getPointsBetween ( IlUInt  indexMin,
IlUInt  indexMax,
IlUInt count 
) const
virtual

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

Parameters
indexMinThe index of the first returned data point.
indexMaxThe index of the last returned data point.
countThe 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 in IlvChartYValueSet, IlvChartPointSet, and IlvChartCyclicPointSet.

§ getPointsInRange()

virtual IlvDoublePoint* IlvChartDataSet::getPointsInRange ( IlUInt count,
IlUInt *&  dataPointIndexes,
const IlvCoordInterval xRange,
const IlvCoordInterval yRange,
IlBoolean  needContinuity 
) const
virtual

Returns a range of data points represented by the current data set.

The selection of data points is made only along the abscissa if the representation of the data is continuous (for example, when data are represented by a polyline). In such cases, needContinuity is equal to IlTrue. Otherwise, it is equal to IlFalse.

Parameters
countThe number of returned data points.
dataPointIndexesThe indexes of the returned data points.
xRangeThe abscissa range used to select the data points.
yRangeThe ordinate range used to select the data points.
needContinuityIndicates whether the data selection must be continuous.
Returns
An array of the represented data points that are within the given abscissa and ordinate intervals xrange and yrange.
Note
For handling the needs of chart drawing, one data point before and one data point after the specified interval for the abscissa are additionally retrieved whenever possible. This ensures continuity when drawing the chart, especially when polylines are used. The array is stored in an IlPoolOf(Pointer) and should not be deleted or modified.

§ getXRange()

virtual const IlvCoordInterval& IlvChartDataSet::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 in IlvCombinedChartDataSet.

§ getYRange()

virtual const IlvCoordInterval& IlvChartDataSet::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 in IlvCombinedChartDataSet.

§ insertPoint()

virtual IlBoolean IlvChartDataSet::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).

At this level of the class hierarchy, this method just returns IlFalse because the data are not stored in the IlvChartDataSet class, but only in its derived classes.

Parameters
pointThe new data point to insert.
ptidxThe index at which the new data point is inserted.
pointInfoThe point information associated with the new data point.
copyPointInfoIndicates whether the point information passed as a parameter must be copied.
Returns
IlTrue if the data point has been successfully inserted and IlFalse otherwise.
Warning
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 in IlvChartYValueSet, IlvChartPointSet, and IlvChartCyclicPointSet.

§ insertPoints()

virtual IlBoolean IlvChartDataSet::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
countThe number of data points.
pointsThe data points to insert.
positionThe index at which the new data points are inserted.
pInfosThe point information objects associated with the new data points.
copyPointInfoIndicates whether the point information objects stored in pInfos must be copied.
Returns
A value indicating whether the data points were successfully inserted.

Reimplemented in IlvChartPointSet.

§ isIncreasingOnX()

virtual IlBoolean IlvChartDataSet::isIncreasingOnX ( ) const
virtual

Indicates whether the managed data items have increasing abscissa values.

Returns
a value indicating whether the data items managed by the current object have increasing abscissa values. The default implementation return IlFalse.

Reimplemented in IlvAbstractChartFunction, IlvChartYValueSet, IlvChartPointSet, and IlvCombinedChartDataSet.

§ isLimited()

IlBoolean IlvChartDataSet::isLimited ( ) const

Indicates whether the number of managed data items is limited.

Returns
IlFalse if the number of managed data items is not limited (that is the maximum data count is equal to IlvNoCountLimit) and IlTrue otherwise.

§ isRemovalAllowed()

virtual IlBoolean IlvChartDataSet::isRemovalAllowed ( ) const
virtual

Indicates whether managed data can be removed.

Returns
a value indicating whether the existing data items (points or values) can be removed. The default implementation returns IlTrue.

§ isWritable()

virtual IlBoolean IlvChartDataSet::isWritable ( ) const
virtual

Indicates whether managed data can be modified.

Returns a value that indicates whether the existing data items (points or values) can be modified or whether new data can be created for the data set.

Returns
IlTrue by default.

§ Load()

static IlvChartDataSet* IlvChartDataSet::Load ( IlvInputFile file)
static

Reads a data set object from a file.

Creates a data set instance from the description stored in the file file. The object description must have been written with the IlvChartDataSet::save() method.

Parameters
fileThe file where the object description is stored.
Returns
A pointer to the created object.

§ lock()

void IlvChartDataSet::lock ( )

Locks the current IlvChartDataSet object.

Ensures that the IlvChartDataSet will not be destroyed before it is unlocked.
This method increments a reference count initially set to 0.

When you keep a pointer to an IlvChartDataSet object (because you store it in the field of an object or it is in a variable), you should lock it for the duration of its use so that it is not destroyed by some other object or component. When you do not need the IlvChartDataSet any more, you should release it with a call to unLock(); if the lock you just removed was the last one, Rogue Wave Views will free the IlvChartDataSet.

§ removeAllPointInfo()

void IlvChartDataSet::removeAllPointInfo ( )

Removes all the defined point information.

Removes all the point information defined for the data set.

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

§ removeAllPoints()

virtual void IlvChartDataSet::removeAllPoints ( )
virtual

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

Calls the removePointsAndInfo() method before sending a notification to update the virtual dataset (eg: Pie chart).

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

§ removeListener()

IlvChartDataSetListener* IlvChartDataSet::removeListener ( IlvChartDataSetListener l)

Removes a listener.

Parameters
lThe listener that is removed from the current data set.
Returns
A pointer to the removed listener if the listener passed as a parameter is one of the listeners of the current data set. Otherwise, it returns 0.
Note
The listener is not deleted. The caller is responsible for deleting the listener.

§ removePointAndInfo()

virtual IlBoolean IlvChartDataSet::removePointAndInfo ( IlUInt  ptidx)
virtual

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

At this level of the class hierarchy, only the point information (if any) is removed because the data are not stored in the IlvChartDataSet class, but only in its derived classes.

Parameters
ptidxThe index of the removed data point and of its associated point information (if any).
Returns
IlTrue if the point information has been removed and IlFalse otherwise.
Note
When you remove a point information object, it is not deleted but unlocked (that is, the IlvChartDataPointInfo::unLock() method is called). It will be deleted only when no objects reference it.

Reimplemented in IlvChartYValueSet, and IlvChartPointSet.

§ removePointInfo()

IlBoolean IlvChartDataSet::removePointInfo ( IlUInt  ptidx)

Removes the point information associated with a data item.

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

Parameters
ptidxThe index of the data item with which the removed point information is associated.
Returns
IlTrue if the point information has been successfully removed and IlFalse otherwise.

§ removePointsAndInfo()

virtual void IlvChartDataSet::removePointsAndInfo ( )
virtual

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

At this level of the class hierarchy, only the point information objects (if any) are removed because the data are not stored in the IlvChartDataSet class, but only in its derived classes.

If the connected displayer use the virtual dataset, you should use removeAllPoints() method.

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

Reimplemented in IlvChartYValueSet, IlvChartPointSet, and IlvChartCyclicPointSet.

§ save()

IlvOutputFile& IlvChartDataSet::save ( IlvOutputFile file) const

Writes a complete description of the current object in a file.

Writes the complete object description in a file. This description contains all the information necessary to read back this object with the IlvChartDataSet::Load() member function. This method first writes information regarding the type of the object and calls the IlvChartDataSet::write() method.

Parameters
fileThe file where the complete object description is written.

§ setMaxCount()

void IlvChartDataSet::setMaxCount ( IlUInt  maxCount)

Sets the maximum number of managed data items.

To specify that the number of data items is not limited, you must set the maximum data count to IlvNoCountLimit.

Parameters
maxCountThe new maximum data count that can be managed by the current object.

§ setName()

void IlvChartDataSet::setName ( const char *  name)

Sets the name of the current data set.

Parameters
nameThe new name for the current data set. The string is copied.

§ setPoint()

virtual IlBoolean IlvChartDataSet::setPoint ( IlUInt  ptidx,
const IlvDoublePoint point 
)
virtual

Sets a represented data point.

At this level of the class hierarchy, this method just returns IlFalse because the data are not stored in the IlvChartDataSet class, but only in its derived classes.

Parameters
ptidxThe index at which the new data point is set.
pointThe new data point.
Returns
A value indicating whether the data point has been successfully set.

Reimplemented in IlvChartYValueSet, IlvChartPointSet, IlvCombinedChartDataSet, and IlvChartCyclicPointSet.

§ setPointInfo()

IlBoolean IlvChartDataSet::setPointInfo ( IlUInt  ptidx,
IlvChartDataPointInfo pointInfo,
IlBoolean  copyPointInfo = IlFalse 
)

Sets the point information associated with a data item.

The new point information is locked and the old one, if it exists, is unlocked.

Parameters
ptidxThe index of the data item with which the new point information is associated.
pointInfoThe new point information that is associated with the data item at index ptidx.
copyPointInfoIndicates whether the point information passed as a parameter must be copied. If copyPointInfo is equal to IlTrue, the point information is copied. Otherwise, a pointer to the point information stored in pointInfo is kept. Therefore, its contents should not be deleted.
Returns
IlTrue if the point information has been successfully set and IlFalse otherwise.
Warning
Before you set 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*).) If no object is set to manage the point information objects, the point information object will not be set and the current method will return IlFalse.

§ setPointInfoCollection()

void IlvChartDataSet::setPointInfoCollection ( IlvPointInfoCollection ptic)

Sets the object used to manage the point information.

The new object is locked and the old one, if it exists, is unlocked.

Parameters
pticThe object that is set to manage the point information for the current data set.

§ startBatch()

virtual void IlvChartDataSet::startBatch ( )
virtual

Specifies the beginning of a set of modifications.

This method is used to notify all subscribed listeners that a set of modifications is under way. This method must be called explicitly. The startBatch() method can be called several times in succession. In this case, the IlvChartDataSet::endBatch() method must also to be called in succession as many times as the startBatch() method is called.

The default implementation increments a counter indicating the number of calls of the method. At the first call of the method, it also initializes the minimum and maximum indexes of the data points that are added (see the IlvChartDataSet::getAddMinIdx() and IlvChartDataSet::getAddMaxIdx() methods) and calls IlvChartDataSetListener::startBatch() for each data set listener if the listeners are enabled (see the IlvChartDataSet::areListenersEnabled() method).

See also
endBatch().

§ unLock()

void IlvChartDataSet::unLock ( )

Unlocks the current IlvChartDataSet object.

Decrements the reference count of this object and deletes it if the count drops to 0.

§ write()

virtual void IlvChartDataSet::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
fileThe file where the attributes of the current object are written.

Reimplemented in IlvAbstractChartFunction, and IlvCombinedChartDataSet.


© Copyright 2018, 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.