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 | Static Protected Member Functions | List of all members
Ilwis::NamedIdentifierRange Class Reference
Inheritance diagram for Ilwis::NamedIdentifierRange:
Ilwis::ItemRange Ilwis::Range Ilwis::ThematicRange

Public Member Functions

 NamedIdentifierRange ()
 
bool contains (const QVariant &name, bool inclusive=true) const
 
bool isValid () const
 
bool operator== (const ItemRange &range) const
 
void add (DomainItem *item)
 
void add (SPDomainItem item)
 
void remove (const QString &item)
 
QVariant impliedValue (const QVariant &v) const
 
NamedIdentifierRangeoperator<< (const QString &itemdef)
 
SPDomainItem item (quint32 iraw) const
 
SPDomainItem item (const QString &nam) const
 
SPDomainItem itemByOrder (quint32 index) const
 
Rangeclone () const
 
QString toString () const
 
virtual bool isContinuous () const
 
void interpolation (const QString &)
 
qint32 gotoIndex (qint32 index, qint32 step) const
 
quint32 count () const
 
void clear ()
 
- Public Member Functions inherited from Ilwis::ItemRange
virtual bool contains (SPRange rng, bool inclusive=true) const
 
virtual bool contains (const ItemRange &itemrng, bool inclusive=true) const
 
QVariant ensure (const QVariant &v, bool inclusive=true) const
 
virtual void addRange (const ItemRange &range)
 
ItemRangemerge (const QSharedPointer< Range > &otherRange) const
 
- Public Member Functions inherited from Ilwis::Range
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...
 
template<typename T >
T * merge (const QSharedPointer< T > &range1, const QSharedPointer< T > &range2, RenumberMap *rnm=0)
 
void interpolation (const QString &ip)
 
virtual QString interpolation () const
 

Static Public Member Functions

static NamedIdentifierRangemerge (const QSharedPointer< NamedIdentifierRange > &nr1, const QSharedPointer< NamedIdentifierRange > &nr2, RenumberMap *rnm=0)
 
- Static Public Member Functions inherited from Ilwis::ItemRange
static DomainItemcreate (const QString &type)
 
static void addCreateItem (const QString &type, CreateItemFunc func)
 
static ItemRangemerge (const QSharedPointer< ItemRange > &nr1, const QSharedPointer< ItemRange > &nr2)
 

Static Protected Member Functions

template<typename T >
static void addItems (ItemRange *items, const QSharedPointer< NamedIdentifierRange > &nr1, const QSharedPointer< NamedIdentifierRange > &nr2, RenumberMap *rnm=0)
 

Additional Inherited Members

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

Constructor & Destructor Documentation

NamedIdentifierRange::NamedIdentifierRange ( )

Constructs an empty NamedIdentifierRange

Member Function Documentation

void NamedIdentifierRange::add ( DomainItem item)
virtual

Adds a new NamedIdentifier to this NamedIdentifierRange, will fail if the item you want to add is invalid

Parameters
itemthe new NamedIdentifier that should be added

Implements Ilwis::ItemRange.

void NamedIdentifierRange::add ( SPDomainItem  item)
virtual

Adds a new NamedIdentifier to this NamedIdentifierRange, will fail if the item you want to add is invalid

Parameters
itemthe new NamedIdentifier that should be added

Implements Ilwis::ItemRange.

Range * NamedIdentifierRange::clone ( ) const
virtual

Creates a clone of this range

Returns
a clone of this range

Implements Ilwis::Range.

bool NamedIdentifierRange::contains ( const QVariant &  name,
bool  inclusive = true 
) const
virtual

Checks if this NamedIdentifierRange contains a certain NamedIdentifier

Parameters
namethe name of the identifier
inclusiveempty parameter
Returns
true when the identifier is in the range

Implements Ilwis::ItemRange.

quint32 NamedIdentifierRange::count ( ) const
virtual

Returns the current count.

Returns
the current count

Implements Ilwis::ItemRange.

qint32 NamedIdentifierRange::gotoIndex ( qint32  index,
qint32  step 
) const
virtual

calculates the next index based on the current index and the size of the step cannot go below 0 or over the count limit

Parameters
indexthe current index
stepthe size of the step, can be negative
Returns
the new index( 0=>result <=count)

Implements Ilwis::ItemRange.

QVariant NamedIdentifierRange::impliedValue ( const QVariant &  v) const
virtual

Returns the value at a certain Index, will fail if the supplied QVariant is invalid

Parameters
vthe QVariant with the index
Returns
the value at the index or sUNDEF

Implements Ilwis::ItemRange.

void Ilwis::NamedIdentifierRange::interpolation ( const QString &  )
inline

empty function

bool NamedIdentifierRange::isContinuous ( ) const
virtual

Checks if this NamedIdentifierRange is continuous (its not)

Returns
false

Reimplemented from Ilwis::Range.

bool NamedIdentifierRange::isValid ( ) const
virtual

Checks if this NamedIdentifierRange is valid

Returns
true when valid

Implements Ilwis::ItemRange.

SPDomainItem NamedIdentifierRange::item ( quint32  iraw) const
virtual

Tries to find a NamedIdentifier in this range with the same raw value as specified. if it fails it will return an empty domain item

Parameters
irawthe raw searched for
Returns
the requested NamedIdentifier or an empty SPDomainItem

Implements Ilwis::ItemRange.

SPDomainItem NamedIdentifierRange::item ( const QString &  nam) const
virtual

Tries to find a NamedIdentifier in this range with the same name as specified, if it fail it will return an empty domain item

Parameters
namthe name seached for
Returns
the requested NamedIdentifier or an empty SPDomainItem

Implements Ilwis::ItemRange.

SPDomainItem NamedIdentifierRange::itemByOrder ( quint32  index) const
virtual

Query for the NamedIdentifier at the given index

Parameters
indexthe index
Returns
the NamedIdentifier at the index, or an empty SPDomainItem if the index is invalid

Implements Ilwis::ItemRange.

NamedIdentifierRange * NamedIdentifierRange::merge ( const QSharedPointer< NamedIdentifierRange > &  nr1,
const QSharedPointer< NamedIdentifierRange > &  nr2,
RenumberMap *  rnm = 0 
)
static

merges 2 NamedIdentifierRange 's into one

Parameters
nr1one of the IndexedIdentifierRanges to be merged
nr2one of the IndexedIdentifierRanges to be merged
rnmspecification of how to renumber the new range default=0
Returns
the result of the merging
NamedIdentifierRange & NamedIdentifierRange::operator<< ( const QString &  itemdef)

override of the << operator, the << operator now adds the string as a NamedIdentifier into this range

Parameters
itemdefThe name of the NamedIdentifier that should be added
Returns
this with an extra identifier
bool NamedIdentifierRange::operator== ( const ItemRange range) const

Compares another NamedIdentifierRange with this one

Parameters
rangeanother NamedIdentifierRange
Returns
true when they are the same (equal)
void NamedIdentifierRange::remove ( const QString &  item)
virtual

Removes an NamedIdentifier from this NamedIdentifierRange

Parameters
itemthe name of the NamedIdentifier that should be removed

Implements Ilwis::ItemRange.

QString NamedIdentifierRange::toString ( ) const
virtual

Creates a String representation of this object

Returns
a string

Implements Ilwis::Range.


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