svcore  1.9
RangeMapper Class Reference

#include <RangeMapper.h>

Inheritance diagram for RangeMapper:

List of all members.

Public Member Functions

virtual ~RangeMapper ()
virtual int getPositionForValue (float value) const =0
 Return the position that maps to the given value, rounding to the nearest position and clamping to the minimum and maximum extents of the mapper's positional range.
virtual int getPositionForValueUnclamped (float value) const =0
 Return the position that maps to the given value, rounding to the nearest position, without clamping.
virtual float getValueForPosition (int position) const =0
 Return the value mapped from the given position, clamping to the minimum and maximum extents of the mapper's value range.
virtual float getValueForPositionUnclamped (int position) const =0
 Return the value mapped from the given positionq, without clamping.
virtual QString getUnit () const
 Get the unit of the mapper's value range.

Detailed Description

Definition at line 24 of file RangeMapper.h.


Constructor & Destructor Documentation

virtual RangeMapper::~RangeMapper ( ) [inline, virtual]

Definition at line 27 of file RangeMapper.h.


Member Function Documentation

virtual int RangeMapper::getPositionForValue ( float  value) const [pure virtual]

Return the position that maps to the given value, rounding to the nearest position and clamping to the minimum and maximum extents of the mapper's positional range.

Implemented in AutoRangeMapper, InterpolatingRangeMapper, LogRangeMapper, and LinearRangeMapper.

Referenced by PropertyContainer::convertPropertyStrings(), and AutoRangeMapper::getPositionForValue().

virtual int RangeMapper::getPositionForValueUnclamped ( float  value) const [pure virtual]

Return the position that maps to the given value, rounding to the nearest position, without clamping.

That is, whatever mapping function is in use will be projected even outside the minimum and maximum extents of the mapper's positional range. (The mapping outside that range is not guaranteed to be exact, except if the mapper is a linear one.)

Implemented in AutoRangeMapper, InterpolatingRangeMapper, LogRangeMapper, and LinearRangeMapper.

Referenced by AutoRangeMapper::getPositionForValueUnclamped().

virtual float RangeMapper::getValueForPosition ( int  position) const [pure virtual]

Return the value mapped from the given position, clamping to the minimum and maximum extents of the mapper's value range.

Implemented in AutoRangeMapper, InterpolatingRangeMapper, LogRangeMapper, and LinearRangeMapper.

Referenced by AutoRangeMapper::getValueForPosition().

virtual float RangeMapper::getValueForPositionUnclamped ( int  position) const [pure virtual]

Return the value mapped from the given positionq, without clamping.

That is, whatever mapping function is in use will be projected even outside the minimum and maximum extents of the mapper's value range. (The mapping outside that range is not guaranteed to be exact, except if the mapper is a linear one.)

Implemented in AutoRangeMapper, InterpolatingRangeMapper, LogRangeMapper, and LinearRangeMapper.

Referenced by AutoRangeMapper::getValueForPositionUnclamped().

virtual QString RangeMapper::getUnit ( ) const [inline, virtual]

Get the unit of the mapper's value range.

Reimplemented in AutoRangeMapper, InterpolatingRangeMapper, LogRangeMapper, and LinearRangeMapper.

Definition at line 64 of file RangeMapper.h.


The documentation for this class was generated from the following file: