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

Abstract class that provides correctly initialized Woss objects. More...

#include <woss-creator.h>

Inheritance diagram for woss::WossCreator:
Inheritance graph
Collaboration diagram for woss::WossCreator:
Collaboration graph

Public Member Functions

 WossCreator ()
virtual ~WossCreator ()=default
virtual std::unique_ptr< Woss > const createWoss (const CoordZ &tx, const CoordZ &rx, double start_freq, double end_freq) const =0
WossCreatorsetWossDebug (bool flag)
WossCreatorsetDebug (bool flag)
bool usingDebug () const
bool usingWossDebug () const
WossCreatorsetWrkDirPath (const std::string &path)
WossCreatorsetCleanWorkDir (bool flag)
std::string getWrkDirPath () const
WossCreatorsetFrequencyStep (double f_step, const CoordZ &tx, const CoordZ &rx)
WossCreatorsetFrequencyStep (double f_step, const std::shared_ptr< Location > &tx=CCDouble::ALL_LOCATIONS, const std::shared_ptr< Location > &rx=CCDouble::ALL_LOCATIONS)
double getFrequencyStep (const CoordZ &tx, const CoordZ &rx) const
double getFrequencyStep (const std::shared_ptr< Location > &tx=CCDouble::ALL_LOCATIONS, const std::shared_ptr< Location > &rx=CCDouble::ALL_LOCATIONS) const
WossCreatoreraseFrequencyStep (const CoordZ &tx, const CoordZ &rx)
WossCreatoreraseFrequencyStep (const std::shared_ptr< Location > &tx=CCDouble::ALL_LOCATIONS, const std::shared_ptr< Location > &rx=CCDouble::ALL_LOCATIONS)
WossCreatorsetEvolutionTimeQuantum (double value, const CoordZ &tx, const CoordZ &rx)
WossCreatorsetEvolutionTimeQuantum (double value, const std::shared_ptr< Location > &tx=CCInt::ALL_LOCATIONS, const std::shared_ptr< Location > &rx=CCInt::ALL_LOCATIONS)
double getEvolutionTimeQuantum (const CoordZ &tx, const CoordZ &rx) const
double getEvolutionTimeQuantum (const std::shared_ptr< Location > &tx=CCInt::ALL_LOCATIONS, const std::shared_ptr< Location > &rx=CCInt::ALL_LOCATIONS) const
WossCreatoreraseEvolutionTimeQuantum (const CoordZ &tx, const CoordZ &rx)
WossCreatoreraseEvolutionTimeQuantum (const std::shared_ptr< Location > &tx=CCInt::ALL_LOCATIONS, const std::shared_ptr< Location > &rx=CCInt::ALL_LOCATIONS)
WossCreatorsetTotalRuns (int runs, const CoordZ &tx, const CoordZ &rx)
WossCreatorsetTotalRuns (int runs, const std::shared_ptr< Location > &tx=CCInt::ALL_LOCATIONS, const std::shared_ptr< Location > &rx=CCInt::ALL_LOCATIONS)
int getTotalRuns (const CoordZ &tx, const CoordZ &rx) const
int getTotalRuns (const std::shared_ptr< Location > &tx=CCInt::ALL_LOCATIONS, const std::shared_ptr< Location > &rx=CCInt::ALL_LOCATIONS) const
WossCreatoreraseTotalRuns (const CoordZ &tx, const CoordZ &rx)
WossCreatoreraseTotalRuns (const std::shared_ptr< Location > &tx=CCInt::ALL_LOCATIONS, const std::shared_ptr< Location > &rx=CCInt::ALL_LOCATIONS)
WossCreatorsetSimTime (const SimTime &simtime, const CoordZ &tx, const CoordZ &rx)
WossCreatorsetSimTime (const SimTime &simtime, const std::shared_ptr< Location > &tx=CCSimTime::ALL_LOCATIONS, const std::shared_ptr< Location > &rx=CCSimTime::ALL_LOCATIONS)
SimTime getSimTime (const CoordZ &tx, const CoordZ &rx) const
SimTime getSimTime (const std::shared_ptr< Location > &tx=CCSimTime::ALL_LOCATIONS, const std::shared_ptr< Location > &rx=CCSimTime::ALL_LOCATIONS) const
WossCreatoreraseSimTime (const CoordZ &tx, const CoordZ &rx)
WossCreatoreraseSimTime (const std::shared_ptr< Location > &tx=CCSimTime::ALL_LOCATIONS, const std::shared_ptr< Location > &rx=CCSimTime::ALL_LOCATIONS)
WossCreatorsetWossDbManager (const std::shared_ptr< WossDbManager > &ptr)
WossCreatorsetTransducerHandler (const std::shared_ptr< TransducerHandler > &ptr)

Protected Types

using CCSimTime = WossCreatorContainer< SimTime >
using CCDouble = WossCreatorContainer< double >
using CCInt = WossCreatorContainer< int >

Protected Member Functions

virtual bool initializeWoss (Woss &woss_ref) const =0
virtual void updateDebugFlag ()

Protected Attributes

std::shared_ptr< WossDbManagerwoss_db_manager
std::shared_ptr< TransducerHandlertransducer_handler
std::string work_dir_path
CCDouble ccevolution_time_quantum
CCInt cctotal_runs
CCDouble ccfrequency_step
CCSimTime ccsimtime_map
bool debug
bool woss_debug
bool woss_clean_workdir

Detailed Description

Abstract class that provides correctly initialized Woss objects.

WossCreator provides interface for creation and initializiation of Woss objects, relieving the user from this task

Member Typedef Documentation

◆ CCDouble

◆ CCInt

◆ CCSimTime

Constructor & Destructor Documentation

◆ WossCreator()

◆ ~WossCreator()

virtual woss::WossCreator::~WossCreator ( )
virtualdefault

Member Function Documentation

◆ createWoss()

virtual std::unique_ptr< Woss > const woss::WossCreator::createWoss ( const CoordZ & tx,
const CoordZ & rx,
double start_freq,
double end_freq ) const
pure virtual

Returns a pointer to valid Woss for given parameters

Parameters
txconst reference to a valid CoordZ object ( transmitter )
rxconst reference to a valid CoordZ object ( receiver )
start_freqstart frequency [Hz]
end_freqend frequency [Hz]
Returns
pointer to properly initialized Woss object

Implemented in woss::BellhopCreator.

◆ eraseEvolutionTimeQuantum() [1/2]

WossCreator & woss::WossCreator::eraseEvolutionTimeQuantum ( const CoordZ & tx,
const CoordZ & rx )
inline

Erases the time evolution threshold

Parameters
txconst reference to a valid woss::CoordZ instance
rxconst reference to a valid woss::CoordZ instance
Returns
reference to *this

References ccevolution_time_quantum, and WossCreator().

Referenced by WossUnitTest::testBellhopCreator().

Here is the call graph for this function:

◆ eraseEvolutionTimeQuantum() [2/2]

WossCreator & woss::WossCreator::eraseEvolutionTimeQuantum ( const std::shared_ptr< Location > & tx = CCInt::ALL_LOCATIONS,
const std::shared_ptr< Location > & rx = CCInt::ALL_LOCATIONS )
inline

Erases the time evolution threshold

Parameters
txconst reference to a std::shared_ptr to a valid transmitter Location
rxconst reference to a std::shared_ptr to a valid receiver Location
Returns
reference to *this

References woss::WossCreatorContainer< int >::ALL_LOCATIONS, ccevolution_time_quantum, and WossCreator().

Here is the call graph for this function:

◆ eraseFrequencyStep() [1/2]

WossCreator & woss::WossCreator::eraseFrequencyStep ( const CoordZ & tx,
const CoordZ & rx )
inline

Erases the frequency step for given transmitter, receiver woss::CoordZ

Parameters
txconst reference to a valid woss::CoordZ instance
rxconst reference to a valid woss::CoordZ instance
Returns
reference to *this

References ccfrequency_step, and WossCreator().

Referenced by WossUnitTest::testBellhopCreator().

Here is the call graph for this function:

◆ eraseFrequencyStep() [2/2]

WossCreator & woss::WossCreator::eraseFrequencyStep ( const std::shared_ptr< Location > & tx = CCDouble::ALL_LOCATIONS,
const std::shared_ptr< Location > & rx = CCDouble::ALL_LOCATIONS )
inline

Erases the frequency step for given transmitter, receiver woss::Location

Parameters
txconst reference to a std::shared_ptr to a valid transmitter Location
rxconst reference to a std::shared_ptr to a valid receiver Location
Returns
reference to *this

References woss::WossCreatorContainer< double >::ALL_LOCATIONS, ccfrequency_step, and WossCreator().

Here is the call graph for this function:

◆ eraseSimTime() [1/2]

WossCreator & woss::WossCreator::eraseSimTime ( const CoordZ & tx,
const CoordZ & rx )
inline

Erases the SimTime for given transmitter, receiver woss::CoordZ

Parameters
txconst reference to a valid woss::CoordZ instance
rxconst reference to a valid woss::CoordZ instance
Returns
reference to *this

References ccsimtime_map, and WossCreator().

Referenced by WossUnitTest::testBellhopCreator().

Here is the call graph for this function:

◆ eraseSimTime() [2/2]

WossCreator & woss::WossCreator::eraseSimTime ( const std::shared_ptr< Location > & tx = CCSimTime::ALL_LOCATIONS,
const std::shared_ptr< Location > & rx = CCSimTime::ALL_LOCATIONS )
inline

Erases the SimTime for given transmitter, receiver woss::Location

Parameters
txconst reference to a std::shared_ptr to a valid transmitter Location
rxconst reference to a std::shared_ptr to a valid receiver Location
Returns
reference to *this

References woss::WossCreatorContainer< SimTime >::ALL_LOCATIONS, ccsimtime_map, and WossCreator().

Here is the call graph for this function:

◆ eraseTotalRuns() [1/2]

WossCreator & woss::WossCreator::eraseTotalRuns ( const CoordZ & tx,
const CoordZ & rx )
inline

Erases the total number of channel simulator's runs

Parameters
txconst reference to a valid woss::CoordZ instance
rxconst reference to a valid woss::CoordZ instance
Returns
reference to *this

References cctotal_runs, and WossCreator().

Here is the call graph for this function:

◆ eraseTotalRuns() [2/2]

WossCreator & woss::WossCreator::eraseTotalRuns ( const std::shared_ptr< Location > & tx = CCInt::ALL_LOCATIONS,
const std::shared_ptr< Location > & rx = CCInt::ALL_LOCATIONS )
inline

Erases the total number of channel simulator's runs

Parameters
txconst reference to a std::shared_ptr to a valid transmitter Location
rxconst reference to a std::shared_ptr to a valid receiver Location
Returns
reference to *this

References woss::WossCreatorContainer< int >::ALL_LOCATIONS, cctotal_runs, and WossCreator().

Here is the call graph for this function:

◆ getEvolutionTimeQuantum() [1/2]

double woss::WossCreator::getEvolutionTimeQuantum ( const CoordZ & tx,
const CoordZ & rx ) const
inline

Returns the time evolution threshold

Parameters
txconst reference to a valid woss::CoordZ instance
rxconst reference to a valid woss::CoordZ instance
Returns
time evolution threshold in seconds

References ccevolution_time_quantum.

Referenced by WossUnitTest::testBellhopCreator().

◆ getEvolutionTimeQuantum() [2/2]

double woss::WossCreator::getEvolutionTimeQuantum ( const std::shared_ptr< Location > & tx = CCInt::ALL_LOCATIONS,
const std::shared_ptr< Location > & rx = CCInt::ALL_LOCATIONS ) const
inline

Returns the time evolution threshold

Parameters
txconst reference to a std::shared_ptr to a valid transmitter Location
rxconst reference to a std::shared_ptr to a valid receiver Location
Returns
time evolution threshold in seconds

References woss::WossCreatorContainer< int >::ALL_LOCATIONS, and ccevolution_time_quantum.

◆ getFrequencyStep() [1/2]

double woss::WossCreator::getFrequencyStep ( const CoordZ & tx,
const CoordZ & rx ) const
inline

Returns the frequency step for given transmitter, receiver woss::CoordZ

Parameters
txconst reference to a valid woss::CoordZ instance
rxconst reference to a valid woss::CoordZ instance
Returns
frequency step in Hz

References ccfrequency_step.

Referenced by woss::BellhopCreator::createWoss(), and WossUnitTest::testBellhopCreator().

◆ getFrequencyStep() [2/2]

double woss::WossCreator::getFrequencyStep ( const std::shared_ptr< Location > & tx = CCDouble::ALL_LOCATIONS,
const std::shared_ptr< Location > & rx = CCDouble::ALL_LOCATIONS ) const
inline

Returns the frequency step for given transmitter, receiver woss::Location

Parameters
txconst reference to a std::shared_ptr to a valid transmitter Location
rxconst reference to a std::shared_ptr to a valid receiver Location
Returns
frequency step in Hz

References woss::WossCreatorContainer< double >::ALL_LOCATIONS, and ccfrequency_step.

◆ getSimTime() [1/2]

SimTime woss::WossCreator::getSimTime ( const CoordZ & tx,
const CoordZ & rx ) const
inline

Returns the SimTime for given transmitter, receiver woss::CoordZ

Parameters
txconst reference to a valid woss::CoordZ instance
rxconst reference to a valid woss::CoordZ instance
Returns
SimTime instance

References ccsimtime_map.

Referenced by woss::BellhopCreator::createWoss(), and WossUnitTest::testBellhopCreator().

◆ getSimTime() [2/2]

SimTime woss::WossCreator::getSimTime ( const std::shared_ptr< Location > & tx = CCSimTime::ALL_LOCATIONS,
const std::shared_ptr< Location > & rx = CCSimTime::ALL_LOCATIONS ) const
inline

Returns the SimTime for given transmitter, receiver woss::Location

Parameters
txconst reference to a std::shared_ptr to a valid transmitter Location
rxconst reference to a std::shared_ptr to a valid receiver Location
Returns
SimTime instance

References woss::WossCreatorContainer< SimTime >::ALL_LOCATIONS, and ccsimtime_map.

◆ getTotalRuns() [1/2]

int woss::WossCreator::getTotalRuns ( const CoordZ & tx,
const CoordZ & rx ) const
inline

Returns the total number of channel simulator's runs

Parameters
txconst reference to a valid woss::CoordZ instance
rxconst reference to a valid woss::CoordZ instance
Returns
number of runs

References cctotal_runs.

Referenced by WossUnitTest::testBellhopCreator().

◆ getTotalRuns() [2/2]

int woss::WossCreator::getTotalRuns ( const std::shared_ptr< Location > & tx = CCInt::ALL_LOCATIONS,
const std::shared_ptr< Location > & rx = CCInt::ALL_LOCATIONS ) const
inline

Returns the total number of channel simulator's runs

Parameters
txconst reference to a std::shared_ptr to a valid transmitter Location
rxconst reference to a std::shared_ptr to a valid receiver Location
Returns
number of runs

References woss::WossCreatorContainer< int >::ALL_LOCATIONS, and cctotal_runs.

◆ getWrkDirPath()

std::string woss::WossCreator::getWrkDirPath ( ) const
inline

Gets the work pathname

Returns
valid pathname

References work_dir_path.

◆ initializeWoss()

bool WossCreator::initializeWoss ( Woss & woss_ref) const
protectedpure virtual

◆ setCleanWorkDir()

WossCreator & woss::WossCreator::setCleanWorkDir ( bool flag)
inline

Sets clean work dir flag

Parameters
flagdebug flag
Returns
reference to *this

References woss_clean_workdir, and WossCreator().

Here is the call graph for this function:

◆ setDebug()

WossCreator & woss::WossCreator::setDebug ( bool flag)
inline

Sets debug flag

Parameters
flagdebug flag
Returns
reference to *this

References debug, updateDebugFlag(), and WossCreator().

Here is the call graph for this function:

◆ setEvolutionTimeQuantum() [1/2]

WossCreator & woss::WossCreator::setEvolutionTimeQuantum ( double value,
const CoordZ & tx,
const CoordZ & rx )
inline

Sets the time evolution threshold in seconds

Parameters
valuetime evolution threshold in seconds
txconst reference to a valid woss::CoordZ instance
rxconst reference to a valid woss::CoordZ instance
Returns
reference to *this

References ccevolution_time_quantum, and WossCreator().

Referenced by WossUnitTest::testBellhopCreator().

Here is the call graph for this function:

◆ setEvolutionTimeQuantum() [2/2]

WossCreator & woss::WossCreator::setEvolutionTimeQuantum ( double value,
const std::shared_ptr< Location > & tx = CCInt::ALL_LOCATIONS,
const std::shared_ptr< Location > & rx = CCInt::ALL_LOCATIONS )
inline

Sets time threshold for time evolution purposes

Parameters
valuetime threshold in seconds
txconst reference to a std::shared_ptr to a valid transmitter Location
rxconst reference to a std::shared_ptr to a valid receiver Location
Returns
reference to *this

References woss::WossCreatorContainer< int >::ALL_LOCATIONS, ccevolution_time_quantum, and WossCreator().

Here is the call graph for this function:

◆ setFrequencyStep() [1/2]

WossCreator & woss::WossCreator::setFrequencyStep ( double f_step,
const CoordZ & tx,
const CoordZ & rx )
inline

Sets the frequency step for given transmitter, receiver woss::CoordZ

Parameters
f_stepvalid frequency step [Hz]. If step <= 0 start frequency is used and no steps are done
txconst reference to a valid woss::CoordZ instance
rxconst reference to a valid woss::CoordZ instance
Returns
reference to *this

References ccfrequency_step, and WossCreator().

Referenced by WossUnitTest::testBellhopCreator().

Here is the call graph for this function:

◆ setFrequencyStep() [2/2]

WossCreator & woss::WossCreator::setFrequencyStep ( double f_step,
const std::shared_ptr< Location > & tx = CCDouble::ALL_LOCATIONS,
const std::shared_ptr< Location > & rx = CCDouble::ALL_LOCATIONS )
inline

Sets the frequency step for given transmitter, receiver woss::Location

Parameters
f_stepvalid frequency step [Hz]. If step <= 0 start frequency is used and no steps are done
txconst reference to a std::shared_ptr to a valid transmitter Location
rxconst reference to a std::shared_ptr to a valid receiver Location
Returns
reference to *this

References woss::WossCreatorContainer< double >::ALL_LOCATIONS, ccfrequency_step, and WossCreator().

Here is the call graph for this function:

◆ setSimTime() [1/2]

WossCreator & woss::WossCreator::setSimTime ( const SimTime & simtime,
const CoordZ & tx,
const CoordZ & rx )
inline

Sets the SimTime for given transmitter, receiver woss::CoordZ

Parameters
simtimeconst reference to a valid SimTime
txconst reference to a valid woss::CoordZ instance
rxconst reference to a valid woss::CoordZ instance
Returns
reference to *this

References ccsimtime_map, and WossCreator().

Referenced by WossUnitTest::testBellhopCreator().

Here is the call graph for this function:

◆ setSimTime() [2/2]

WossCreator & woss::WossCreator::setSimTime ( const SimTime & simtime,
const std::shared_ptr< Location > & tx = CCSimTime::ALL_LOCATIONS,
const std::shared_ptr< Location > & rx = CCSimTime::ALL_LOCATIONS )
inline

Sets the SimTime for given transmitter, receiver woss::Location

Parameters
simtimeconst reference to a valid SimTime
txconst reference to a std::shared_ptr to a valid transmitter Location
rxconst reference to a std::shared_ptr to a valid receiver Location
Returns
reference to *this

References woss::WossCreatorContainer< SimTime >::ALL_LOCATIONS, ccsimtime_map, and WossCreator().

Here is the call graph for this function:

◆ setTotalRuns() [1/2]

WossCreator & woss::WossCreator::setTotalRuns ( int runs,
const CoordZ & tx,
const CoordZ & rx )
inline

Sets the total number of channel simulator's runs

Parameters
runsnumber of runs
txconst reference to a valid woss::CoordZ instance
rxconst reference to a valid woss::CoordZ instance
Returns
reference to *this

References cctotal_runs, and WossCreator().

Referenced by WossUnitTest::testBellhopCreator().

Here is the call graph for this function:

◆ setTotalRuns() [2/2]

WossCreator & woss::WossCreator::setTotalRuns ( int runs,
const std::shared_ptr< Location > & tx = CCInt::ALL_LOCATIONS,
const std::shared_ptr< Location > & rx = CCInt::ALL_LOCATIONS )
inline

Sets the total number of channel simulator's runs

Parameters
runsnumber of runs
txconst reference to a std::shared_ptr to a valid transmitter Location
rxconst reference to a std::shared_ptr to a valid receiver Location
Returns
reference to *this

References woss::WossCreatorContainer< int >::ALL_LOCATIONS, cctotal_runs, and WossCreator().

Here is the call graph for this function:

◆ setTransducerHandler()

WossCreator & woss::WossCreator::setTransducerHandler ( const std::shared_ptr< TransducerHandler > & ptr)
inline

Sets the TransducerHander pointer

Parameters
ptrstd::shared_ptr to a TransducerHander object
Returns
reference to *this

References transducer_handler, and WossCreator().

Here is the call graph for this function:

◆ setWossDbManager()

WossCreator & woss::WossCreator::setWossDbManager ( const std::shared_ptr< WossDbManager > & ptr)
inline

Sets the WossDbManager pointer

Parameters
ptrstd::shared_ptr to a WossDbManager object
Returns
reference to *this

References woss_db_manager, and WossCreator().

Here is the call graph for this function:

◆ setWossDebug()

WossCreator & woss::WossCreator::setWossDebug ( bool flag)
inline

Sets debug flag of every Woss object created

Parameters
flagdebug flag
Returns
reference to *this

References woss_debug, and WossCreator().

Referenced by WossUnitTest::testBellhopCreator().

Here is the call graph for this function:

◆ setWrkDirPath()

WossCreator & woss::WossCreator::setWrkDirPath ( const std::string & path)
inline

Sets the work pathname

Parameters
pathvalid pathname
Returns
reference to *this

References work_dir_path, and WossCreator().

Here is the call graph for this function:

◆ updateDebugFlag()

void WossCreator::updateDebugFlag ( )
protectedvirtual

◆ usingDebug()

bool woss::WossCreator::usingDebug ( ) const
inline

Returns debug flag

Returns
true if using debug, false otherwise

References debug.

◆ usingWossDebug()

bool woss::WossCreator::usingWossDebug ( ) const
inline

Returns Woss debug flag

Returns
true if Woss objects will be using debug, false otherwise

References woss_debug.

Referenced by WossUnitTest::testBellhopCreator().

Member Data Documentation

◆ ccevolution_time_quantum

◆ ccfrequency_step

CCDouble woss::WossCreator::ccfrequency_step
protected

◆ ccsimtime_map

CCSimTime woss::WossCreator::ccsimtime_map
protected

◆ cctotal_runs

CCInt woss::WossCreator::cctotal_runs
protected

◆ debug

bool woss::WossCreator::debug
protected

◆ transducer_handler

std::shared_ptr<TransducerHandler> woss::WossCreator::transducer_handler
protected

◆ work_dir_path

std::string woss::WossCreator::work_dir_path
protected

Directory path for temporary files (e.g. channel simulator files)

Referenced by getWrkDirPath(), initializeWoss(), setWrkDirPath(), and WossCreator().

◆ woss_clean_workdir

bool woss::WossCreator::woss_clean_workdir
protected

Debug flag for all Woss instances

Referenced by initializeWoss(), setCleanWorkDir(), and WossCreator().

◆ woss_db_manager

std::shared_ptr<WossDbManager> woss::WossCreator::woss_db_manager
protected

◆ woss_debug

bool woss::WossCreator::woss_debug
protected

Debug flag for all Woss instances

Referenced by initializeWoss(), setWossDebug(), usingWossDebug(), and WossCreator().


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