|
| FlatTable () |
|
| FlatTable (const Resource &resource) |
|
bool | createTable () |
|
void | newRecord () |
|
std::vector< QVariant > | record (quint32 n) const |
|
void | record (quint32, const std::vector< QVariant > &vars, quint32 offset=0) |
|
std::vector< QVariant > | column (const QString &nme, quint32 start=0, quint32 stop=2e9) const |
|
std::vector< QVariant > | column (quint32 index, quint32 start=0, quint32 stop=2e9) const |
|
void | column (const QString &nme, const std::vector< QVariant > &vars, quint32 offset=0) |
|
void | column (quint32 index, const std::vector< QVariant > &vars, quint32 offset) |
|
QVariant | cell (const QString &col, quint32 rec, bool asRaw=true) const |
|
QVariant | cell (const quint32 index, quint32 rec, bool asRaw=true) const |
|
void | setCell (const QString &col, quint32 rec, const QVariant &var) |
|
void | setCell (quint32, quint32 rec, const QVariant &var) |
|
bool | prepare () |
|
bool | isValid () const |
|
bool | addColumn (const QString &name, const IDomain &domain) |
|
bool | addColumn (const ColumnDefinition &def) |
|
std::vector< quint32 > | select (const QString &conditions) const |
|
IlwisTypes | ilwisType () const |
|
IlwisObject * | clone () |
|
| BaseTable () |
|
| BaseTable (const Resource &resource) |
|
virtual quint32 | recordCount () const |
|
virtual quint32 | columnCount () const |
|
virtual void | recordCount (quint32 r) |
|
virtual bool | addColumn (const QString &name, const QString &domainname) |
|
ColumnDefinition | columndefinition (const QString &nme) const |
|
ColumnDefinition | columndefinition (quint32 index) const |
|
ColumnDefinition & | columndefinition (quint32 index) |
|
void | columndefinition (const ColumnDefinition &coldef) |
|
bool | merge (const IlwisObject *obj, int options) |
|
void | dataLoaded (bool yesno) |
|
bool | isDataLoaded () const |
|
|
bool | isColumnIndexValid (quint32 index) const |
|
void | copyTo (IlwisObject *obj) |
|
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) |
|
|
std::vector< std::vector
< QVariant > > | _datagrid |
|
QHash< QString, ColumnDefinition > | _columnDefinitionsByName |
|
QHash< quint32, ColumnDefinition > | _columnDefinitionsByIndex |
|
FlatTable::FlatTable |
( |
const Resource & |
resource | ) |
|
The constructor for a FlatTable with a a Resource that is registered in the mastercatalog.
This resource must have a name and an Id.
Code and description are optional.
- See Also
- IlwisObject
-
Resource
- Parameters
-
resource | The resource to use |
bool FlatTable::addColumn |
( |
const QString & |
name, |
|
|
const IDomain & |
domain |
|
) |
| |
|
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
- See Also
- IDomain
- Parameters
-
name | the name of a column must be unique among the columns |
domain | the domain of the new column |
- Returns
- true if the column is succesfully added, false if some error occurred. The nature of the error can be found in the issue logger
Reimplemented from Ilwis::BaseTable.
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
- Parameters
-
- Returns
- true if succesful. Duplicate columns are not allowed
Reimplemented from Ilwis::BaseTable.
QVariant FlatTable::cell |
( |
const QString & |
col, |
|
|
quint32 |
rec, |
|
|
bool |
asRaw = true |
|
) |
| const |
|
virtual |
returns the value of a single record/field combination ( a cell).
Disabling asRaw (setting it to false) has negative effects on performance.
- Parameters
-
col | column name |
rec | record number |
asRaw | when set to false it will return the String value on Thematic and Identifier domains |
- Returns
- the value of the cell or an invalid qvariant if an error occured. The nature of the error can be found in the issue logger
Implements Ilwis::Table.
QVariant FlatTable::cell |
( |
const quint32 |
index, |
|
|
quint32 |
rec, |
|
|
bool |
asRaw = true |
|
) |
| const |
|
virtual |
returns the value of a single record/field combination ( a cell).
Disabling asRaw (setting it to false) has negative effects on performance.
- Parameters
-
index | column index |
asRaw | when set to false it will return the String value on Thematic and Identifier domains |
rec | record number |
- Returns
- the value of the cell or an invalid qvariant if an error occured. The nature of the error can be found in the issue logger
Implements Ilwis::Table.
std::vector< QVariant > FlatTable::column |
( |
const QString & |
nme, |
|
|
quint32 |
start = 0 , |
|
|
quint32 |
stop = 2e9 |
|
) |
| const |
|
virtual |
returns the content of a column with a name in a vector. Will return an empty vector if there is no collumn with that name
- Parameters
-
nme | name of the column to be returned |
start | The index at which it should start returning values(within the collumn) |
stop | The index at which it should stop returning values(within the collumn) |
- Returns
- A filled variantlist or an empty list if an error occurred. The nature of the error can be found in the issue logger
Implements Ilwis::Table.
std::vector< QVariant > FlatTable::column |
( |
quint32 |
index, |
|
|
quint32 |
start = 0 , |
|
|
quint32 |
stop = 2e9 |
|
) |
| const |
|
virtual |
returns the content of a column at a index in a vector. Will return an empty vector if there is no column with that name
- Parameters
-
index | the index of the column to be returned |
start | The index at which it should start returning values(within the collumn) |
stop | The index at which it should stop returning values(within the collumn) |
- Returns
- A filled variantlist or an empty list if an error occurred. The nature of the error can be found in the issue logger
Implements Ilwis::Table.
void FlatTable::column |
( |
const QString & |
nme, |
|
|
const std::vector< QVariant > & |
vars, |
|
|
quint32 |
offset = 0 |
|
) |
| |
|
virtual |
sets a column with values from variantlist. The list doesnt need to contain all the rows in a column but may contain a subset.
Note that the rows are in consecutive order.
- Parameters
-
nme | name of the column to be set |
vars | values of the rows |
offset | starting row form where the values are set. If the number of values to be added goes beyond the size of the table, new records will be added |
Implements Ilwis::Table.
void FlatTable::column |
( |
quint32 |
index, |
|
|
const std::vector< QVariant > & |
vars, |
|
|
quint32 |
offset |
|
) |
| |
|
virtual |
sets a column with values from variantlist. The list doesnt need to contain all the rows in a column but may contain a subset.
Note that the rows are in consecutive order.
- Parameters
-
index | index of the column to be set |
vars | values of the rows |
offset | starting row form where the values are set. If the number of values to be added goes beyond the size of the table, new records will be added |
Implements Ilwis::Table.
bool FlatTable::createTable |
( |
| ) |
|
|
virtual |
Creates a table based on the definitions in the columndefinition members. Will load the data in the specified amount of collumns and rows
- Returns
- true if succesfull
Reimplemented from Ilwis::BaseTable.
IlwisTypes FlatTable::ilwisType |
( |
| ) |
const |
|
virtual |
bool FlatTable::isValid |
( |
| ) |
const |
|
virtual |
void FlatTable::newRecord |
( |
| ) |
|
|
virtual |
Adds a new record to this table It will be filled with appropriate default values depending on the domain(s)
Implements Ilwis::Table.
bool FlatTable::prepare |
( |
| ) |
|
|
virtual |
tries to Prepares this ilwisobject for use
- Returns
- true when the prepare succeeded
Reimplemented from Ilwis::BaseTable.
std::vector< QVariant > FlatTable::record |
( |
quint32 |
n | ) |
const |
|
virtual |
retrieves a record from a table. A record contains all the fields for one row. This method is implemented in the derivatives
of table as how records are organized is quite different between the derivatives
- Parameters
-
n | the row/record number of the record |
- Returns
- A filled variantlist or an empty list if an error occurred. The nature of the error can be found in the issue logger
Implements Ilwis::Table.
void FlatTable::record |
( |
quint32 |
rec, |
|
|
const std::vector< QVariant > & |
vars, |
|
|
quint32 |
offset = 0 |
|
) |
| |
|
virtual |
sets a record with values from variantlist. The list doesnt need to contain all the fields in a record but may contain a subset.
Note that the fields are in consecutive order. It is up to the programmer that the order of fields in the list match the order of fields in the table
- Parameters
-
rec | record that has to be updated. If the record number is beyond the last record or the record is iUNDEF, the record will appended to the end |
vars | the list values to be set |
offset | starting point of the field to be set |
Implements Ilwis::Table.
std::vector< quint32 > FlatTable::select |
( |
const QString & |
conditions | ) |
const |
|
virtual |
Selects the indices of all collumns that meet the conditions specified in the conditions String
so for example: if conditions is
col1 < 5 AND col2 == "two"
it will return all indices at which collumns 1 and 2 meet the requirements
This function is still under development, only the most basic expressions are implemented at this time
- Parameters
-
- Returns
Implements Ilwis::Table.
void FlatTable::setCell |
( |
const QString & |
col, |
|
|
quint32 |
rec, |
|
|
const QVariant & |
var |
|
) |
| |
|
virtual |
Sets the value of a single cell
- Parameters
-
col | column name of the cell to be set |
rec | record number of the cell to be set |
var | the new value of the cell |
Implements Ilwis::Table.
void FlatTable::setCell |
( |
quint32 |
col, |
|
|
quint32 |
rec, |
|
|
const QVariant & |
var |
|
) |
| |
|
virtual |
Sets the value of a single cell
- Parameters
-
col | index of the column of the cell to be set |
rec | record number of the cell to be set |
var | the new value of the cell |
Implements Ilwis::Table.
The documentation for this class was generated from the following files:
- ilwisobjects/table/flattable.h
- ilwisobjects/table/flattable.cpp