Rogue Wave Views Charts Package API Reference Guide |
Rogue Wave Views Documentation Home |
Abstract base class for data projection. More...
#include <ilviews/charts/common.h>
Public Member Functions | |
virtual IlvAbstractProjector * | copy () const =0 |
Virtual copy constructor. More... | |
void | lock () |
Locks the current IlvAbstractProjector object. More... | |
IlvOutputFile & | save (IlvOutputFile &file) const |
Writes a complete description of the current object in a file. More... | |
void | unLock () |
Unlocks the current IlvAbstractProjector 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 IlvAbstractProjector * | Load (IlvInputFile &file) |
Reads a projector object from a file. More... | |
Protected Member Functions | |
IlvAbstractProjector () | |
Constructor. More... | |
IlvAbstractProjector (const IlvAbstractProjector &projector) | |
Constructor. More... | |
IlvAbstractProjector (IlvInputFile &file) | |
Constructor. More... | |
Abstract base class for data projection.
Library: ilvcharts
This class is the base class that handles the projection of data into screen coordinates. The way a data point is projected into a pixel position p(x, y) depends on the type of the system of coordinates in which the data are expressed.
A lock/unlock system is provided to share an IlvAbstractProjector
object (or one of its derived objects) among different objects. The lock/unlock system ensures that the projector will not be deleted as long as an object needs it. (See the IlvAbstractProjector::lock
and IlvAbstractProjector::unLock
methods for more details.)
IlvCartesianProjector
, IlvPolarProjector
.
|
protected |
Constructor.
Initializes a new IlvAbstractProjector
object.
|
protected |
Constructor.
Initializes a new IlvAbstractProjector
object as a copy of projector.
projector | The object used to initialize the current one. |
|
protected |
Constructor.
Initializes a new IlvAbstractProjector
object from the description read in the input file named file.
file | The file used to initialize the current projector. |
|
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 DeclareProjectorTypeInfo
macro. The IlvPredefinedProjectorIOMembers
macro lets you define a default implementation, which returns an instance initialized with the copy constructor.
|
static |
Reads a projector object from a file.
Creates a projector instance from the description stored in the file file. The object description must have been written with the IlvAbstractProjector::save
method.
file | The file where the object description is stored. |
void IlvAbstractProjector::lock | ( | ) |
Locks the current IlvAbstractProjector
object.
Ensures that the current IlvAbstractProjector
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 IlvAbstractProjector
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 IlvAbstractProjector
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 IlvAbstractProjector
.
IlvOutputFile& IlvAbstractProjector::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 IlvAbstractProjector::Load
member function. This method first writes information regarding the type of the object and calls the IlvAbstractProjector::write
method.
file | The file where the complete object description is written. |
void IlvAbstractProjector::unLock | ( | ) |
Unlocks the current IlvAbstractProjector
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 IlvAbstractProjector::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 DeclareProjectorTypeInfo
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.