rwlogo

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions
IlvCoordinateTransformer Class Referenceabstract

Base class defining a transformation to be applied to a coordinate. More...

#include <ilviews/charts/common.h>

Inheritance diagram for IlvCoordinateTransformer:
IlvChartCoordinateTransformer IlvZoomCoordinateTransformer IlvAffineChartTransformer IlvSimpleChartTransformer

Public Member Functions

virtual ~IlvCoordinateTransformer ()
 Destructor. More...
 
virtual IlvCoordinateTransformercopy () const =0
 Virtual copy constructor. More...
 
const IlvCoordinateInfogetOwner () const
 Returns the coordinate information that owns the current object. More...
 
virtual IlBoolean inverseTransformInterval (IlvCoordInterval &itvl) const
 Applies the inverse transformation to an interval. More...
 
virtual IlBoolean inverseTransformPoints (IlUInt pointsCount, IlvDoublePoint *points) const
 Applies the inverse transformation to points. More...
 
virtual IlBoolean inverseTransformValue (IlDouble &val) const =0
 Applies the inverse transformation to a value. More...
 
virtual IlBoolean inverseTransformValues (IlUInt valuesCount, IlDouble *values) const
 Applies the inverse transformation to values. More...
 
IlvOutputFilesave (IlvOutputFile &file) const
 Writes a complete description of the current object in a file. More...
 
virtual IlBoolean transformInterval (IlvCoordInterval &itvl) const
 Applies a transformation to an interval. More...
 
virtual IlBoolean transformPoints (IlUInt pointsCount, IlvDoublePoint *points) const
 Applies a transformation to data points. More...
 
virtual IlBoolean transformValue (IlDouble &value) const =0
 Applies a transformation to a data value. More...
 
virtual IlBoolean transformValues (IlUInt valuesCount, IlDouble *values) const
 Applies a transformation to data values. More...
 
virtual IlBoolean validateInterval (IlvCoordInterval &interval) const
 Validates an interval. More...
 
virtual void write (IlvOutputFile &file) const
 Writes the attributes of the current object in a file. More...
 

Static Public Member Functions

static IlvCoordinateTransformerLoad (IlvInputFile &file)
 Reads a coordinate transformer object from a file. More...
 

Protected Member Functions

 IlvCoordinateTransformer ()
 Constructor. More...
 
 IlvCoordinateTransformer (const IlvCoordinateTransformer &transfo)
 Constructor. More...
 
 IlvCoordinateTransformer (IlvInputFile &file)
 Constructor. More...
 

Detailed Description

Base class defining a transformation to be applied to a coordinate.

Library: ilvcharts

This is an abstract class that allows you to specify a transformation that is applied to a given data coordinate (x, y, theta, or rho) represented by a scale. For example, by specifying the transformation to use, you can transform data values expressed in degrees Celsius to degrees Fahrenheit, thus displaying the values with a scale graduated in degrees Fahrenheit.

The IlvCoordinateTransformer object that is applied to a given coordinate is stored in a specific class named IlvCoordinateInfo. The IlvCoordinateInfo class stores all the information related to a given data coordinate which is represented by a scale. Therefore, we use the term "coordinate information" to describe every instance of the IlvCoordinateInfo class or one of its derived classes.

See Also
IlvChartCoordinateTransformer, IlvCoordinateInfo, IlvDoublePoint.

Constructor & Destructor Documentation

virtual IlvCoordinateTransformer::~IlvCoordinateTransformer ( )
virtual

Destructor.

The destructor sets the stored pointer to the coordinate information object that owns the current object to 0.

IlvCoordinateTransformer::IlvCoordinateTransformer ( )
protected

Constructor.

Initializes a new IlvCoordinateTransformer object.

IlvCoordinateTransformer::IlvCoordinateTransformer ( const IlvCoordinateTransformer transfo)
protected

Constructor.

Initializes a new IlvCoordinateTransformer object which is a copy of transfo.

Parameters
transfoThe object used to initialize the current one.
IlvCoordinateTransformer::IlvCoordinateTransformer ( IlvInputFile file)
protected

Constructor.

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

Parameters
fileThe file used to initialize the current object.

Member Function Documentation

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

Returns
A copy of the current object.
const IlvCoordinateInfo* IlvCoordinateTransformer::getOwner ( ) const

Returns the coordinate information that owns the current object.

Returns
A pointer to the coordinate information object that owns the current object.
virtual IlBoolean IlvCoordinateTransformer::inverseTransformInterval ( IlvCoordInterval itvl) const
virtual

Applies the inverse transformation to an interval.

Parameters
itvlThis parameter stores the interval to transform inversely and is also used to return the interval once it has been inversely transformed.
Returns
IlTrue if the inverse transformation has been successfully applied and IlFalse otherwise.
virtual IlBoolean IlvCoordinateTransformer::inverseTransformPoints ( IlUInt  pointsCount,
IlvDoublePoint points 
) const
virtual

Applies the inverse transformation to points.

Parameters
pointsCountThe number of points to which the inverse transformation is applied.
pointsThis parameter stores the points to transform inversely and is also used to return the points once they have been inversely transformed.
Returns
IlTrue if the inverse transformation has been successfully applied and IlFalse otherwise.
Note
The inverse transformation is applied only to one coordinate of the points since the transformation is defined for one coordinate (x, y, theta, or rho) represented by a given scale.

Reimplemented in IlvZoomCoordinateTransformer, and IlvChartCoordinateTransformer.

virtual IlBoolean IlvCoordinateTransformer::inverseTransformValue ( IlDouble val) const
pure virtual

Applies the inverse transformation to a value.

Parameters
valThis parameter stores the value to transform inversely and is also used to return the value once it has been inversely transformed.
Returns
IlTrue if the inverse transformation has been successfully applied and IlFalse otherwise.

Implemented in IlvZoomCoordinateTransformer, and IlvChartCoordinateTransformer.

virtual IlBoolean IlvCoordinateTransformer::inverseTransformValues ( IlUInt  valuesCount,
IlDouble values 
) const
virtual

Applies the inverse transformation to values.

Parameters
valuesCountThe number of values to which the inverse transformation is applied.
valuesThis parameter stores the values to transform inversely and is also used to return the values once they have been inversely transformed.
Returns
IlTrue if the inverse transformation has been successfully applied and IlFalse otherwise.

Reimplemented in IlvChartCoordinateTransformer.

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

Reads a coordinate transformer object from a file.

Creates a coordinate transformer instance from the description stored in the file file. The object description must have been written with the IlvCoordinateTransformer::save method.

Parameters
fileThe file where the object description is stored.
Returns
A pointer to the created object.
IlvOutputFile& IlvCoordinateTransformer::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 IlvCoordinateTransformer::Load member function. This method first writes information regarding the type of the object and calls the IlvCoordinateTransformer::write method.

Parameters
fileThe file where the complete object description is written.
virtual IlBoolean IlvCoordinateTransformer::transformInterval ( IlvCoordInterval itvl) const
virtual

Applies a transformation to an interval.

Parameters
itvlThis parameter stores the interval to transform and is also used to return the interval once it has been transformed.
Returns
IlTrue if the transformation has been successfully applied and IlFalse otherwise.
virtual IlBoolean IlvCoordinateTransformer::transformPoints ( IlUInt  pointsCount,
IlvDoublePoint points 
) const
virtual

Applies a transformation to data points.

Parameters
pointsCountThe number of points to which the transformation is applied.
pointsThis parameter stores the points to transform and is also used to return the transformed points.
Returns
IlTrue if the transformation has been successfully applied and IlFalse otherwise.
Note
The transformation is applied only to one coordinate of the points, since the transformation is defined for one coordinate (x, y, theta or rho) represented by a given scale.

Reimplemented in IlvZoomCoordinateTransformer, and IlvChartCoordinateTransformer.

virtual IlBoolean IlvCoordinateTransformer::transformValue ( IlDouble value) const
pure virtual

Applies a transformation to a data value.

Parameters
valueThis parameter stores the value to transform and is also used to return the transformed value.
Returns
IlTrue if the transformation has been successfully applied and IlFalse otherwise.

Implemented in IlvZoomCoordinateTransformer, and IlvChartCoordinateTransformer.

virtual IlBoolean IlvCoordinateTransformer::transformValues ( IlUInt  valuesCount,
IlDouble values 
) const
virtual

Applies a transformation to data values.

Parameters
valuesCountThe number of values to which the transformation is applied.
valuesThis parameter stores the values to transform and is also used to return the transformed values.
Returns
IlTrue if the transformation has been successfully applied and IlFalse otherwise.

Reimplemented in IlvChartCoordinateTransformer.

virtual IlBoolean IlvCoordinateTransformer::validateInterval ( IlvCoordInterval interval) const
virtual

Validates an interval.

Changes the interval interval so that it becomes consistent with the definition domain of the transformer. The default implementation does nothing and returns IlFalse, which indicates that the interval has not been modified.

Parameters
intervalThe interval to validate.
Returns
A Boolean value indicating whether the interval has been modified.

Reimplemented in IlvZoomCoordinateTransformer, and IlvChartCoordinateTransformer.

virtual void IlvCoordinateTransformer::write ( IlvOutputFile file) const
virtual

Writes the attributes of the current object in a file.

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

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

Reimplemented in IlvChartCoordinateTransformer.


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