Ilwis-Objects
1.0
GIS and Remote Sensing framework for data access and processing
|
#include <columndefinition.h>
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 DataDefinition & | datadef () const |
DataDefinition & | datadef () |
bool | isMultiple () const |
isMultiple More... | |
void | multiple (bool yesno) |
void | columnindex (quint64 idx) |
quint64 | columnindex () const |
bool | isChanged () const |
void | changed (bool yesno) |
![]() | |
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 | |
![]() | |
Identity (const QString &name, qint64 id=i64UNDEF, const QString &cde=sUNDEF, const QString &descr=sUNDEF) | |
void | prepare (quint64 base=0) |
void | setId (quint64 newid) |
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
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
def | the original ColumnDefinition |
index | the 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.
name | the name of the new ColumnDefinition (recommended not to be null/ """); |
def | The Datadefinition of the new ColumnDefinition |
colindex | the 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.
nm | |
dom | |
colindex |
void ColumnDefinition::changed | ( | bool | yesno | ) |
Sets the changed flag
yesno | the 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.
idx | The new index |
quint64 ColumnDefinition::columnindex | ( | ) | const |
Query for the index of this ColumnDefinition.
const DataDefinition & ColumnDefinition::datadef | ( | ) | const |
Query for the DataDefinition of this ColumnDefinition.
DataDefinition & ColumnDefinition::datadef | ( | ) |
Query for the DataDefinition of this ColumnDefinition.
bool ColumnDefinition::isChanged | ( | ) | const |
Query for the changed flag.
bool ColumnDefinition::isMultiple | ( | ) | const |
isMultiple
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.
void ColumnDefinition::multiple | ( | bool | yesno | ) |
Sets the multiple flag
yesno | the new value of the multiple flag |
QString ColumnDefinition::type | ( | ) | const |
Query for the type of this object.
Will return "Column".