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::PublicDatabase Class Reference

#include <publicdatabase.h>

Inheritance diagram for Ilwis::PublicDatabase:

Public Member Functions

 PublicDatabase (const QSqlDatabase &db)
 
void prepare ()
 
bool code2Record (const QString &code, const QString &table, QSqlRecord &rec)
 
QString findAlias (const QString &name, const QString &type, const QString &nspace)
 

Detailed Description

The PublicDatabase class exposes the internal database of Ilwis to the outside world. The default implementation is an in memory sqllite database

Constructor & Destructor Documentation

PublicDatabase::PublicDatabase ( const QSqlDatabase &  db)

PublicDatabase initializes the database. Default sqllite is used but by using this constructor one can overrule it. Care has to be taken that the dialect of sql choosen matches.

Parameters
db

Member Function Documentation

bool PublicDatabase::code2Record ( const QString &  code,
const QString &  table,
QSqlRecord &  rec 
)

convenience method to translate a code to record of the database

Codes are unique for a particular set of classes (e.g. ellipsoids). So if you know the code you can figure out which data belongs to it. To simplify getting the data for a code this method exist

Parameters
codeunique identifier for an instance of a class
tabletable in which the code is the key column
recthe record with the data
Returns
bool false if any errors did occur. The issue stack will have the exact error
void PublicDatabase::prepare ( )

prepare initializes the public database

*this method loads all the system tables in the database. If an error occurs at this level ilwis will abort an log an appropriate message.


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