|
World Ocean Simulation System (WOSS) library
|
Abstract class that provides the interface of database creator ( Factory object ) More...
#include <woss-db-creator.h>


Public Member Functions | |
| WossDbCreator ()=default | |
| WossDbCreator (const WossDbCreator ©)=default | |
| WossDbCreator (WossDbCreator &&tmp)=default | |
| virtual | ~WossDbCreator ()=default |
| WossDbCreator & | operator= (const WossDbCreator ©)=default |
| virtual std::unique_ptr< WossDb > | createWossDb () const =0 |
| virtual std::unique_ptr< WossDbCreator > | clone () const =0 |
| WossDbCreator & | setDebug (bool flag) |
| WossDbCreator & | setWossDebug (bool flag) |
| WossDbCreator & | setDbPathName (const std::string &name) |
| bool | isUsingDebug () const |
| bool | isUsingWossDbDebug () const |
| std::string | getDbPathName () const |
Protected Member Functions | |
| virtual bool | initializeDb (WossDb &woss_db) const =0 |
Protected Attributes | |
| bool | debug = false |
| bool | woss_db_debug = false |
| std::string | pathname = "" |
Abstract class that provides the interface of database creator ( Factory object )
WossDbCreator is the prototype of any database creator included in WOSS. It has the tasks of creating and initializing a specific database object, thus abstracting the caller from specific implementation parameters, and the database itself from system specifics (c++ framework, NS-2 framework, NS-3 framework and so on...)
It also provides a Tcl interpreter for NS-2 implementation.
|
default |
Default WossDbCreator creator
|
default |
|
default |
|
virtualdefault |
|
pure virtual |
Abstract method. Virtual factory method. It is called to clone this WossDbCreator instance. The caller will be the owner of created object, therefore object destruction is his responsibility
Implemented in woss::BathyGebcoDbCreator, woss::BathyUtmCsvDbCreator, woss::ResPressureBinDbCreator, woss::ResPressureTxtDbCreator, woss::ResTimeArrBinDbCreator, woss::ResTimeArrTxtDbCreator, woss::SedimDeck41DbCreator, and woss::SspWoa2005DbCreator.
|
pure virtual |
Abstract method. It is called to create and initialize a WossDb. The caller will be the owner of created object, therefore object destruction is his responsibility
Implemented in woss::BathyGebcoDbCreator, woss::BathyUtmCsvDbCreator, woss::ResPressureBinDbCreator, woss::ResPressureTxtDbCreator, woss::ResTimeArrBinDbCreator, woss::ResTimeArrTxtDbCreator, woss::SedimDeck41DbCreator, and woss::SspWoa2005DbCreator.
|
inline |
References pathname.
|
protectedpure virtual |
Initializes the referenced object
| woss_db | reference to a recently created WossDb |
Implemented in woss::ResPressureBinDbCreator, woss::ResTimeArrBinDbCreator, woss::ResTimeArrTxtDbCreator, woss::BathyGebcoDbCreator, woss::BathyUtmCsvDbCreator, woss::ResPressureTxtDbCreator, woss::SedimDeck41DbCreator, and woss::SspWoa2005DbCreator.
References woss::WossDb::finalizeConnection(), woss::WossDb::openConnection(), woss::WossDb::setDebug(), and woss_db_debug.
Referenced by woss::ResPressureBinDbCreator::initializeDb(), woss::ResTimeArrBinDbCreator::initializeDb(), woss::ResTimeArrTxtDbCreator::initializeDb(), woss::BathyGebcoDbCreator::initializeDb(), woss::BathyUtmCsvDbCreator::initializeDb(), woss::ResPressureTxtDbCreator::initializeDb(), woss::SedimDeck41DbCreator::initializeDb(), and woss::SspWoa2005DbCreator::initializeDb().

|
inline |
References debug.
|
inline |
References woss_db_debug.
|
default |
|
inline |
References pathname.
|
inline |
References debug.
|
inline |
References woss_db_debug.
|
protected |
WossDbCreator debug flag binded in Tcl
Referenced by woss::ResPressureBinDbCreator::createWossDb(), woss::ResPressureTxtDbCreator::createWossDb(), woss::ResTimeArrBinDbCreator::createWossDb(), woss::ResTimeArrTxtDbCreator::createWossDb(), isUsingDebug(), and setDebug().
|
protected |
Pathname or unique identifier
Referenced by woss::BathyGebcoDbCreator::createWossDb(), woss::BathyUtmCsvDbCreator::createWossDb(), woss::ResPressureBinDbCreator::createWossDb(), woss::ResPressureTxtDbCreator::createWossDb(), woss::ResTimeArrBinDbCreator::createWossDb(), woss::ResTimeArrTxtDbCreator::createWossDb(), woss::SspWoa2005DbCreator::createWossDb(), getDbPathName(), and setDbPathName().
|
protected |
WossDb debug flag binded in Tcl. All objects instantiated will have this flag
Referenced by initializeDb(), isUsingWossDbDebug(), and setWossDebug().