rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvAbstractProjector Class Reference

Abstract base class for data projection. More...

#include <ilviews/charts/common.h>

Inheritance diagram for IlvAbstractProjector:
IlvCartesianProjector IlvPolarProjector

List of all members.

Public Member Functions

virtual IlvAbstractProjectorcopy () const =0
 Virtual copy constructor.
void lock ()
 Locks the current IlvAbstractProjector object.
IlvOutputFilesave (IlvOutputFile &file) const
 Writes a complete description of the current object in a file.
void unLock ()
 Unlocks the current IlvAbstractProjector object.
virtual void write (IlvOutputFile &file) const =0
 Writes the attributes of the current object in a file.

Static Public Member Functions

static IlvAbstractProjectorLoad (IlvInputFile &file)
 Reads a projector object from a file.

Protected Member Functions

 IlvAbstractProjector (IlvInputFile &file)
 Constructor.
 IlvAbstractProjector (const IlvAbstractProjector &projector)
 Constructor.
 IlvAbstractProjector ()
 Constructor.

Detailed Description

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

See also:
IlvCartesianProjector, IlvPolarProjector.

Constructor & Destructor Documentation

IlvAbstractProjector::IlvAbstractProjector (  )  [protected]

Constructor.

Initializes a new IlvAbstractProjector object.

IlvAbstractProjector::IlvAbstractProjector ( const IlvAbstractProjector projector  )  [protected]

Constructor.

Initializes a new IlvAbstractProjector object as a copy of projector.

Parameters:
projector The object used to initialize the current one.
IlvAbstractProjector::IlvAbstractProjector ( IlvInputFile file  )  [protected]

Constructor.

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

Parameters:
file The file used to initialize the current projector.

Member Function Documentation

virtual IlvAbstractProjector* IlvAbstractProjector::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 DeclareProjectorTypeInfo macro. The IlvPredefinedProjectorIOMembers macro lets you define a default implementation, which returns an instance initialized with the copy constructor.

Returns:
A copy of the current object.
static IlvAbstractProjector* IlvAbstractProjector::Load ( IlvInputFile file  )  [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.

Parameters:
file The file where the object description is stored.
Returns:
A pointer to the created object.
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.

Parameters:
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.

virtual void IlvAbstractProjector::write ( IlvOutputFile file  )  const [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.

Parameters:
file The file where the attributes of the current object are written.
 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.