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

Abstraction layer for database and data manipulation. More...

#include <woss-db-manager.h>

Collaboration diagram for woss::WossDbManager:
Collaboration graph

Classes

class  BearingOperator
 Bearing operator function object. More...
 
class  RangeOperator
 Range operator function object. More...
 

Public Types

typedef CustomDataContainer< Coord, BearingOperator, RangeOperator, Bathymetry > CCBathymetry
 
typedef CustomDataTimeContainer< Coord, BearingOperator, RangeOperator, SSP * > CCSSP
 
typedef CustomDataContainer< Coord, BearingOperator, RangeOperator, Sediment * > CCSediment
 
typedef CustomDataContainer< Coord, BearingOperator, RangeOperator, Altimetry * > CCAltimetry
 

Public Member Functions

 WossDbManager ()
 
 WossDbManager (WossDbManager &instance)
 
WossDbManageroperator= (WossDbManager &instance)
 
virtual ~WossDbManager ()
 
virtual AltimetrygetAltimetry (const CoordZ &tx, const CoordZ &rx) const
 
virtual SedimentgetSediment (const CoordZ &tx, const CoordZ &rx) const
 
virtual SedimentgetSediment (const CoordZ &tx, const CoordZVector &rx_coordz_vector) const
 
virtual Bathymetry getBathymetry (const Coord &tx, const Coord &rx) const
 
virtual void getBathymetry (const Coord &tx, CoordZVector &rx_coordz_vector) const
 
virtual SSPgetSSP (const Coord &tx, const Coord &rx, const Time &time, long double ssp_depth_precision=SSP_CUSTOM_DEPTH_PRECISION) const
 
virtual SSPgetAverageSSP (const Coord &tx, const Coord &rx, const Time &time_start, const Time &time_end, int max_time_values, long double ssp_depth_precision=SSP_CUSTOM_DEPTH_PRECISION) const
 
virtual TimeArrgetTimeArr (const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value) const
 
virtual void insertTimeArr (const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value, const TimeArr &channel) const
 
virtual PressuregetPressure (const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value) const
 
virtual void insertPressure (const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value, const Pressure &pressure) const
 
WossDbManagersetBathymetryDb (WossBathymetryDb *ptr)
 
WossDbManagersetSedimentDb (WossSedimentDb *ptr)
 
WossDbManagersetSSPDb (WossSSPDb *ptr)
 
WossDbManagersetResTimeArrDb (WossResTimeArrDb *ptr)
 
WossDbManagersetResPressureDb (WossResPressDb *ptr)
 
bool setCustomAltimetry (Altimetry *const altimetry, const Coord &tx_coord=CCAltimetry::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCAltimetry::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCAltimetry::DB_CDATA_ALL_INNER_KEYS)
 
AltimetrygetCustomAltimetry (const Coord &tx_coord=CCAltimetry::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCAltimetry::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCAltimetry::DB_CDATA_ALL_INNER_KEYS)
 
WossDbManagereraseCustomAltimetry (const Coord &tx_coord=CCAltimetry::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCAltimetry::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCAltimetry::DB_CDATA_ALL_INNER_KEYS)
 
bool setCustomSediment (Sediment *const sediment, const Coord &tx_coord=CCSediment::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCSediment::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCSediment::DB_CDATA_ALL_INNER_KEYS)
 
SedimentgetCustomSediment (const Coord &tx_coord=CCSediment::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCSediment::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCSediment::DB_CDATA_ALL_INNER_KEYS)
 
WossDbManagereraseCustomSediment (const Coord &tx_coord=CCSediment::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCSediment::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCSediment::DB_CDATA_ALL_INNER_KEYS)
 
bool setCustomSSP (SSP *const ssp, const Coord &tx_coord=CCSSP::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCSSP::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCSSP::DB_CDATA_ALL_INNER_KEYS, const Time &time_value=CCSSP::DB_CDATA_ALL_TIME_KEYS)
 
virtual bool importCustomSSP (const ::std::string &filename, const Time &=CCSSP::DB_CDATA_ALL_TIME_KEYS, const Coord &tx_coord=CCSSP::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCSSP::DB_CDATA_ALL_MEDIUM_KEYS)
 
SSPgetCustomSSP (const Coord &tx_coord=CCSSP::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCSSP::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCSSP::DB_CDATA_ALL_INNER_KEYS, const Time &time_value=CCSSP::DB_CDATA_ALL_TIME_KEYS)
 
WossDbManagereraseCustomSSP (const Coord &tx_coord=CCSSP::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCSSP::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCSSP::DB_CDATA_ALL_INNER_KEYS, const Time &time_value=CCSSP::DB_CDATA_ALL_TIME_KEYS)
 
bool setCustomBathymetry (Bathymetry *const bathymetry, const Coord &tx_coord=CCBathymetry::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCBathymetry::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCBathymetry::DB_CDATA_ALL_INNER_KEYS)
 
virtual bool importCustomBathymetry (const ::std::string &filename, const Coord &tx_coord=CCBathymetry::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCBathymetry::DB_CDATA_ALL_MEDIUM_KEYS)
 
Bathymetry * getCustomBathymetry (const Coord &tx_coord=CCBathymetry::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCBathymetry::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCBathymetry::DB_CDATA_ALL_INNER_KEYS)
 
WossDbManagereraseCustomBathymetry (const Coord &tx_coord=CCBathymetry::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCBathymetry::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCBathymetry::DB_CDATA_ALL_INNER_KEYS)
 
WossDbManagersetDebug (bool flag)
 
bool getDebug ()
 

Protected Member Functions

virtual bool closeAllConnections ()
 
virtual void updateDebugFlag ()
 

Protected Attributes

WossBathymetryDbbathymetry_db
 
WossSedimentDbsediment_db
 
WossSSPDbssp_db
 
WossResTimeArrDbresults_arrivals_db
 
WossResPressDbresults_pressure_db
 
bool debug
 
CCBathymetry ccbathy_map
 
CCSediment ccsediment_map
 
CCSSP ccssp_map
 
CCAltimetry ccaltimetry_map
 

Detailed Description

Abstraction layer for database and data manipulation.

WossDbManager has the exclusive handling of all databases involved. No other object can access directly to a WossDb entity. Thanks to the abstraction provided, WossDbManager can perform arithmetic and other data manipulation. It should be used with woss::Singleton for safety reasons. ( e.g. woss::Singleton<woss::WossDbManager> ) WossDbManager also provides a way to generate environmental data on the fly. Providing a generator coordinate and a set of bearing and ranges, the user can create all sort of polygon where the given environmental data is valid.

See also
setCustom* methods, command

Constructor & Destructor Documentation

◆ WossDbManager() [1/2]

WossDbManager::WossDbManager ( )

Default constructor

◆ WossDbManager() [2/2]

WossDbManager::WossDbManager ( WossDbManager instance)

Copy constructor ( no const here, we have to modify the copy )

References bathymetry_db, results_arrivals_db, results_pressure_db, sediment_db, and ssp_db.

◆ ~WossDbManager()

WossDbManager::~WossDbManager ( )
virtual

Destructor. It deletes all pointers involved. Derived classes don't have to do it

References bathymetry_db, closeAllConnections(), results_arrivals_db, results_pressure_db, sediment_db, and ssp_db.

Here is the call graph for this function:

Member Function Documentation

◆ closeAllConnections()

bool WossDbManager::closeAllConnections ( )
protectedvirtual

Closes all connections of owned databases

References bathymetry_db, results_arrivals_db, results_pressure_db, sediment_db, and ssp_db.

Referenced by ~WossDbManager().

◆ eraseCustomAltimetry()

WossDbManager & woss::WossDbManager::eraseCustomAltimetry ( const Coord tx_coord = CCAltimetry::DB_CDATA_ALL_OUTER_KEYS,
double  bearing = CCAltimetry::DB_CDATA_ALL_MEDIUM_KEYS,
double  range = CCAltimetry::DB_CDATA_ALL_INNER_KEYS 
)
inline

Erases the custom Altimetry for given parameters

Parameters
tx_coordconst reference to a valid Coord (generator coordinates)
bearingbearing value [radians]
rangerange value [m]
Returns
reference to *this

References ccaltimetry_map, and woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::erase().

Here is the call graph for this function:

◆ eraseCustomBathymetry()

WossDbManager & woss::WossDbManager::eraseCustomBathymetry ( const Coord tx_coord = CCBathymetry::DB_CDATA_ALL_OUTER_KEYS,
double  bearing = CCBathymetry::DB_CDATA_ALL_MEDIUM_KEYS,
double  range = CCBathymetry::DB_CDATA_ALL_INNER_KEYS 
)
inline

Erases the custom Bathymetry for given parameters

Parameters
tx_coordconst reference to a valid Coord (generator coordinates)
bearingbearing value [radians]
rangerange value [m]
Returns
reference to *this

References ccbathy_map, and woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::erase().

Here is the call graph for this function:

◆ eraseCustomSediment()

WossDbManager & woss::WossDbManager::eraseCustomSediment ( const Coord tx_coord = CCSediment::DB_CDATA_ALL_OUTER_KEYS,
double  bearing = CCSediment::DB_CDATA_ALL_MEDIUM_KEYS,
double  range = CCSediment::DB_CDATA_ALL_INNER_KEYS 
)
inline

Erases the custom Sediment for given parameters

Parameters
tx_coordconst reference to a valid Coord (generator coordinates)
bearingbearing value [radians]
rangerange value [m]
Returns
reference to *this

References ccsediment_map, and woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::erase().

Here is the call graph for this function:

◆ eraseCustomSSP()

WossDbManager & woss::WossDbManager::eraseCustomSSP ( const Coord tx_coord = CCSSP::DB_CDATA_ALL_OUTER_KEYS,
double  bearing = CCSSP::DB_CDATA_ALL_MEDIUM_KEYS,
double  range = CCSSP::DB_CDATA_ALL_INNER_KEYS,
const Time time_value = CCSSP::DB_CDATA_ALL_TIME_KEYS 
)
inline

Erases the custom SSP for given parameters

Parameters
tx_coordconst reference to a valid Coord (generator coordinates)
bearingbearing value [radians]
rangerange value [m]
time_valueconst reference to a valid Time object
Returns
reference to *this

References ccssp_map, and woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::erase().

Here is the call graph for this function:

◆ getAltimetry()

Altimetry * WossDbManager::getAltimetry ( const CoordZ tx,
const CoordZ rx 
) const
virtual

Returns a pointer to a heap-created Altimetry value for given coordinates and depth, if present in the Altimetry database. User is responsible of pointer's ownership

Parameters
coordsconst reference to a valid CoordZ object
Returns
valid Altimetry if coordinates are found, not valid otherwise

References ccaltimetry_map, woss::Altimetry::createNotValid(), debug, woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::get(), woss::Singleton< T >::instance(), woss::Altimetry::isValid(), and woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::size().

Referenced by woss::ACToolboxWoss::initAltimetry().

Here is the call graph for this function:

◆ getAverageSSP()

SSP * WossDbManager::getAverageSSP ( const Coord tx,
const Coord rx,
const Time time_start,
const Time time_end,
int  max_time_values,
long double  ssp_depth_precision = SSP_CUSTOM_DEPTH_PRECISION 
) const
virtual

Returns a pointer a heap-created average SSP for given coordinates, start and end time date if they are present in the database. User is responsible of pointer's ownership

Parameters
coordsconst reference to a valid Coord object
time_startconst reference to a valid Time object
time_endconst reference to a valid Time object
max_time_valuestotal number of Time to take between time_start and time_end
ssp_depth_precisionreturned SSP's depth precision
Returns
valid SSP if coordinates and both time date are found, not valid otherwise

References ccssp_map, woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::empty(), woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::get(), woss::WossSSPDb::getValue(), woss::Singleton< T >::instance(), and ssp_db.

Here is the call graph for this function:

◆ getBathymetry() [1/2]

double WossDbManager::getBathymetry ( const Coord tx,
const Coord rx 
) const
virtual

Returns the positive depth value ( bathymetry ) of given coordinates, if present in the database

Parameters
coordsconst reference to a valid Coord object
Returns
positive depth value [m] if coordinates are found, HUGE_VAL otherwise

References bathymetry_db, ccbathy_map, debug, woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::empty(), woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::get(), woss::WossBathymetryDb::getValue(), and woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::size().

Referenced by getBathymetry(), and woss::ACToolboxWoss::initCoordZVector().

Here is the call graph for this function:

◆ getBathymetry() [2/2]

void WossDbManager::getBathymetry ( const Coord tx,
CoordZVector rx_coordz_vector 
) const
virtual

Sets the positive depth for each CoordZ present in the vector, HUGE_VAL is set if coordinates are not present in the database

Parameters
coordsreference to a CoordZVector

References getBathymetry().

Here is the call graph for this function:

◆ getCustomAltimetry()

Altimetry * woss::WossDbManager::getCustomAltimetry ( const Coord tx_coord = CCAltimetry::DB_CDATA_ALL_OUTER_KEYS,
double  bearing = CCAltimetry::DB_CDATA_ALL_MEDIUM_KEYS,
double  range = CCAltimetry::DB_CDATA_ALL_INNER_KEYS 
)
inline

Gets the custom Altimetry for given generator Coord

Parameters
tx_coordconst reference to a valid Coord (generator coordinates)
bearingbearing value [radians]
rangerange value [m]
Returns
NULL pointer if parameters are not found.

References ccaltimetry_map, and woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::get().

Here is the call graph for this function:

◆ getCustomBathymetry()

Bathymetry * woss::WossDbManager::getCustomBathymetry ( const Coord tx_coord = CCBathymetry::DB_CDATA_ALL_OUTER_KEYS,
double  bearing = CCBathymetry::DB_CDATA_ALL_MEDIUM_KEYS,
double  range = CCBathymetry::DB_CDATA_ALL_INNER_KEYS 
)
inline

Gets the custom Bathymetry for given generator Coord

Parameters
tx_coordconst reference to a valid Coord (generator coordinates)
bearingbearing value [radians]
rangerange value [m]
Returns
NULL pointer if parameters are not found.

References ccbathy_map, and woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::get().

Here is the call graph for this function:

◆ getCustomSediment()

Sediment * woss::WossDbManager::getCustomSediment ( const Coord tx_coord = CCSediment::DB_CDATA_ALL_OUTER_KEYS,
double  bearing = CCSediment::DB_CDATA_ALL_MEDIUM_KEYS,
double  range = CCSediment::DB_CDATA_ALL_INNER_KEYS 
)
inline

Gets the custom Sediment for given generator Coord

Parameters
tx_coordconst reference to a valid Coord (generator coordinates)
bearingbearing value [radians]
rangerange value [m]
Returns
NULL pointer if parameters are not found.

References ccsediment_map, and woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::get().

Here is the call graph for this function:

◆ getCustomSSP()

SSP * woss::WossDbManager::getCustomSSP ( const Coord tx_coord = CCSSP::DB_CDATA_ALL_OUTER_KEYS,
double  bearing = CCSSP::DB_CDATA_ALL_MEDIUM_KEYS,
double  range = CCSSP::DB_CDATA_ALL_INNER_KEYS,
const Time time_value = CCSSP::DB_CDATA_ALL_TIME_KEYS 
)
inline

Gets the custom SSP for given generator Coord

Parameters
tx_coordconst reference to a valid Coord (generator coordinates)
bearingbearing value [radians]
rangerange value [m]
time_valueconst reference to a valid Time object
Returns
NULL pointer if parameters are not found.

References ccssp_map, and woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::get().

Here is the call graph for this function:

◆ getPressure()

Pressure * WossDbManager::getPressure ( const CoordZ coord_tx,
const CoordZ coord_rx,
const double  frequency,
const Time time_value 
) const
virtual

Returns a pointer to a heap-created Pressure value of given frequency, transmitter and receiver coordinates if present in the database. User is responsible of pointer's ownership

Parameters
coord_txconst reference to a valid CoordZ object
coord_rxconst reference to a valid CoordZ object
frequencyused frequency [hz]
time_valueconst reference to a valid Time object
Returns
valid TimeArr if parameters are found, not valid otherwise

References woss::Pressure::createNotValid(), getPressure(), woss::WossResPressDb::getValue(), woss::Singleton< T >::instance(), and results_pressure_db.

Referenced by woss::WossManagerResDb::dbGetPressure(), and getPressure().

Here is the call graph for this function:

◆ getSediment() [1/2]

Sediment * WossDbManager::getSediment ( const CoordZ tx,
const CoordZ rx 
) const
virtual

Returns a pointer to a heap-created Sediment value for given coordinates and depth, if present in the Sediment database. User is responsible of pointer's ownership

Parameters
coordsconst reference to a valid CoordZ object
Returns
valid Sediment if coordinates are found, not valid otherwise

References ccsediment_map, debug, woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::get(), woss::WossSedimentDb::getValue(), woss::Singleton< T >::instance(), sediment_db, and woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::size().

Referenced by getSediment(), and woss::ACToolboxWoss::initSediment().

Here is the call graph for this function:

◆ getSediment() [2/2]

Sediment * WossDbManager::getSediment ( const CoordZ tx,
const CoordZVector rx_coordz_vector 
) const
virtual

Returns the representative sediment value of given coordinates and depth vector, if at least one set of coordinates is present in the Sediment database. User is responsible of pointer's ownership

Parameters
coordz_vectorconst reference to a valid CoordZ vector
Returns
valid Sediment if at least one set of coordinates is found, not valid otherwise

References ccsediment_map, debug, woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::empty(), getSediment(), woss::Sediment::getType(), woss::WossSedimentDb::getValue(), woss::Singleton< T >::instance(), and sediment_db.

Here is the call graph for this function:

◆ getSSP()

SSP * WossDbManager::getSSP ( const Coord tx,
const Coord rx,
const Time time,
long double  ssp_depth_precision = SSP_CUSTOM_DEPTH_PRECISION 
) const
virtual

Returns the SSP value of given coordinates and date time if both present in the database. User is responsible of pointer's ownership

Parameters
coordsconst reference to a valid Coord object
timeconst reference to a valid Time object
ssp_depth_precisionssp depth precision [m]
Returns
valid SSP if coordinates are found, not valid otherwise

References ccssp_map, woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::empty(), woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::get(), woss::WossSSPDb::getValue(), woss::Singleton< T >::instance(), and ssp_db.

Referenced by woss::ACToolboxWoss::initSSPVector().

Here is the call graph for this function:

◆ getTimeArr()

TimeArr * WossDbManager::getTimeArr ( const CoordZ coord_tx,
const CoordZ coord_rx,
const double  frequency,
const Time time_value 
) const
virtual

Returns a pointer to a heap-created TimeArr value of given frequency, transmitter and receiver coordinates if present in the database. User is responsible of pointer's ownership

Parameters
coord_txconst reference to a valid CoordZ object
coord_rxconst reference to a valid CoordZ object
frequencyused frequency [hz]
time_valueconst reference to a valid Time object
Returns
valid TimeArr if parameters are found, not valid otherwise

References woss::TimeArr::createNotValid(), getTimeArr(), woss::WossResTimeArrDb::getValue(), woss::Singleton< T >::instance(), and results_arrivals_db.

Referenced by woss::WossManagerResDb::dbGetTimeArr(), and getTimeArr().

Here is the call graph for this function:

◆ importCustomBathymetry()

bool WossDbManager::importCustomBathymetry ( const ::std::string &  filename,
const Coord tx_coord = CCBathymetry::DB_CDATA_ALL_OUTER_KEYS,
double  bearing = CCBathymetry::DB_CDATA_ALL_MEDIUM_KEYS 
)
virtual

Imports a CustomBathymetry from file. The file has to be a two column format: Range [m] Depth [m]

Parameters
filenameconst reference to a string
tx_coordconst reference to a valid Coord (generator coordinates)
bearingbearing value [radians]
Returns
true if import was successful, false otherwise

References ccbathy_map, and debug.

◆ importCustomSSP()

bool WossDbManager::importCustomSSP ( const ::std::string &  filename,
const Time time = CCSSP::DB_CDATA_ALL_TIME_KEYS,
const Coord tx_coord = CCSSP::DB_CDATA_ALL_OUTER_KEYS,
double  bearing = CCSSP::DB_CDATA_ALL_MEDIUM_KEYS 
)
virtual

Imports a CustomSSP from file.
File format:

  • first line: type name.
  • second line: latitude for depth and pressure correction purposes
  • third line: longitude for depth and pressure correction purposes

Following format depends on type name:

  • "SSP" : three columns. range [m] | depth [m] | sound speed [m/s]
  • "FULL" : six columns. range [m] | depth [m] | temperature [C°] | salinity [ppu] | pressure [bar] | sound speed [m/s]
  • "TEMPERATURE_SALINITY_PRESSURE" : four columns. range [m] | temperature [C°] | salinity [ppu] | pressure [bar]
  • "DEPTH_TEMPERATURE_SALINITY" : four columns. range [m] | depth [m] | temperature [C°] | salinity [ppu]
Parameters
filenameconst reference to a string
timeconst reference to a valid Time object
tx_coordconst reference to a valid Coord object (originator coordinates)
bearingbearing value [radians]
Returns
true is import was completed succesfully, false otherwise

References ccssp_map, debug, woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::insert(), woss::SSP::insertValue(), and woss::Singleton< T >::instance().

Here is the call graph for this function:

◆ insertPressure()

void WossDbManager::insertPressure ( const CoordZ coord_tx,
const CoordZ coord_rx,
const double  frequency,
const Time time_value,
const Pressure pressure 
) const
virtual

Inserts the given Pressure value in the database at given frequency, transmitter and receiver coordinates

Parameters
coord_txconst reference to a valid CoordZ object
coord_rxconst reference to a valid CoordZ object
frequencyused frequency [hz]
time_valueconst reference to a valid Time object
channelcomputed Pressure

References woss::WossResPressDb::insertValue(), and results_pressure_db.

Referenced by woss::WossManagerResDb::dbInsertPressure().

Here is the call graph for this function:

◆ insertTimeArr()

void WossDbManager::insertTimeArr ( const CoordZ coord_tx,
const CoordZ coord_rx,
const double  frequency,
const Time time_value,
const TimeArr channel 
) const
virtual

Inserts a given TimeArr value in the database at given frequency, transmitter and receiver coordinates

Parameters
coord_txconst reference to a valid CoordZ object
coord_rxconst reference to a valid CoordZ object
frequencyused frequency [hz]
time_valueconst reference to a valid Time object
channelcomputed TimeArr

References woss::WossResTimeArrDb::insertValue(), and results_arrivals_db.

Referenced by woss::WossManagerResDb::dbInsertTimeArr().

Here is the call graph for this function:

◆ operator=()

WossDbManager & WossDbManager::operator= ( WossDbManager instance)

Assignment operator ( no const here, we have to modify the copy )

References bathymetry_db, ccaltimetry_map, ccbathy_map, ccsediment_map, ccssp_map, debug, results_arrivals_db, results_pressure_db, sediment_db, and ssp_db.

◆ setBathymetryDb()

WossDbManager & woss::WossDbManager::setBathymetryDb ( WossBathymetryDb ptr)
inline

Initializes the bathymetry database pointer

Parameters
ptrvalid WossBathymetryDb*
Returns
reference to *this

References bathymetry_db.

Referenced by woss::WossController::initialize().

◆ setCustomAltimetry()

bool woss::WossDbManager::setCustomAltimetry ( Altimetry *const  altimetry,
const Coord tx_coord = CCAltimetry::DB_CDATA_ALL_OUTER_KEYS,
double  bearing = CCAltimetry::DB_CDATA_ALL_MEDIUM_KEYS,
double  range = CCAltimetry::DB_CDATA_ALL_INNER_KEYS 
)
inline

Sets the custom Altimetry for given generator Coord

Parameters
tx_coordconst reference to a valid Coord (generator coordinates)
bearingbearing value [radians]
rangerange value [m]
Returns
true if method succed, false otherwise

References ccaltimetry_map, and woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::insert().

Here is the call graph for this function:

◆ setCustomBathymetry()

bool woss::WossDbManager::setCustomBathymetry ( Bathymetry *const  bathymetry,
const Coord tx_coord = CCBathymetry::DB_CDATA_ALL_OUTER_KEYS,
double  bearing = CCBathymetry::DB_CDATA_ALL_MEDIUM_KEYS,
double  range = CCBathymetry::DB_CDATA_ALL_INNER_KEYS 
)
inline

Sets the custom Bathymetry for given generator Coord

Parameters
tx_coordconst reference to a valid Coord (generator coordinates)
bearingbearing value [radians]
rangerange value [m]
Returns
if insertion succeed, the function returns a NULL pointer, that needs to be initialized. if an object was already instantiated, the function returns the pointer to it;

References ccbathy_map, and woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::insert().

Here is the call graph for this function:

◆ setCustomSediment()

bool woss::WossDbManager::setCustomSediment ( Sediment *const  sediment,
const Coord tx_coord = CCSediment::DB_CDATA_ALL_OUTER_KEYS,
double  bearing = CCSediment::DB_CDATA_ALL_MEDIUM_KEYS,
double  range = CCSediment::DB_CDATA_ALL_INNER_KEYS 
)
inline

Sets the custom Sediment for given generator Coord

Parameters
tx_coordconst reference to a valid Coord (generator coordinates)
bearingbearing value [radians]
rangerange value [m]
Returns
if insertion succeed, the function returns a NULL pointer, that needs to be initialized. if an object was already instantiated, the function returns the pointer to it;

References ccsediment_map, and woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::insert().

Here is the call graph for this function:

◆ setCustomSSP()

bool woss::WossDbManager::setCustomSSP ( SSP *const  ssp,
const Coord tx_coord = CCSSP::DB_CDATA_ALL_OUTER_KEYS,
double  bearing = CCSSP::DB_CDATA_ALL_MEDIUM_KEYS,
double  range = CCSSP::DB_CDATA_ALL_INNER_KEYS,
const Time time_value = CCSSP::DB_CDATA_ALL_TIME_KEYS 
)
inline

Sets the custom SSP for given generator Coord

Parameters
tx_coordconst reference to a valid Coord (generator coordinates)
bearingbearing value [radians]
rangerange value [m]
time_valueconst reference to a valid Time object
Returns
if insertion succeed, the function returns a NULL pointer, that needs to be initialized. if an object was already instantiated, the function returns the pointer to it;

References ccssp_map, and woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::insert().

Here is the call graph for this function:

◆ setResPressureDb()

WossDbManager & woss::WossDbManager::setResPressureDb ( WossResPressDb ptr)
inline

Initializes the Pressure database pointer

Parameters
ptrvalid WossResPressDb*
Returns
reference to *this

References results_pressure_db.

Referenced by woss::WossController::initialize().

◆ setResTimeArrDb()

WossDbManager & woss::WossDbManager::setResTimeArrDb ( WossResTimeArrDb ptr)
inline

Initializes the TimeArr database pointer

Parameters
ptrvalid WossResTimeArrDb*
Returns
reference to *this

References results_arrivals_db.

Referenced by woss::WossController::initialize().

◆ setSedimentDb()

WossDbManager & woss::WossDbManager::setSedimentDb ( WossSedimentDb ptr)
inline

Initializes the Sediment database pointer

Parameters
ptrvalid WossSedimentDb*
Returns
reference to *this

References sediment_db.

Referenced by woss::WossController::initialize().

◆ setSSPDb()

WossDbManager & woss::WossDbManager::setSSPDb ( WossSSPDb ptr)
inline

Initializes the SSP database pointer

Parameters
ptrvalid WossSSPDb*
Returns
reference to *this

References ssp_db.

Referenced by woss::WossController::initialize().

Member Data Documentation

◆ bathymetry_db

WossBathymetryDb* woss::WossDbManager::bathymetry_db
protected

◆ ccaltimetry_map

CCAltimetry woss::WossDbManager::ccaltimetry_map
protected

CustomAltimetry containter for user-given generator CoordZ

Referenced by eraseCustomAltimetry(), getAltimetry(), getCustomAltimetry(), operator=(), and setCustomAltimetry().

◆ ccbathy_map

CCBathymetry woss::WossDbManager::ccbathy_map
protected

CustomBathymetry containter for user-given generator CoordZ

Referenced by eraseCustomBathymetry(), getBathymetry(), getCustomBathymetry(), importCustomBathymetry(), operator=(), and setCustomBathymetry().

◆ ccsediment_map

CCSediment woss::WossDbManager::ccsediment_map
protected

custom Sediment containter for user-given generator CoordZ

Referenced by eraseCustomSediment(), getCustomSediment(), getSediment(), operator=(), and setCustomSediment().

◆ ccssp_map

CCSSP woss::WossDbManager::ccssp_map
protected

CustomSSP containter for user-given generator CoordZ

Referenced by eraseCustomSSP(), getAverageSSP(), getCustomSSP(), getSSP(), importCustomSSP(), operator=(), and setCustomSSP().

◆ debug

bool woss::WossDbManager::debug
protected

◆ results_arrivals_db

WossResTimeArrDb* woss::WossDbManager::results_arrivals_db
protected

◆ results_pressure_db

WossResPressDb* woss::WossDbManager::results_pressure_db
protected

◆ sediment_db

WossSedimentDb* woss::WossDbManager::sediment_db
protected

◆ ssp_db

WossSSPDb* woss::WossDbManager::ssp_db
protected

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