![]() |
UNIVERS
15.3
UNIVERS base processing software API
|
#include <seismic_qsql.hpp>
Public Member Functions | |
| SeismicQSql (const ContextQSql &dbc, const std::string &project_str, const size_t hdrs_cache_size=8192, const size_t bodies_cache_size=4096) | |
| virtual | ~SeismicQSql () |
| virtual ErrCode | open (const std::string &name, OpenMode mode) |
| virtual ErrCode | close () |
| virtual ErrCode | flush () |
| virtual ErrCode | setName (const std::string &name_str) |
| virtual std::string | name (ErrCode *rc=NULL) const |
| virtual ErrCode | remove (const std::string &name) |
| virtual ErrCode | getList (Names &list) const |
| virtual size_t | dataSize (const std::string &name, ErrCode *prc=NULL) const |
| virtual time_t | creationTime (const std::string &name, ErrCode *prc=NULL) const |
| virtual time_t | modificationTime (const std::string &name, ErrCode *prc=NULL) const |
| virtual DbIndex | rawDbIndex (size_t id, ErrCode *prc=NULL) const |
| virtual ErrCode | getVolumeHeader (VolumeHeader &vol_header) const |
| virtual size_t | tracesNum (ErrCode *rc=NULL) const |
| virtual const TrHeader & | rawTrHeader (const DbIndex &id, ErrCode *rc=NULL) const |
| virtual const TrBody & | rawTrBody (const DbIndex &id, ErrCode *rc=NULL) const |
| virtual ErrCode | setVolumeHeader (const VolumeHeader &vol_header) |
| virtual ErrCode | rawSetTrHeader (const DbIndex &id, const TrHeader &hdr) |
| virtual ErrCode | rawSetTrBody (const DbIndex &id, const TrBody &body) |
| virtual ErrCode | appendTr (const TrHeader &header, const TrBody &body) |
| virtual ErrCode | eraseTr (size_t id) |
| virtual ErrCode | select (const TrSelector &selector=TrSelector()) |
| virtual const TrSelector & | getSelector () const |
| const DbIndex & | getCurrentSeismicId () const |
| void | setBufferAllHeadersFlag (bool flag=true) |
| bool | getBufferAllHeadersFlag () |
Public Member Functions inherited from hds::db::Seismic | |
| Seismic (const std::string &project_str) | |
| virtual | ~Seismic () |
| const std::string & | getProject () const |
| virtual const TrHeader & | trHeader (size_t id, ErrCode *prc=NULL) const |
| virtual const TrBody & | trBody (size_t id, ErrCode *prc=NULL) const |
| virtual ErrCode | setTrHeader (size_t id, const TrHeader &hdr) |
| virtual ErrCode | setTrBody (size_t id, const TrBody &body) |
| const TrHeader & | getDefaultTrHeader () const |
Public Member Functions inherited from hds::db::Object | |
| Object () | |
| virtual | ~Object () |
| virtual OpenMode | openMode () const |
| virtual bool | exists (const std::string &name, ErrCode *rc=NULL) const |
Public Member Functions inherited from hds::db::QSqlImpl | |
| QSqlImpl () | |
| QSqlImpl (const ContextQSql &dbc) | |
| virtual | ~QSqlImpl () |
| const ContextQSql & | getDbContext () const |
| QSqlDatabase & | getDb () |
| bool | supportTransactionsFlag () const |
| ErrCode | dbConnect () const |
| QMutex & | getDefaultMutex () const |
Protected Attributes | |
| DbIndex | m_cur_seismic_id |
| TrSelector | m_tr_selector |
| DbIndex | m_db_lock_id |
Protected Attributes inherited from hds::db::Seismic | |
| std::string | m_project_str |
Protected Attributes inherited from hds::db::Object | |
| OpenMode | m_cur_open_mode |
Protected Attributes inherited from hds::db::QSqlImpl | |
| QSqlDatabase | m_db |
| ContextQSql | m_dbc |
| bool | m_is_transaction_started |
Friends | |
| class | ProjectQSql |
Additional Inherited Members | |
Public Types inherited from hds::db::Object | |
| typedef std::vector< std::string > | Names |
Public Types inherited from hds::db::QSqlImpl | |
| enum | TableLockType { TLT_READ = 0, TLT_WRITE } |
| typedef std::vector < TableLockDescr > | TLDVec |
Protected Member Functions inherited from hds::db::QSqlImpl | |
| ErrCode | db_init (const hds::db::ContextQSql &context) |
| ErrCode | db_close (const hds::db::ContextQSql &context) |
| ErrCode | db_lock_tables (const TLDVec &tld_vec) |
| ErrCode | db_release_tables_locks () |
| ErrCode | db_get_lock (const std::string &lock_name, const size_t timeout=3) const |
| ErrCode | db_release_lock (const std::string &lock_name) const |
| ErrCode | db_set_item_value (const std::string &table_name, const std::string &field_name, const std::string &key_name, const DbIndex &key_id, const std::string &value) |
| ErrCode | db_get_item_value (const std::string &table_name, const std::string &field_name, const std::string &key_name, const DbIndex &key_id, std::string &value) const |
| time_t | db_table_creation_time (const std::string &table_name, ErrCode *prc=NULL) const |
| time_t | db_table_modification_time (const std::string &table_name, ErrCode *prc=NULL) const |
| quint64 | db_table_size (const std::string &table_name, ErrCode *prc=NULL) const |
| size_t | db_table_rows_num (const std::string &table_name, ErrCode *prc=NULL) const |
| ErrCode | db_transaction_begin () const |
| ErrCode | db_transaction_commit () |
| ErrCode | db_transaction_rollback () |
| QString | get_db_name_hash (const hds::db::ContextQSql &context) const |
Seismic data access.
| hds::db::SeismicQSql::SeismicQSql | ( | const ContextQSql & | dbc, |
| const std::string & | project_str, | ||
| const size_t | hdrs_cache_size = 8192, |
||
| const size_t | bodies_cache_size = 4096 |
||
| ) |
Constructor with data base context and project provided.
| dbc | SQL Data base context. |
| project_str | Name of the project. Not actual if seismic will be opened as temporary (OM_TMP open mode). Number of cached traces. 0 or 1 => no cache. |
|
virtual |
Close opened data and destruct object.
|
virtual |
Append new trace. Return EC_NO_ERROR if all correct, otherwise
return correspondent error code.
Implements hds::db::Seismic.
|
virtual |
Try to close opened or created data. Return EC_NO_ERROR if all correct,
otherwise return correspondent error code.
Implements hds::db::Object.
|
virtual |
Get creation time of the object with provided name.
| prc | if provided will be EC_NO_ERROR if all correct, otherwise will be correspondent error code. |
Implements hds::db::Object.
|
virtual |
Get size of seismic data in bytes. Not supported for temporary seismic.
| name | Name of the project. |
| prc | Resulted error code if provided. |
Implements hds::db::Object.
|
virtual |
Erase tr with provided id. Return EC_NO_ERROR if all correct, otherwise
return correspondent error code.
Implements hds::db::Seismic.
|
virtual |
Synchronizes modified data with database.
Implements hds::db::Object.
| bool hds::db::SeismicQSql::getBufferAllHeadersFlag | ( | ) |
Get buffer all headers flag.
|
inline |
Get current seismic database id.
Get list of data base objects names for current context.
If seismic is opened as temporary then it returns a list of temporary seismics, which are not connected to any project. Return EC_NO_ERROR if all correct, otherwise return correspondent error code.
Implements hds::db::Object.
|
virtual |
Access to current selector object.
Implements hds::db::Seismic.
|
virtual |
Get volume header of the seismic. Return EC_NO_ERROR if all correct,
otherwise return correspondent error code.
Implements hds::db::Seismic.
|
virtual |
Get modification time of the object with provided name.
| prc | if provided will be EC_NO_ERROR if all correct, otherwise will be correspondent error code. |
Implements hds::db::Object.
|
virtual |
Get name of the seismic.
rc will be EC_NO_ERROR if all correct, otherwise correspondent error code.
Implements hds::db::Object.
Try to open data with provided name. Return EC_NO_ERROR if all correct,
otherwise return correspondent error code.
Implements hds::db::Object.
Get raw database index for provided index of trace.
rc will contain error code if provided. rc = EC_NO_ERROR if all correct.
Implements hds::db::Seismic.
|
virtual |
Set body of the trace with provided database raw id.
Implements hds::db::Seismic.
|
virtual |
Set header of the trace with provided database raw id.
Implements hds::db::Seismic.
|
virtual |
Access to the body of the trace for reading with raw database index provided.
rc will contain error code if provided.
Implements hds::db::Seismic.
|
virtual |
Access to the header of the trace for reading with raw database index provided.
rc will contain error code if provided.
Implements hds::db::Seismic.
|
virtual |
Try to remove seismic with provided name. Return EC_NO_ERROR if all correct,
otherwise return correspondent error code.
Implements hds::db::Object.
|
virtual |
Makes a selection with provided selector. Seismic must be opened.
| selector | Selection rules object. Empty selector by default provides raw order of traces. |
Implements hds::db::Seismic.
| void hds::db::SeismicQSql::setBufferAllHeadersFlag | ( | bool | flag = true | ) |
Set buffer all headers flag.
All headers read in cache while seismic open if this mode is turned on.
|
virtual |
Set name of the seismic.
Return EC_NO_ERROR if all correct, otherwise return correspondent error code.
Implements hds::db::Object.
|
virtual |
Set new volume header. Return EC_NO_ERROR if all correct,
otherwise return correspondent error code.
Implements hds::db::Seismic.
|
virtual |
Number of traces. rc will contain error code if provided.
Implements hds::db::Seismic.
|
friend |
All the friends.
|
protected |
< Current id of the seismic if opened. Current traces selector.
|
protected |
Current database lock id.
1.8.5