World Ocean Simulation System (WOSS) library
woss::WossDbCreator Class Referenceabstract

Abstract class that provides the interface of database creator ( Factory object ) More...

#include <woss-db-creator.h>

Inheritance diagram for woss::WossDbCreator:
Inheritance graph
Collaboration diagram for woss::WossDbCreator:
Collaboration graph

Public Member Functions

 WossDbCreator ()
 
virtual WossDb *const createWossDb ()=0
 
WossDbCreatorsetDebug (bool flag)
 
WossDbCreatorsetWossDebug (bool flag)
 
WossDbCreatorsetDbPathName (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
 

Detailed Description

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.

See also
BathyGebcoDbCreator, SedimDeck41DbCreator, SspWoa2005DbCreator, ResTimeArrTxtDbCreator, ResPressureTxtDbCreator

Constructor & Destructor Documentation

◆ WossDbCreator()

WossDbCreator::WossDbCreator ( )

Default WossDbCreator creator

Member Function Documentation

◆ createWossDb()

virtual WossDb *const woss::WossDbCreator::createWossDb ( )
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

Returns
a pointer to a properly initialized WossDb object

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().

◆ initializeDb()

Member Data Documentation

◆ debug

bool woss::WossDbCreator::debug
protected

◆ pathname

◆ woss_db_debug

bool woss::WossDbCreator::woss_db_debug
protected

WossDb debug flag binded in Tcl. All objects instantiated will have this flag

Referenced by initializeDb().


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