Ilwis-Objects
1.0
GIS and Remote Sensing framework for data access and processing
|
Public Member Functions | |
BaseTable () | |
BaseTable (const Resource &resource) | |
virtual quint32 | recordCount () const |
virtual quint32 | columnCount () const |
virtual void | recordCount (quint32 r) |
virtual bool | createTable () |
virtual bool | addColumn (const QString &name, const IDomain &domain) |
virtual bool | addColumn (const QString &name, const QString &domainname) |
virtual bool | addColumn (const ColumnDefinition &def) |
IlwisTypes | ilwisType () const |
ColumnDefinition | columndefinition (const QString &nme) const |
ColumnDefinition | columndefinition (quint32 index) const |
ColumnDefinition & | columndefinition (quint32 index) |
void | columndefinition (const ColumnDefinition &coldef) |
bool | prepare () |
bool | isValid () const |
bool | merge (const IlwisObject *obj, int options) |
void | dataLoaded (bool yesno) |
bool | isDataLoaded () const |
![]() | |
virtual void | newRecord ()=0 |
virtual std::vector< QVariant > | record (quint32 n) const =0 |
virtual void | record (quint32 rec, const std::vector< QVariant > &vars, quint32 offset=0)=0 |
virtual std::vector< QVariant > | column (const QString &nme, quint32 start=0, quint32 stop=2e9) const =0 |
virtual std::vector< QVariant > | column (quint32 index, quint32 start=0, quint32 stop=2e9) const =0 |
virtual void | column (const QString &nme, const std::vector< QVariant > &vars, quint32 offset=0)=0 |
virtual void | column (const quint32 index, const std::vector< QVariant > &vars, quint32 offset=0)=0 |
virtual QVariant | cell (const QString &col, quint32 rec, bool asRaw=true) const =0 |
virtual QVariant | cell (const quint32 index, quint32 rec, bool asRaw=true) const =0 |
virtual void | setCell (const QString &col, quint32 rec, const QVariant &var)=0 |
virtual void | setCell (quint32 col, quint32 rec, const QVariant &var)=0 |
virtual std::vector< quint32 > | select (const QString &conditions) const =0 |
![]() | |
IlwisObject () | |
IlwisObject (const Resource &source) | |
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 | 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 IlwisObject * | clone () |
bool | isSystemObject () const |
bool | isInternalObject () const |
![]() | |
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) |
Protected Member Functions | |
virtual bool | initLoad () |
virtual void | adjustRange (int index) |
void | copyTo (IlwisObject *obj) |
quint32 | columnIndex (const QString &nme) const |
void | columnCount (int cnt) |
QVariant | checkInput (const QVariant &inputVar, quint32 columnIndex) |
void | initValuesColumn (const ColumnDefinition &def) |
void | initRecord (std::vector< QVariant > &values) const |
![]() | |
Table (const Resource &resource) | |
![]() | |
QScopedPointer < ConnectorInterface > & | connector (int mode=cmINPUT|cmOUTPUT) |
const QScopedPointer < ConnectorInterface > & | connector (int mode=cmINPUT|cmOUTPUT) const |
bool | setValid (bool yesno) |
void | copyTo (IlwisObject *obj) |
![]() | |
Identity (const QString &name, qint64 id=i64UNDEF, const QString &cde=sUNDEF, const QString &descr=sUNDEF) | |
void | prepare (quint64 base=0) |
void | setId (quint64 newid) |
Protected Attributes | |
QHash< QString, ColumnDefinition > | _columnDefinitionsByName |
QHash< quint32, ColumnDefinition > | _columnDefinitionsByIndex |
Additional Inherited Members | |
![]() | |
enum | ConnectorMode { cmINPUT =1, cmOUTPUT =2, cmEXTENDED =4 } |
The ConnectorMode enum Describes the state of the instance of the connector. More... | |
enum | StoreMode { smMETADATA =1, smBINARYDATA =2 } |
![]() | |
template<typename T > | |
static T | create (const QString &def) |
template<typename T > | |
static T | create (quint64 id) |
static IlwisObject * | create (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) |
BaseTable::BaseTable | ( | ) |
Constructs an empty BaseTable
BaseTable::BaseTable | ( | const Resource & | resource | ) |
The constructor for a BaseTable with a a Resource that is registered in the mastercatalog.
This resource must have a name and an Id.
Code and description are optional.
resource | The resource to use |
|
virtual |
adds a column to the current set of columns of this table
the name string must be unique and the domain must be valid.
if this collumn creates a duplicate nothing will happen.
the collumn will be filled with appropriate defaults depending on the domain
name | the name of a column must be unique among the columns |
domain | the domain of the new column |
Implements Ilwis::Table.
Reimplemented in Ilwis::FlatTable, and Ilwis::DatabaseTable.
|
virtual |
adds a column to the current set of columns of this table.
duplicate columns wil be skipped
The new collumn contents will be set to appropriate defaults depending on the domain
The name string must be unique in the set of collumns and the domainname must be valid
name | the name of a column must be unique among the columns |
domain | the domain of the new column |
Implements Ilwis::Table.
|
virtual |
adds a column to the column definitions.
ColumnDefinition must be valid.
The new column contents will be set to appropriate defaults depending on the domain
def | The ColumnDefinition of the new column |
Implements Ilwis::Table.
Reimplemented in Ilwis::FlatTable.
|
virtual |
returns the number of columns in a table.
cannot be negative.
Implements Ilwis::Table.
|
virtual |
retrieves the definition of the column with the given name.
if there is no collumn with that name an invalid ColumnDefinition will be returned.
nme | name of the column definition to be retrieved |
Implements Ilwis::Table.
|
virtual |
retrieves the definition of the column at the given index.
if there is no collumn at this index an invalid ColumnDefinition will be returned.
index | index of the column definition to be retrieved |
Implements Ilwis::Table.
|
virtual |
retrieves a reference to the definition of the column.
if there is no collumn at this index nullptr will be returned.
index | index of the ColumnDefinition to be retrieved |
Implements Ilwis::Table.
|
virtual |
sets a new column definition. The new definition must be valid.
coldef | the new ColumnDefinition to be set |
Implements Ilwis::Table.
|
protectedvirtual |
Translates a String with a column name into a column index
nme | the name of the column |
Implements Ilwis::Table.
|
virtual |
Creates a table based on the definitions in the columndefinition members. Will load the data in the specified amount of collumns and rows
Implements Ilwis::Table.
Reimplemented in Ilwis::DatabaseTable, and Ilwis::FlatTable.
|
virtual |
Gives the IlwisTypes of this object
Implements Ilwis::IlwisObject.
Reimplemented in Ilwis::DatabaseTable, and Ilwis::FlatTable.
|
virtual |
a BaseTable is valid if it has rows and columns
Reimplemented from Ilwis::IlwisObject.
Reimplemented in Ilwis::FlatTable, and Ilwis::DatabaseTable.
|
virtual |
Merges this BaseTable with another BaseTable. Requires the given object to be a BaseTable, and the object cannot be null or undefined ofcourse
obj | the object this shouls merge with |
options | options for the merging, see TableMerger |
Reimplemented from Ilwis::IlwisObject.
|
virtual |
tries to Prepares this ilwisobject for use
Reimplemented from Ilwis::IlwisObject.
Reimplemented in Ilwis::FlatTable, and Ilwis::DatabaseTable.
|
virtual |
return the number of rows in a table.
cannot be negative.
Implements Ilwis::Table.
|
virtual |
sets the number of rows in a table. If the number of rows is bigger than the current number of rows is the extra records will be filled with appropriate defaults depending on the domain.
if the number is smaller the excess records will be deleted.
Negative values are not allowed.
r | the new row number |
Implements Ilwis::Table.