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

#include <columndefinition.h>

Inheritance diagram for Ilwis::ColumnDefinition:
Ilwis::Identity

Public Member Functions

 ColumnDefinition ()
 
 ColumnDefinition (const ColumnDefinition &def, quint32 index)
 
 ColumnDefinition (const QString &name, const DataDefinition &def, quint64 colindex)
 
 ColumnDefinition (const QString &nm, const IDomain &dom, quint64 colindex=i64UNDEF)
 
bool isValid () const
 
QString type () const
 
const DataDefinitiondatadef () const
 
DataDefinitiondatadef ()
 
bool isMultiple () const
 isMultiple More...
 
void multiple (bool yesno)
 
void columnindex (quint64 idx)
 
quint64 columnindex () const
 
bool isChanged () const
 
void changed (bool yesno)
 
- Public Member Functions inherited from Ilwis::Identity
virtual void setCode (const QString &code)
 sets the code for this instance More...
 
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)
 

Additional Inherited Members

- 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)
 

Detailed Description

A ColumnDefinition Defines the values in the column of a Table. These values have a domain and a range. Additionally the index and the name of the defined column are kept. For ease of used the changed and multiple flags are used. The changed flag will be set whenever something changes within this ColumnDefinition, the multiple flag will be set when

Constructor & Destructor Documentation

ColumnDefinition::ColumnDefinition ( )

Constructs an empty ColumnDefinition

ColumnDefinition::ColumnDefinition ( const ColumnDefinition def,
quint32  index 
)

Copy constructor. Copies the fields of the supplied ColumnDefinition onto a new one.
sets the multiple and changed flags to false.
Does not copy the index. so a new one must be specified
the index cannot be negative

Parameters
defthe original ColumnDefinition
indexthe new index
ColumnDefinition::ColumnDefinition ( const QString &  name,
const DataDefinition def,
quint64  colindex 
)

Constructs a new ColumnDefinition using a name, DataDefinition an index.
The index cannot be negative.

See Also
DataDefinition
Parameters
namethe name of the new ColumnDefinition (recommended not to be null/ """);
defThe Datadefinition of the new ColumnDefinition
colindexthe index of the new ColumnDefinition
ColumnDefinition::ColumnDefinition ( const QString &  nm,
const IDomain dom,
quint64  colindex = i64UNDEF 
)

Creates a new ColumnDefinition using a name, a Domain and an index.
Because only a Domain is used the range will not be set.
The index cannot be negative.

Parameters
nm
dom
colindex

Member Function Documentation

void ColumnDefinition::changed ( bool  yesno)

Sets the changed flag

Parameters
yesnothe new value of the changed flag.
void ColumnDefinition::columnindex ( quint64  idx)

Sets the index of the ColumnDefinition to the given value.
The new index should not be negative.

Parameters
idxThe new index
quint64 ColumnDefinition::columnindex ( ) const

Query for the index of this ColumnDefinition.

Returns
The Columnindex of this ColumnDefinition
const DataDefinition & ColumnDefinition::datadef ( ) const

Query for the DataDefinition of this ColumnDefinition.

Returns
The DataDefinition
DataDefinition & ColumnDefinition::datadef ( )

Query for the DataDefinition of this ColumnDefinition.

Returns
The DataDefinition
bool ColumnDefinition::isChanged ( ) const

Query for the changed flag.

Returns
true if this ColumnDefinition has been changed
bool ColumnDefinition::isMultiple ( ) const

isMultiple

Returns
bool ColumnDefinition::isValid ( ) const

Checks if this ColumnDefinition is valid.
To be valid a ColumnDefinition has to have a name that is not iUNDEF and a valid domain.

See Also
Domain
Returns
void ColumnDefinition::multiple ( bool  yesno)

Sets the multiple flag

Parameters
yesnothe new value of the multiple flag
QString ColumnDefinition::type ( ) const

Query for the type of this object.
Will return "Column".

Returns
"Column"

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