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 () | |
virtual WossDb *const | createWossDb ()=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 *const woss_db)=0 |
Protected Attributes | |
bool | debug |
bool | woss_db_debug |
::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.
WossDbCreator::WossDbCreator | ( | ) |
Default WossDbCreator creator
|
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.
References debug.
Referenced by woss::WossController::initialize().
|
protectedpure virtual |
Initializes the pointed object
woss_db | pointer to a recently created WossDb |
Implemented in woss::BathyGebcoDbCreator, woss::BathyUtmCsvDbCreator, woss::ResPressureBinDbCreator, woss::ResPressureTxtDbCreator, woss::ResTimeArrBinDbCreator, woss::ResTimeArrTxtDbCreator, woss::SspWoa2005DbCreator, and woss::SedimDeck41DbCreator.
References woss::WossDb::finalizeConnection(), woss::WossDb::openConnection(), woss::WossDb::setDebug(), and woss_db_debug.
Referenced by woss::BathyGebcoDbCreator::initializeDb(), woss::BathyUtmCsvDbCreator::initializeDb(), woss::ResPressureBinDbCreator::initializeDb(), woss::ResPressureTxtDbCreator::initializeDb(), woss::ResTimeArrBinDbCreator::initializeDb(), woss::ResTimeArrTxtDbCreator::initializeDb(), woss::SspWoa2005DbCreator::initializeDb(), and woss::SedimDeck41DbCreator::initializeDb().
|
protected |
WossDbCreator debug flag binded in Tcl
Referenced by woss::ResPressureBinDbCreator::createWossDb(), woss::ResPressureTxtDbCreator::createWossDb(), woss::ResTimeArrBinDbCreator::createWossDb(), woss::ResTimeArrTxtDbCreator::createWossDb(), and createWossDb().
|
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(), and woss::SspWoa2005DbCreator::createWossDb().
|
protected |
WossDb debug flag binded in Tcl. All objects instantiated will have this flag
Referenced by initializeDb().