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::WossCreator ( )

WossCreator default constructor

References woss::WossCreatorContainer< Data >::accessAllLocations(), ccfrequency_step, and updateDebugFlag().

Here is the call graph for this function:

◆ ~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 woss::WossCreatorContainer< Data >::erase().

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 ccevolution_time_quantum, and woss::WossCreatorContainer< Data >::erase().

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 woss::WossCreatorContainer< Data >::erase().

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 ccfrequency_step, and woss::WossCreatorContainer< Data >::erase().

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 woss::WossCreatorContainer< Data >::erase().

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 ccsimtime_map, and woss::WossCreatorContainer< Data >::erase().

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 woss::WossCreatorContainer< Data >::erase().

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 cctotal_runs, and woss::WossCreatorContainer< Data >::erase().

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, and woss::WossCreatorContainer< Data >::get().

Here is the call graph for this function:

◆ 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 ccevolution_time_quantum, and woss::WossCreatorContainer< Data >::get().

Here is the call graph for this function:

◆ 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, and woss::WossCreatorContainer< Data >::get().

Referenced by woss::BellhopCreator::createWoss().

Here is the call graph for this function:

◆ 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 ccfrequency_step, and woss::WossCreatorContainer< Data >::get().

Here is the call graph for this function:

◆ 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, and woss::WossCreatorContainer< Data >::get().

Referenced by woss::BellhopCreator::createWoss().

Here is the call graph for this function:

◆ 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 ccsimtime_map, and woss::WossCreatorContainer< Data >::get().

Here is the call graph for this function:

◆ 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, and woss::WossCreatorContainer< Data >::get().

Here is the call graph for this function:

◆ 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 cctotal_runs, and woss::WossCreatorContainer< Data >::get().

Here is the call graph for this function:

◆ 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.

◆ setDebug()

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

Sets debug flag

Parameters
flagdebug flag
Returns
reference to *this

References debug, and updateDebugFlag().

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 woss::WossCreatorContainer< Data >::replace().

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 ccevolution_time_quantum, and woss::WossCreatorContainer< Data >::replace().

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 woss::WossCreatorContainer< Data >::replace().

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 ccfrequency_step, and woss::WossCreatorContainer< Data >::replace().

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 woss::WossCreatorContainer< Data >::replace().

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 ccsimtime_map, and woss::WossCreatorContainer< Data >::replace().

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 woss::WossCreatorContainer< Data >::replace().

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 cctotal_runs, and woss::WossCreatorContainer< Data >::replace().

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.

◆ 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.

◆ 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.

◆ 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.

◆ updateDebugFlag()

void WossCreator::updateDebugFlag ( )
protectedvirtual

Propagates the debug flag

Reimplemented in woss::BellhopCreator.

References ccevolution_time_quantum, ccfrequency_step, ccsimtime_map, cctotal_runs, debug, and woss::WossCreatorContainer< Data >::setDebug().

Referenced by setDebug(), woss::BellhopCreator::updateDebugFlag(), and WossCreator().

Here is the call graph for this function:

◆ 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.

Member Data Documentation

◆ ccevolution_time_quantum

◆ ccfrequency_step

CCDouble woss::WossCreator::ccfrequency_step
protected

◆ ccsimtime_map

CCSimTime woss::WossCreator::ccsimtime_map
protected

SimTime containter for user-given transmitter CoordZ

Referenced by eraseSimTime(), eraseSimTime(), getSimTime(), getSimTime(), setSimTime(), setSimTime(), and updateDebugFlag().

◆ 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(), and setWrkDirPath().

◆ woss_clean_workdir

bool woss::WossCreator::woss_clean_workdir
protected

Debug flag for all Woss instances

Referenced by initializeWoss(), and setCleanWorkDir().

◆ woss_db_manager

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

Referenced by initializeWoss(), and setWossDbManager().

◆ woss_debug

bool woss::WossCreator::woss_debug
protected

Debug flag for all Woss instances

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


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