Rogue Wave Views Charts Package API Reference Guide |
Rogue Wave Views Documentation Home |
Abstract base class for managing point information objects. More...
#include <ilviews/charts/data.h>
Public Member Functions | |
virtual IlvPointInfoCollection * | copy () const =0 |
Virtual copy constructor. More... | |
virtual IlvChartDataPointInfo * | getInfoForPoint (IlUInt pidx) const =0 |
Returns the point information for a given data point. More... | |
virtual IlvChartDataPointInfo * | getPointInfo (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... | |
IlvOutputFile & | save (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 IlvPointInfoCollection * | Load (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... | |
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.)
IlvPointInfoCollection
is an abstract class. Its constructors are defined as protected since it is not possible to create an instance of this class directly.
|
protected |
Constructor.
Initializes a new IlvPointInfoCollection
object.
|
protected |
Constructor.
Initializes a new IlvPointInfoCollection
object which is a copy of pointInfo.
pointInfo | The point information collection used to initialize the current one. |
|
protected |
Constructor.
Initializes a new IlvPointInfoCollection
object from the description read in the input file named file.
file | The file used to initialize the current point information collection. |
|
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.
|
pure virtual |
Returns the point information for a given data point.
pidx | The index of the data point with which the returned point information is associated. |
Implemented in IlvPointInfoSingleton, IlvPointInfoArray, and IlvPointInfoMap.
|
pure virtual |
Returns the point information at a given index.
idx | The index of the returned point information. |
Implemented in IlvPointInfoSingleton, IlvPointInfoArray, and IlvPointInfoMap.
|
pure virtual |
Returns the number of point information objects managed by this object.
Implemented in IlvPointInfoSingleton, IlvPointInfoArray, and IlvPointInfoMap.
|
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.
file | The file where the object description is stored. |
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
|
pure virtual |
Removes all point information.
Removes all the point information objects that are managed by the current object.
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.
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).
ptidx | The index of the data point with which the point information that is removed is associated. |
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.
file | The file where the complete object description is written. |
|
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.
ptidx | The index of the data point for which the point information is set. |
ptInfo | The new point information. |
copy | A 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
.
|
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.
file | The file where the attributes of the current object are written. |
© Copyright 2016, 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.