rwlogo
Rogue Wave Views 5.6

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
IlvPointInfoCollection Class Referenceabstract

Abstract base class for managing point information objects. More...

#include <ilviews/charts/data.h>

Inheritance diagram for IlvPointInfoCollection:
IlvPointInfoArray IlvPointInfoMap IlvPointInfoSingleton

Public Member Functions

virtual IlvPointInfoCollectioncopy () const =0
 Virtual copy constructor. More...
 
virtual IlvChartDataPointInfogetInfoForPoint (IlUInt pidx) const =0
 Returns the point information for a given data point. More...
 
virtual IlvChartDataPointInfogetPointInfo (IlUInt idx) const =0
 Returns the point information at a given index. More...
 
virtual IlUInt getPointInfoCount () const =0
 Returns the number of point information objects managed by this object. More...
 
void lock ()
 Locks the current IlvPointInfoCollection object. More...
 
virtual void removeAllPointInfo ()=0
 Removes all point information. More...
 
virtual IlBoolean removePointInfo (IlUInt ptidx)=0
 Removes the point information for a given data point. More...
 
IlvOutputFilesave (IlvOutputFile &file) const
 Writes a complete description of the current object in a file. More...
 
virtual void setPointInfo (IlUInt ptidx, IlvChartDataPointInfo *ptInfo, IlBoolean copy=IlFalse)=0
 Sets the point information defined for a given data point. More...
 
void unLock ()
 Unlocks the current IlvPointInfoCollection object. More...
 
virtual void write (IlvOutputFile &file) const =0
 Writes the attributes of the current object in a file. More...
 

Static Public Member Functions

static IlvPointInfoCollectionLoad (IlvInputFile &file)
 Reads a point information collection object from a file. More...
 

Protected Member Functions

 IlvPointInfoCollection ()
 Constructor. More...
 
 IlvPointInfoCollection (const IlvPointInfoCollection &pointInfo)
 Constructor. More...
 
 IlvPointInfoCollection (IlvInputFile &file)
 Constructor. More...
 

Detailed Description

Abstract base class for managing point information objects.

Library: ilvcharts

This is an abstract class that manages all the point information defined for the data points of a given data set.

The point information associated with a given data point is represented by an instance of the IlvChartDataPointInfo class. The IlvPointInfoCollection class, therefore, manages a set of IlvChartDataPointInfo.

A lock/unlock system is provided to share an object managing point information among different data sets. The lock/unlock system assures that the object will not be deleted as long as a data set needs it. (See the IlvPointInfoCollection::lock and IlvPointInfoCollection::unLock methods for more details.)

Warning
[note] IlvPointInfoCollection 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
IlvPointInfoMap, IlvPointInfoArray, IlvChartDataPointInfo.

Constructor & Destructor Documentation

IlvPointInfoCollection::IlvPointInfoCollection ( )
protected

Constructor.

Initializes a new IlvPointInfoCollection object.

IlvPointInfoCollection::IlvPointInfoCollection ( const IlvPointInfoCollection pointInfo)
protected

Constructor.

Initializes a new IlvPointInfoCollection object which is a copy of pointInfo.

Parameters
pointInfoThe point information collection used to initialize the current one.
IlvPointInfoCollection::IlvPointInfoCollection ( IlvInputFile file)
protected

Constructor.

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

Parameters
fileThe file used to initialize the current point information collection.

Member Function Documentation

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

Virtual copy constructor.

Creates and returns a copy of the current object. This method must be overloaded in subclasses. It is automatically declared by the DeclarePointInfoCollectionTypeInfo macro. The IlvPredefinedPointInfoCollectionIOMembers macro lets you define a default implementation, which returns an instance initialized with the copy constructor.

Returns
A copy of the current object.
virtual IlvChartDataPointInfo* IlvPointInfoCollection::getInfoForPoint ( IlUInt  pidx) const
pure virtual

Returns the point information for a given data point.

Parameters
pidxThe index of the data point with which the returned point information is associated.
Returns
A pointer to the point information associated with the data point at the index pidx in the data set with which the current object is associated. The returned point information should not be deleted since it is maintained internally.

Implemented in IlvPointInfoSingleton, IlvPointInfoArray, and IlvPointInfoMap.

virtual IlvChartDataPointInfo* IlvPointInfoCollection::getPointInfo ( IlUInt  idx) const
pure virtual

Returns the point information at a given index.

Parameters
idxThe index of the returned point information.
Returns
A pointer to the point information at the index idx in the collection of point information objects managed by the current object. The returned point information stores graphical information for a data point of the data set with which the current object is associated. This point information should not be deleted since it is maintained internally.

Implemented in IlvPointInfoSingleton, IlvPointInfoArray, and IlvPointInfoMap.

virtual IlUInt IlvPointInfoCollection::getPointInfoCount ( ) const
pure virtual

Returns the number of point information objects managed by this object.

Returns
The number of point information objects managed by this object.

Implemented in IlvPointInfoSingleton, IlvPointInfoArray, and IlvPointInfoMap.

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

Reads a point information collection object from a file.

Creates a point information collection instance from the description stored in the file file. The object description must have been written with the IlvPointInfoCollection::save method.

Parameters
fileThe file where the object description is stored.
Returns
A pointer to the created object.
void IlvPointInfoCollection::lock ( )

Locks the current IlvPointInfoCollection object.

This method ensures that the IlvPointInfoCollection object 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 IlvPointInfoCollection 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 IlvPointInfoCollection 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 IlvPointInfoCollection

virtual void IlvPointInfoCollection::removeAllPointInfo ( )
pure virtual

Removes all point information.

Removes all the point information objects that are managed by the current object.

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

Implemented in IlvPointInfoSingleton, IlvPointInfoArray, and IlvPointInfoMap.

virtual IlBoolean IlvPointInfoCollection::removePointInfo ( IlUInt  ptidx)
pure virtual

Removes the point information for a given data point.

When you remove a point information object, the point information object is not deleted but it is 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
ptidxThe index of the data point with which the point information that is removed is associated.
Returns
IlTrue if the point information has been removed and IlFalse otherwise.

Implemented in IlvPointInfoSingleton, IlvPointInfoArray, and IlvPointInfoMap.

IlvOutputFile& IlvPointInfoCollection::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 IlvPointInfoCollection::Load member function. This method first writes information regarding the type of the object and calls the IlvPointInfoCollection::write method.

Parameters
fileThe file where the complete object description is written.
virtual void IlvPointInfoCollection::setPointInfo ( IlUInt  ptidx,
IlvChartDataPointInfo ptInfo,
IlBoolean  copy = IlFalse 
)
pure virtual

Sets the point information defined for a given data point.

If a point information object has already been stored in the current object for the data point at index ptidx, this point information is replaced by ptInfo. The new point information ptInfo is locked.

Parameters
ptidxThe index of the data point for which the point information is set.
ptInfoThe new point information.
copyA Boolean value indicating whether the point information passed as a parameter must be copied. If copy is IlTrue, the point information is copied. Otherwise, a pointer to the point information stored in ptInfo is kept and so its contents should not be deleted since it is maintained internally.

Implemented in IlvPointInfoSingleton, IlvPointInfoArray, and IlvPointInfoMap.

void IlvPointInfoCollection::unLock ( )

Unlocks the current IlvPointInfoCollection object.

Decrements the reference count of the current object and deletes the object when the count becomes 0.

virtual void IlvPointInfoCollection::write ( IlvOutputFile file) const
pure virtual

Writes the attributes of the current object in a file.

Called by the IlvPointInfoCollection::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 DeclarePointInfoCollectionTypeInfo macro within the class declaration.

Parameters
fileThe file where the attributes of the current object are written.

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