ColumnDefinition::ColumnDefinition(const ColumnDefinition& coldef){
    if(coldef.__bool__())
    {
        Ilwis::ColumnDefinition* ilwDef = coldef.ptr().get();
        if(ilwDef->isValid())
            _ilwisColDef.reset(new Ilwis::ColumnDefinition(*ilwDef));
    }
}
AttributeModel::AttributeModel(const Ilwis::ColumnDefinition& def, QObject *parent, const Ilwis::IIlwisObject& obj) :
    QObject(parent),
    _coldefinition(def),
    _owner(obj)
{
    if ( def.isValid() && def.datadef().domain()->ilwisType() == itITEMDOMAIN && def.datadef().domain()->valueType() != itINDEXEDITEM) {
        if (!def.datadef().domain()->range().isNull()) {
            QString defset = def.datadef().domain()->range()->toString();
            defset = defset.mid(defset.indexOf(":") + 1);
            _attributeValuesDefaultRange = defset.split("|");
        }
        if (!def.datadef().range().isNull()) {
            QString defset = def.datadef().domain()->range()->toString();
            defset = defset.mid(defset.indexOf(":") + 1);
            _attributeValuesActualRange = defset.split("|");
        }
    }
}