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

Binary WossDb for TimeArr. More...

#include <res-time-arr-bin-db.h>

Inheritance diagram for woss::ResTimeArrBinDb:
Inheritance graph
Collaboration diagram for woss::ResTimeArrBinDb:
Collaboration graph

Public Member Functions

 ResTimeArrBinDb (const ::std::string &name)
 
- Public Member Functions inherited from woss::ResTimeArrTxtDb
 ResTimeArrTxtDb (const ::std::string &name)
 
virtual bool finalizeConnection ()
 
virtual bool closeConnection ()
 
virtual TimeArrgetValue (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 TimeArr &channel)
 
- 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 ()
 

Static Public Member Functions

static void setSpaceSampling (double value)
 
static double getSpaceSampling ()
 
- Static Public Member Functions inherited from woss::ResTimeArrTxtDb
static void setSpaceSampling (double value)
 
static double getSpaceSampling ()
 

Protected Member Functions

virtual bool writeMap ()
 
virtual bool importMap ()
 
- Protected Member Functions inherited from woss::ResTimeArrTxtDb
void printScreenMap ()
 
const TimeArrreadMap (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

- Protected Types inherited from woss::ResTimeArrTxtDb
typedef ::std::map< time_t, TimeArrTimeMap
 
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::const_iterator FMCIter
 
typedef FreqMap::reverse_iterator FMRIter
 
typedef ::std::map< CoordZ, FreqMap, CoordComparator< ResTimeArrTxtDb, CoordZ > > RxMap
 
typedef RxMap::iterator RxMIter
 
typedef RxMap::const_iterator RxMCIter
 
typedef RxMap::reverse_iterator RxMRIter
 
typedef ::std::map< CoordZ, RxMap, CoordComparator< ResTimeArrTxtDb, CoordZ > > ArrMatrix
 
typedef ArrMatrix::iterator AMXIter
 
typedef ArrMatrix::const_iterator AMXCIter
 
typedef ArrMatrix::reverse_iterator AMXRIter
 
typedef ArrMatrix::const_reverse_iterator AMXCRIter
 
- Protected Attributes inherited from woss::ResTimeArrTxtDb
ArrMatrix arrivals_map
 
int initial_arrmap_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::ResTimeArrTxtDb
static double space_sampling = 0.0
 

Detailed Description

Binary WossDb for TimeArr.

ResTimeArrBinDb implements WossTextualDb and WossResTimeArrDb for storing calculated TimeArr into a binary file

Constructor & Destructor Documentation

◆ ResTimeArrBinDb()

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

ResTimeArrBinDb constructor

Parameters
namepathname of database

Member Function Documentation

◆ importMap()

bool ResTimeArrBinDb::importMap ( )
protectedvirtual

Imports the binary file into arrivals_map. The format is the following:
tx latitude, tx longitude, tx depth, rx latitude, rx longitude, rx depth, frequency, total channel taps, delay-i-th real pressure-i-th, imag pressure-i-th

Returns
true if operation succeeds, false otherwise

Reimplemented from woss::ResTimeArrTxtDb.

References woss::ResTimeArrTxtDb::arrivals_map, woss::WossDb::db_name, woss::WossDb::debug, woss::ResTimeArrTxtDb::initial_arrmap_size, woss::TimeArr::insertValue(), woss::ResTimeArrTxtDb::printScreenMap(), and woss::WossTextualDb::textual_db.

Here is the call graph for this function:

◆ writeMap()

bool ResTimeArrBinDb::writeMap ( )
protectedvirtual

Writes arrivals_map into the binary file. The format is the following:
tx latitude, tx longitude, tx depth, rx latitude, rx longitude, rx depth, frequency, total channel taps, delay-i-th real pressure-i-th, imag pressure-i-th

Returns
true if operation succeeds, false otherwise

Reimplemented from woss::ResTimeArrTxtDb.

References woss::ResTimeArrTxtDb::arrivals_map, woss::TimeArr::begin(), woss::WossDb::db_name, woss::TimeArr::end(), woss::TimeArr::size(), and woss::WossTextualDb::textual_db.

Here is the call graph for this function:

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