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 | Protected Member Functions | List of all members
Ilwis::NumericDomain Class Reference

#include <numericdomain.h>

Inheritance diagram for Ilwis::NumericDomain:
Ilwis::Domain Ilwis::IlwisObject Ilwis::Identity

Public Member Functions

 NumericDomain ()
 
 NumericDomain (const Resource &resource)
 
 NumericDomain (NumericRange *r)
 
void range (Range *vr)
 
QVariant impliedValue (const QVariant &) const
 
Domain::Containement contains (const QVariant &value) const
 
bool isCompatibleWith (const IDomain &dom) const
 
IlwisTypes valueType () const
 
IlwisTypes ilwisType () const
 
void setParent (const IDomain &dm)
 
- Public Member Functions inherited from Ilwis::Domain
 Domain ()
 
 Domain (const Resource &resource)
 
bool isStrict () const
 
void setStrict (bool yesno)
 
IDomain parent () const
 
template<typename T = Range>
QSharedPointer< T > range2range () const
 
- Public Member Functions inherited from Ilwis::IlwisObject
 IlwisObject ()
 
 IlwisObject (const Resource &source)
 
virtual bool prepare ()
 
void setName (const QString &nm)
 
void setCode (const QString &cd)
 
QDateTime modifiedTime () const
 returns the moment when the object was last modified More...
 
void setModifiedTime (const Time &time)
 sets the last modified time of the object More...
 
Time createTime () const
 
void setCreateTime (const Time &time)
 
virtual QString toString ()
 translates the defintion of an object to a string representation More...
 
virtual void setConnector (ConnectorInterface *connector, int mode=cmINPUT|cmOUTPUT)
 connects an ilwisobject to an input or output source More...
 
virtual bool isEqual (const Ilwis::IlwisObject *obj) const
 isEqual compares the properties of ilwisobjects to test for equality. More...
 
virtual bool isValid () const
 isValid Tests the validity of an ilwisobject. More...
 
virtual bool isReadOnly () const
 isReadOnly tells if the source/target of the ilwisobject maybe modifiable. More...
 
virtual void setReadOnly (bool yesno)
 
virtual bool hasChanged () const
 
virtual void changed (bool yesno)
 
virtual bool prepare (const QString &def)
 prepare More...
 
bool fromInternal (const QSqlRecord &rec)
 
bool isAnonymous () const
 
virtual Resource source (int mode=cmINPUT) const
 source the location of the source that represents the physical read origin of this object More...
 
virtual bool store (int mode=smMETADATA|smBINARYDATA)
 target the location of the source that represents the physical write target of this object More...
 
void connectTo (const QUrl &url, const QString &format, const QString &fnamespace, ConnectorMode cmode)
 
virtual IlwisObjectclone ()
 
virtual bool merge (const IlwisObject *obj, int options=0)
 
bool isSystemObject () const
 
bool isInternalObject () const
 
- Public Member Functions inherited from Ilwis::Identity
QString code () const
 code returns the code of the identity. If no code is attached it will return sUNDEF ("?"). More...
 
quint64 id () const
 id returns a unsigned 64-bit number unique for the objects using the identity More...
 
virtual QString name () const
 name returns the name of an object. All objects have names though names need not to be unique More...
 
void setName (const QString &n)
 setName sets the name of an object. All objects have names though names need not to be unique More...
 
virtual QString description () const
 
void setDescription (const QString &desc)
 

Static Public Member Functions

static QString standardNumericDomainName (double vmin, double vmax, double step=rUNDEF)
 
- Static Public Member Functions inherited from Ilwis::Domain
static IlwisTypes ilwType (const QVariant &v)
 
static IlwisTypes ilwType (const QString &impliedValue)
 
- Static Public Member Functions inherited from Ilwis::IlwisObject
template<typename T >
static T create (const QString &def)
 
template<typename T >
static T create (quint64 id)
 
static IlwisObjectcreate (const Resource &source, const PrepareOptions &options=PrepareOptions())
 
static IlwisTypes findType (const QString &source)
 findType More...
 
static QString type2Name (IlwisTypes t)
 
static IlwisTypes name2Type (const QString &name)
 
static void addTypeFunction (IlwisTypeFunction)
 addTypeFunction More...
 
static IlwisTypes name2ExtendedType (const QString &dname)
 

Protected Member Functions

SPRange getRange () const
 
- Protected Member Functions inherited from Ilwis::Domain
void addChildDomain (quint64 idchild)
 
bool removeChildDomain (quint64 idchild)
 
- Protected Member Functions inherited from Ilwis::IlwisObject
QScopedPointer
< ConnectorInterface > & 
connector (int mode=cmINPUT|cmOUTPUT)
 
const QScopedPointer
< ConnectorInterface > & 
connector (int mode=cmINPUT|cmOUTPUT) const
 
bool setValid (bool yesno)
 
void copyTo (IlwisObject *obj)
 
- Protected Member Functions inherited from Ilwis::Identity
 Identity (const QString &name, qint64 id=i64UNDEF, const QString &cde=sUNDEF, const QString &descr=sUNDEF)
 
void prepare (quint64 base=0)
 
void setId (quint64 newid)
 

Additional Inherited Members

- Public Types inherited from Ilwis::Domain
enum  Containement { cSELF =1, cPARENT =2, cDECLARED =3, cNONE =0 }
 
- Protected Attributes inherited from Ilwis::Domain
std::map< quint64, quint32 > _childDomains
 

Detailed Description

A Numericdomain has a range of numeric items,
Numeric items are ordered items that have numeric sub-ranges. For example 0-100,100-200,300-400.

See Also
Domain
ItemDomain

Constructor & Destructor Documentation

NumericDomain::NumericDomain ( )

Creates an empty NumericDomain

NumericDomain::NumericDomain ( const Resource resource)

The constructor for a NumericDomain with a a Resource that is registered in the mastercatalog.
This resource must have a name and an Id.
Code and description are optional.

Parameters
resourceResource to be used

Member Function Documentation

Domain::Containement NumericDomain::contains ( const QVariant &  value) const
virtual

Checks if the value is contained in either this domain or the parentdomain. Has no preconditions.

See Also
Domain
Parameters
valThe value to be checked
Returns
cPARENT when the value is contained in the parent and this domain is not strict, cSELF if the value is contained in this domain and cNONE if the value is contained in neither

Implements Ilwis::Domain.

IlwisTypes NumericDomain::ilwisType ( ) const
virtual

Gives the IlwisTypes of this object

See Also
IlwisObject
Returns
the IlwisTypes of this IlwisObject

Implements Ilwis::IlwisObject.

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

still has to been finished, not yet done

Returns
QVariant.toString

Reimplemented from Ilwis::Domain.

bool NumericDomain::isCompatibleWith ( const IDomain dom) const
virtual

Checks if this NumericDomain is compatible with another IDomain,
will not be compatible if the other domain is:

Parameters
domthe domain to be tested
Returns
true when compatible

Implements Ilwis::Domain.

void NumericDomain::range ( Range vr)
virtual

Changes the Range of this NumericDomain.
This function only works if the readonly flag has not been set and the new range has to contain numericitems.(be a NumericItemRange)

See Also
NumericItemRange
Parameters
vrThe new range

Implements Ilwis::Domain.

void NumericDomain::setParent ( const IDomain dm)
virtual

Sets a new parent on this domain, the parent has to be valid and so does this domain

Parameters
dmthe new parentdomain

Reimplemented from Ilwis::Domain.

QString NumericDomain::standardNumericDomainName ( double  vmin,
double  vmax,
double  step = rUNDEF 
)
static

Determines the Standard name for this NumericDomain with the given parameters The standard name is used to differentiate between different NumericDomains

The name can be:

  • "value" : generic real value domain
  • "image" : 0- 8 bits integer
  • "image16" : 0- 16 bits integer
  • "count" : integer positive domain
  • "integer" : generic integer domain
  • "min1to1" : -1 to 1 real value domain
  • "nilto1" : 0 to 1 real value domain
Parameters
vminminimum value
vmaxmaximum value
stepstep size
Returns
String with the standard name of this domain

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