World Ocean Simulation System (WOSS) library
woss::WossTextualDb Class Reference

Textual implementation of WossDb. More...

#include <woss-db.h>

Inheritance diagram for woss::WossTextualDb:
Inheritance graph
Collaboration diagram for woss::WossTextualDb:
Collaboration graph

Public Member Functions

 WossTextualDb (const std::string &name)
virtual ~WossTextualDb () override
virtual bool openConnection () override
virtual bool closeConnection () override
Public Member Functions inherited from woss::WossDb
 WossDb (const std::string &name)
virtual ~WossDb ()=default
void setDbName (const std::string &pathname)
std::string getDbName () const
void setDebug (double flag=true)
bool isUsingDebug () const
virtual bool isValid () const
virtual bool finalizeConnection ()=0

Protected Attributes

std::fstream textual_db
Protected Attributes inherited from woss::WossDb
std::string db_name
bool debug

Additional Inherited Members

Protected Member Functions inherited from woss::WossDb
PathName getPathName (const std::string &complete_path) const

Detailed Description

Textual implementation of WossDb.

WossNetcdfDb is the textual specialization of WossDb class. It sets up connection to the file and properly initializes a fstream object. No behaviour is superimposed by this class. User has the task to define method finalizeConnection()

See also
ResTimeArrTxtDb, ResPressureTxtDb

Constructor & Destructor Documentation

◆ WossTextualDb()

WossTextualDb::WossTextualDb ( const std::string & name)

WossTextualDb constructor

Parameters
namepathname of database

References textual_db, and woss::WossDb::WossDb().

Referenced by woss::BathyUtmCsvDb::BathyUtmCsvDb(), woss::ResPressureTxtDb::ResPressureTxtDb(), and woss::ResTimeArrTxtDb::ResTimeArrTxtDb().

Here is the call graph for this function:

◆ ~WossTextualDb()

WossTextualDb::~WossTextualDb ( )
overridevirtual

References closeConnection().

Here is the call graph for this function:

Member Function Documentation

◆ closeConnection()

bool WossTextualDb::closeConnection ( )
overridevirtual

Closes the connection to the textual file provided

Returns
true if method was successful, false otherwise

Implements woss::WossDb.

Reimplemented in woss::ResPressureTxtDb, and woss::ResTimeArrTxtDb.

References textual_db.

Referenced by woss::ResPressureTxtDb::closeConnection(), woss::ResTimeArrTxtDb::closeConnection(), and ~WossTextualDb().

◆ openConnection()

bool WossTextualDb::openConnection ( )
overridevirtual

Opens the connection to the textual file provided

Returns
true if method was successful, false otherwise

Implements woss::WossDb.

References woss::WossDb::db_name.

Member Data Documentation

◆ textual_db


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