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

Binary WossDb for Pressure. More...

#include <res-pressure-bin-db.h>

Inheritance diagram for woss::ResPressureBinDb:
Inheritance graph
Collaboration diagram for woss::ResPressureBinDb:
Collaboration graph

Public Member Functions

 ResPressureBinDb (const ::std::string &name)
 
- Public Member Functions inherited from woss::ResPressureTxtDb
 ResPressureTxtDb (const ::std::string &name)
 
virtual bool closeConnection ()
 
virtual bool finalizeConnection ()
 
virtual PressuregetValue (const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value) const
 
virtual bool insertValue (const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value, const Pressure &pressure)
 
- Public Member Functions inherited from woss::WossTextualDb
 WossTextualDb (const ::std::string &name)
 
virtual bool openConnection ()
 
- Public Member Functions inherited from woss::WossDb
 WossDb (const ::std::string &name)
 
void setDbName (const ::std::string &pathname)
 
::std::string getDbName () const
 
void setDebug (double flag=true)
 
bool isUsingDebug () const
 
virtual bool isValid ()
 

Protected Member Functions

virtual bool writeMap ()
 
virtual bool importMap ()
 
- Protected Member Functions inherited from woss::ResPressureTxtDb
void printScreenMap ()
 
::std::complex< double > readMap (const CoordZ &tx, const CoordZ &rx, const double frequency, const Time &time_value) const
 
- Protected Member Functions inherited from woss::WossDb
PathName getPathName (const ::std::string &complete_path)
 

Additional Inherited Members

- Static Public Member Functions inherited from woss::ResPressureTxtDb
static void setSpaceSampling (double value)
 
static double getSpaceSampling ()
 
- Protected Types inherited from woss::ResPressureTxtDb
typedef ::std::map< time_t, ::std::complex< double > > TimeMap
 
typedef TimeMap::iterator TMIter
 
typedef TimeMap::const_iterator TMCIter
 
typedef TimeMap::reverse_iterator TMRIter
 
typedef ::std::map< PDouble, TimeMap > FreqMap
 
typedef FreqMap::iterator FMIter
 
typedef FreqMap::reverse_iterator FMRIter
 
typedef ::std::map< CoordZ, FreqMap, CoordComparator< ResPressureTxtDb, CoordZ > > RxMap
 
typedef RxMap::iterator RxMIter
 
typedef RxMap::reverse_iterator RxMRIter
 
typedef ::std::map< CoordZ, RxMap, CoordComparator< ResPressureTxtDb, CoordZ > > PressureMatrix
 
typedef PressureMatrix::iterator PMIter
 
typedef PressureMatrix::const_iterator PMCIter
 
typedef PressureMatrix::reverse_iterator PMRIter
 
typedef PressureMatrix::const_reverse_iterator PMCRIter
 
- Protected Attributes inherited from woss::ResPressureTxtDb
PressureMatrix pressure_map
 
int initial_pressmap_size
 
bool has_been_modified
 
- Protected Attributes inherited from woss::WossTextualDb
::std::fstream textual_db
 
- Protected Attributes inherited from woss::WossDb
::std::string db_name
 
bool debug
 
- Static Protected Attributes inherited from woss::ResPressureTxtDb
static double space_sampling = 0.0
 

Detailed Description

Binary WossDb for Pressure.

ResPressureBinDb implements WossTextualDb and WossResPressDb for storing calculated Pressure into a binary file

Constructor & Destructor Documentation

◆ ResPressureBinDb()

woss::ResPressureBinDb::ResPressureBinDb ( const ::std::string &  name)
inline

ResPressureBinDb constructor

Parameters
namepathname of database

Member Function Documentation

◆ importMap()

bool ResPressureBinDb::importMap ( )
protectedvirtual

Imports the formatted binary file into pressure_map. The format is the following:
tx latitude, tx longitude, tx depth, rx latitude, rx longitude, rx depth, frequency, real pressure, imag pressure

Returns
true if operation succeeds, false otherwise

Reimplemented from woss::ResPressureTxtDb.

References woss::WossDb::db_name, woss::WossDb::debug, woss::ResPressureTxtDb::initial_pressmap_size, woss::ResPressureTxtDb::pressure_map, woss::ResPressureTxtDb::printScreenMap(), and woss::WossTextualDb::textual_db.

Here is the call graph for this function:

◆ writeMap()

bool ResPressureBinDb::writeMap ( )
protectedvirtual

Writes pressure_map to binary file. The format is the following:
tx latitude, tx longitude, tx depth, rx latitude, rx longitude, rx depth, frequency, real pressure, imag pressure

Returns
true if operation succeeds, false otherwise

Reimplemented from woss::ResPressureTxtDb.

References woss::WossDb::db_name, woss::ResPressureTxtDb::pressure_map, and woss::WossTextualDb::textual_db.


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