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 | Friends | List of all members
Ilwis::ItemRange Class Referenceabstract

#include <itemrange.h>

Inheritance diagram for Ilwis::ItemRange:
Ilwis::Range Ilwis::ColorPalette Ilwis::IndexedIdentifierRange Ilwis::NamedIdentifierRange Ilwis::NumericItemRange Ilwis::ThematicRange

Public Member Functions

virtual QVariant impliedValue (const QVariant &v) const =0
 
virtual quint32 count () const =0
 
virtual SPDomainItem item (quint32 raw) const =0
 
virtual SPDomainItem item (const QString &nam) const =0
 
virtual SPDomainItem itemByOrder (quint32 index) const =0
 
virtual bool contains (const QVariant &name, bool inclusive=true) const =0
 
virtual bool contains (SPRange rng, bool inclusive=true) const
 
virtual bool contains (const ItemRange &itemrng, bool inclusive=true) const
 
virtual bool isValid () const =0
 
virtual void add (DomainItem *item)=0
 
virtual void add (SPDomainItem item)=0
 
virtual void remove (const QString &nm)=0
 
QVariant ensure (const QVariant &v, bool inclusive=true) const
 
virtual void addRange (const ItemRange &range)
 
virtual qint32 gotoIndex (qint32 index, qint32 step) const =0
 
ItemRangemerge (const QSharedPointer< Range > &otherRange) const
 
virtual void clear ()=0
 
- Public Member Functions inherited from Ilwis::Range
virtual QString toString () const =0
 
virtual IlwisTypes valueType () const
 valueType returns the type of values contained in the range More...
 
virtual IlwisTypes determineType () const
 determineType determines the minimal range needed type for this range. More...
 
virtual Rangeclone () const =0
 
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 DomainItemcreate (const QString &type)
 
static void addCreateItem (const QString &type, CreateItemFunc func)
 
static ItemRangemerge (const QSharedPointer< ItemRange > &nr1, const QSharedPointer< ItemRange > &nr2)
 

Friends

template<typename T >
class ItemDomain
 

Additional Inherited Members

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

Detailed Description

Template for the ItemRange subclasses. A Range decides what kind of values the items on this range can take. a Range is an essential component of Domains because it determines the possible values within a domain

Member Function Documentation

virtual void Ilwis::ItemRange::add ( DomainItem item)
pure virtual

Adds an item to this ItemRange.
the added item must be valid.

Parameters
itemthe item to be added

Implemented in Ilwis::NamedIdentifierRange, Ilwis::IndexedIdentifierRange, Ilwis::ColorPalette, and Ilwis::NumericItemRange.

virtual void Ilwis::ItemRange::add ( SPDomainItem  item)
pure virtual

Adds an item to this ItemRange.
The added item must be valid.

Parameters
itemthe item to be added

Implemented in Ilwis::NamedIdentifierRange, Ilwis::IndexedIdentifierRange, Ilwis::ColorPalette, and Ilwis::NumericItemRange.

void ItemRange::addCreateItem ( const QString &  type,
CreateItemFunc  func 
)
static

??

void ItemRange::addRange ( const ItemRange range)
virtual

adds a certain ItemRange to this range.
In the case of duplicate items, only 1 will be kept in the final result.
The range that has to be added must be valid.

Parameters
rangethe range to be added

Reimplemented in Ilwis::NumericItemRange.

virtual bool Ilwis::ItemRange::contains ( const QVariant &  name,
bool  inclusive = true 
) const
pure virtual

Checks if the ItemRange contains a certain item. Returns true if there is and item which name matches the given string.

Parameters
namename of the item
inclusivetemplate parameter
Returns
true if this range contains the item

Implements Ilwis::Range.

Implemented in Ilwis::NamedIdentifierRange, Ilwis::ColorPalette, Ilwis::NumericItemRange, and Ilwis::IndexedIdentifierRange.

bool ItemRange::contains ( SPRange  rng,
bool  inclusive = true 
) const
virtual

Checks if the ItemRange contains a certain range of items.
The range must be valid.

Parameters
rngthe range to be checked
inclusivetemplate parameter
Returns
true if rng is contained in this ItemRange

Reimplemented in Ilwis::ColorPalette.

bool ItemRange::contains ( const ItemRange itemrng,
bool  inclusive = true 
) const
virtual

Checks if the ItemRange contains a certain range of items.
The range must be valid.

Parameters
itemrngthe range to be checked
inclusivetemplate parameter
Returns
true if rng is contained in this ItemRange
virtual quint32 Ilwis::ItemRange::count ( ) const
pure virtual

Query for the amount of items in this range.
Cannot be negative

Returns
the amount of items

Implemented in Ilwis::NamedIdentifierRange, Ilwis::IndexedIdentifierRange, Ilwis::ColorPalette, and Ilwis::NumericItemRange.

DomainItem * ItemRange::create ( const QString &  type)
static

Checks if you can create a certain type of item with this ItemRange??

QVariant ItemRange::ensure ( const QVariant &  v,
bool  inclusive = true 
) const
virtual

at this moment a empty method, will always return the same double as you give it

Reimplemented from Ilwis::Range.

virtual qint32 Ilwis::ItemRange::gotoIndex ( qint32  index,
qint32  step 
) const
pure virtual

combines a index and a step size into a new position the index cannot be lower as 0, neither can it be higher than the maximum index. step size may be negative.

Parameters
indexthe (current) index
stepstep size
Returns
the new index

Implemented in Ilwis::NamedIdentifierRange, Ilwis::IndexedIdentifierRange, and Ilwis::NumericItemRange.

virtual QVariant Ilwis::ItemRange::impliedValue ( const QVariant &  v) const
pure virtual

Transforms a QVariant into the String representation of this value on the range.
Will only work when the given value is in this range.

Parameters
vThe QVariant you want translated
Returns
a string with the value

Reimplemented from Ilwis::Range.

Implemented in Ilwis::NamedIdentifierRange, Ilwis::IndexedIdentifierRange, Ilwis::ColorPalette, and Ilwis::NumericItemRange.

virtual bool Ilwis::ItemRange::isValid ( ) const
pure virtual

checks the validity of this range.

Returns
true when valid

Implements Ilwis::Range.

Implemented in Ilwis::NamedIdentifierRange, Ilwis::ColorPalette, Ilwis::IndexedIdentifierRange, and Ilwis::NumericItemRange.

virtual SPDomainItem Ilwis::ItemRange::item ( quint32  raw) const
pure virtual

Query for an item based on the raw value of that item.
Will not work if there is no item with this raw value in the range.(returns null or undef)

Parameters
rawThe raw value of the item
Returns
the item

Implemented in Ilwis::NamedIdentifierRange, Ilwis::IndexedIdentifierRange, Ilwis::ColorPalette, and Ilwis::NumericItemRange.

virtual SPDomainItem Ilwis::ItemRange::item ( const QString &  nam) const
pure virtual

Query for an item based on the name of that item.
Will not work if there is no item with this name in the range.(returns null or undef)

Parameters
namthe name of the item
Returns
the item

Implemented in Ilwis::NamedIdentifierRange, Ilwis::IndexedIdentifierRange, Ilwis::ColorPalette, and Ilwis::NumericItemRange.

virtual SPDomainItem Ilwis::ItemRange::itemByOrder ( quint32  index) const
pure virtual

Query for an item based on the index of that item Will not work if there is no item on this index in the range.(returns null or undef)

Parameters
indexthe index of the item
Returns
the item

Implemented in Ilwis::NamedIdentifierRange, Ilwis::IndexedIdentifierRange, Ilwis::ColorPalette, and Ilwis::NumericItemRange.

ItemRange* Ilwis::ItemRange::merge ( const QSharedPointer< Range > &  otherRange) const

Merges this ItemRange with another.
Both ranges must be valid, and both ranges must be itemranges for this to work.

Parameters
otherRangethe other range to be merged
Returns
the result of the merging
ItemRange * ItemRange::merge ( const QSharedPointer< ItemRange > &  nr1,
const QSharedPointer< ItemRange > &  nr2 
)
static

Merges 2 itemranges into a new one Both ranges must be valid, and both ranges must be itemranges for this to work.

Parameters
nr1the first ItemRange to be merged
nr2the second ItemRange to be merged
Returns
virtual void Ilwis::ItemRange::remove ( const QString &  nm)
pure virtual

Removes an item from this range.
If there is no item of this name in the range nothing will happen.

Parameters
nmthe name of the item to be removed

Implemented in Ilwis::NamedIdentifierRange, Ilwis::IndexedIdentifierRange, Ilwis::ColorPalette, and Ilwis::NumericItemRange.


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