Ilwis-Objects  1.0
GIS and Remote Sensing framework for data access and processing
 All Classes Functions Enumerations Pages
Public Member Functions | Static Public Member Functions | List of all members
Ilwis::NumericRange Class Reference

The NumericRange class describes a range of numbers between a minimum and maximum combined with a resolution. More...

#include <numericrange.h>

Inheritance diagram for Ilwis::NumericRange:
Ilwis::Range Ilwis::TimeInterval

Public Member Functions

 NumericRange (double mi, double ma, double resolution=0)
 NumericRange basic constructor for the range with a minimum and a maximum and a resolution. More...
 
 NumericRange (const NumericRange &vr)
 NumericRange copy constructor. More...
 
bool isValid () const
 
Rangeclone () const
 
bool contains (double v, bool inclusive=true) const
 
bool contains (const QVariant &value, bool inclusive=true) const
 
bool contains (SPRange rng, bool inclusive=true) const
 
bool contains (NumericRange *rng, bool inclusive=true) const
 
double max () const
 
void max (double v)
 
double min () const
 
void min (double v)
 
double distance () const
 
void resolution (double resolution)
 
double resolution () const
 
NumericRangeoperator+= (double v)
 
bool operator== (const NumericRange &vr)
 
bool operator< (const NumericRange &vr)
 
bool operator> (const NumericRange &vr)
 
QString toString () const
 
QVariant impliedValue (const QVariant &v) const
 
void set (const NumericRange &vr)
 
QVariant ensure (const QVariant &v, bool inclusive=true) const
 
IlwisTypes determineType () const
 determineType determines the minimal range needed type for this range. More...
 
void clear ()
 
- Public Member Functions inherited from Ilwis::Range
virtual IlwisTypes valueType () const
 valueType returns the type of values contained in the range More...
 
template<typename T >
T * merge (const QSharedPointer< T > &range1, const QSharedPointer< T > &range2, RenumberMap *rnm=0)
 
virtual bool isContinuous () const
 
void interpolation (const QString &ip)
 
virtual QString interpolation () const
 

Static Public Member Functions

static NumericRangemerge (const QSharedPointer< NumericRange > &nr1, const QSharedPointer< NumericRange > &nr2, RenumberMap *rnm=0)
 

Additional Inherited Members

- Protected Attributes inherited from Ilwis::Range
IlwisTypes _vt
 
QString _interpolation
 

Detailed Description

The NumericRange class describes a range of numbers between a minimum and maximum combined with a resolution.

Constructor & Destructor Documentation

NumericRange::NumericRange ( double  mi,
double  ma,
double  resolution = 0 
)

NumericRange basic constructor for the range with a minimum and a maximum and a resolution.

*If the resolution is 0, the range has same resolution a double. A step size of 0 will make the range iterator invalid. This prefectly legal, it only makes the iterator not usable. *A resolution of an integer will make the range an integer range

Parameters
miminimum of the range
mamaximum of the range
stepresolution of the range.
NumericRange::NumericRange ( const NumericRange vr)

NumericRange copy constructor.

Parameters
vrother value range

Member Function Documentation

Range * NumericRange::clone ( ) const
virtual

copies the range to a new instance. This pointer has to be deleted by the caller

Returns
the new Range

Implements Ilwis::Range.

Reimplemented in Ilwis::TimeInterval.

IlwisTypes NumericRange::determineType ( ) const
virtual

determineType determines the minimal range needed type for this range.

*For example a range of numbers can be in the 32 bits range while the range contains only the numbers between 0-255, so the minimal range would be itUINT8

Returns
an ilwistype

Reimplemented from Ilwis::Range.

bool NumericRange::isValid ( ) const
virtual

determines the validity of a range. This method must be implemented by each deravative

Returns
true for a valid range

Implements Ilwis::Range.

Reimplemented in Ilwis::TimeInterval.

QString NumericRange::toString ( ) const
virtual

translates the string into a string representation. As each type of range has a different string representation this method has to be reimplemented by each derivative

Returns
a string

Implements Ilwis::Range.


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