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::IndexedIdentifierRange Class Reference

#include <identifierrange.h>

Inheritance diagram for Ilwis::IndexedIdentifierRange:
Ilwis::ItemRange Ilwis::Range

Public Member Functions

 IndexedIdentifierRange ()
 
 IndexedIdentifierRange (const QString &prefix, quint32 count, quint32 start=0)
 
bool contains (const QVariant &name, bool inclusive=true) const
 
bool isValid () const
 
bool operator== (const IndexedIdentifierRange &range)
 
void remove (const QString &nm)
 
Rangeclone () const
 
SPDomainItem item (quint32 index) const
 
SPDomainItem item (const QString &nam) const
 
SPDomainItem itemByOrder (quint32 index) const
 
void add (DomainItem *item)
 
void add (SPDomainItem item)
 
QVariant impliedValue (const QVariant &v) const
 
QString toString () const
 
quint32 raw (const QString &item) const
 
quint32 count () const
 
void count (quint32 nr)
 
virtual bool isContinuous () const
 
void interpolation (const QString &)
 
qint32 gotoIndex (qint32 index, qint32 step) 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 IndexedIdentifierRangemerge (const QSharedPointer< IndexedIdentifierRange > &nr1, const QSharedPointer< IndexedIdentifierRange > &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)
 

Additional Inherited Members

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

Detailed Description

Because this class had to fit an interface there are a couple of empty functions and parameters, these should not be used.

Constructor & Destructor Documentation

IndexedIdentifierRange::IndexedIdentifierRange ( )

Constructor for an empty IndexedIdentifierRange.

IndexedIdentifierRange::IndexedIdentifierRange ( const QString &  prefix,
quint32  count,
quint32  start = 0 
)

Constructs a new IndexedIdentifierRange and adds a IndexedIdentifier based on the given values.

Parameters
prefixthe prefix that should be used for the IndexedIdentifier
countthe count that should be used for the IndexedIdentifier
startempty parameter

Member Function Documentation

void IndexedIdentifierRange::add ( DomainItem item)
virtual

Adds a new IndexedIdentifier to this range, only works when item is valid

Parameters
itemthe item that has to be added

Implements Ilwis::ItemRange.

void IndexedIdentifierRange::add ( SPDomainItem  item)
virtual

Adds a new IndexedIdentifier to this range, only works when item is valid

Parameters
itemthe item that has to be added

Implements Ilwis::ItemRange.

Range * IndexedIdentifierRange::clone ( ) const
virtual

Copies this IndexedIdentifierRange range

Returns
a copy of this

Implements Ilwis::Range.

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

Checks if a certain string is contained in this IndexedIdentifierRange.

Parameters
namename of the object that is to be checked
inclusiveempty parameter
Returns
true if the item is contained in this IndexedIdentifierRange

Implements Ilwis::ItemRange.

quint32 IndexedIdentifierRange::count ( ) const
virtual

Returns the current count.

Returns
the current count

Implements Ilwis::ItemRange.

void IndexedIdentifierRange::count ( quint32  nr)

Changes the current count to a new value.

Parameters
nrthe new count
qint32 IndexedIdentifierRange::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 IndexedIdentifierRange::impliedValue ( const QVariant &  v) const
virtual

Creates a QString with the value from a QVariant, only works when the QVariant is valid, will return iUNDEF when this is not the case.

Parameters
vthe QVariant to be converted
Returns
the value in string form

Implements Ilwis::ItemRange.

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

empty function

bool IndexedIdentifierRange::isContinuous ( ) const
virtual

Checks if this object is continuous, which it is not.

Returns
false

Reimplemented from Ilwis::Range.

bool IndexedIdentifierRange::isValid ( ) const
virtual

Checks if this IndexedIdentifierRange is valid.

Returns
true when valid

Implements Ilwis::ItemRange.

SPDomainItem IndexedIdentifierRange::item ( quint32  index) const
virtual

Returns the IndexedIdentifier at the given index, gives an empty object when the index is larger than the position of the last object.

Parameters
indexthe index
Returns
IndexedIdentifier, can be empty

Implements Ilwis::ItemRange.

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

empty function

Implements Ilwis::ItemRange.

SPDomainItem IndexedIdentifierRange::itemByOrder ( quint32  index) const
virtual

returns the item at the given index

Parameters
theindex
Returns
the item at the index

Implements Ilwis::ItemRange.

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

merges 2 IndexedIdentifierRange 's into one

Parameters
nr1one of the IndexedIdentifierRanges to be merged
nr2one of the IndexedIdentifierRanges to be merged
rnmempty parameter
Returns
the result of the merging
bool IndexedIdentifierRange::operator== ( const IndexedIdentifierRange range)

Checks if this IndexedIdentifierRange is equal to another IndexedIdentifierRange.

Parameters
rangethe other range
Returns
true when equal
quint32 Ilwis::IndexedIdentifierRange::raw ( const QString &  item) const

non existant in cpp file

void IndexedIdentifierRange::remove ( const QString &  nm)
virtual

Removes an IndexedIdentifier from this range.

Parameters
nmname of the object to be removed

Implements Ilwis::ItemRange.

QString IndexedIdentifierRange::toString ( ) const
virtual

Creates and returns a String representation of this IndexedIdentifierRange

Returns
a String of this object

Implements Ilwis::Range.


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