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 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, Location *const tx=CCDouble::ALL_LOCATIONS, Location *const rx=CCDouble::ALL_LOCATIONS)
 
double getFrequencyStep (const CoordZ &tx, const CoordZ &rx) const
 
double getFrequencyStep (Location *const tx=CCDouble::ALL_LOCATIONS, Location *const rx=CCDouble::ALL_LOCATIONS) const
 
WossCreatoreraseFrequencyStep (const CoordZ &tx, const CoordZ &rx)
 
WossCreatoreraseFrequencyStep (Location *const tx=CCDouble::ALL_LOCATIONS, Location *const rx=CCDouble::ALL_LOCATIONS)
 
WossCreatorsetEvolutionTimeQuantum (double value, const CoordZ &tx, const CoordZ &rx)
 
WossCreatorsetEvolutionTimeQuantum (double value, Location *const tx=CCInt::ALL_LOCATIONS, Location *const rx=CCInt::ALL_LOCATIONS)
 
double getEvolutionTimeQuantum (const CoordZ &tx, const CoordZ &rx) const
 
double getEvolutionTimeQuantum (Location *const tx=CCInt::ALL_LOCATIONS, Location *const rx=CCInt::ALL_LOCATIONS) const
 
WossCreatoreraseEvolutionTimeQuantum (const CoordZ &tx, const CoordZ &rx)
 
WossCreatoreraseEvolutionTimeQuantum (Location *const tx=CCInt::ALL_LOCATIONS, Location *const rx=CCInt::ALL_LOCATIONS)
 
WossCreatorsetTotalRuns (int runs, const CoordZ &tx, const CoordZ &rx)
 
WossCreatorsetTotalRuns (int runs, Location *const tx=CCInt::ALL_LOCATIONS, Location *const rx=CCInt::ALL_LOCATIONS)
 
int getTotalRuns (const CoordZ &tx, const CoordZ &rx) const
 
int getTotalRuns (Location *const tx=CCInt::ALL_LOCATIONS, Location *const rx=CCInt::ALL_LOCATIONS) const
 
WossCreatoreraseTotalRuns (const CoordZ &tx, const CoordZ &rx)
 
WossCreatoreraseTotalRuns (Location *const tx=CCInt::ALL_LOCATIONS, Location *const rx=CCInt::ALL_LOCATIONS)
 
WossCreatorsetSimTime (const SimTime &simtime, const CoordZ &tx, const CoordZ &rx)
 
WossCreatorsetSimTime (const SimTime &simtime, Location *const tx=CCSimTime::ALL_LOCATIONS, Location *const rx=CCSimTime::ALL_LOCATIONS)
 
SimTime getSimTime (const CoordZ &tx, const CoordZ &rx) const
 
SimTime getSimTime (Location *const tx=CCSimTime::ALL_LOCATIONS, Location *const rx=CCSimTime::ALL_LOCATIONS) const
 
WossCreatoreraseSimTime (const CoordZ &tx, const CoordZ &rx)
 
WossCreatoreraseSimTime (Location *const tx=CCSimTime::ALL_LOCATIONS, Location *const rx=CCSimTime::ALL_LOCATIONS)
 
WossCreatorsetWossDbManager (const WossDbManager *const ptr)
 
WossCreatorsetTransducerHandler (const TransducerHandler *const ptr)
 
const WossgetWossNotValid () const
 

Protected Types

typedef WossCreatorContainer< SimTimeCCSimTime
 
typedef WossCreatorContainer< double > CCDouble
 
typedef WossCreatorContainer< int > CCInt
 

Protected Member Functions

virtual bool initializeWoss (Woss *const woss_ptr) const =0
 
virtual const WosscreateNotValidWoss () const =0
 
virtual void updateDebugFlag ()
 

Protected Attributes

const WossDbManagerwoss_db_manager
 
const 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
 

Static Protected Attributes

static const Wosswoss_not_valid = NULL
 

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:

Member Function Documentation

◆ createWoss()

virtual 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 ( Location *const  tx = CCInt::ALL_LOCATIONS,
Location *const  rx = CCInt::ALL_LOCATIONS 
)
inline

Erases the time evolution threshold

Parameters
txconst pointer to a valid woss::Location instance
rxconst pointer to a valid woss::Location instance
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 ( Location *const  tx = CCDouble::ALL_LOCATIONS,
Location *const  rx = CCDouble::ALL_LOCATIONS 
)
inline

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

Parameters
txconst pointer to a valid woss::Location instance
rxconst pointer to a valid woss::Location instance
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 ( Location *const  tx = CCSimTime::ALL_LOCATIONS,
Location *const  rx = CCSimTime::ALL_LOCATIONS 
)
inline

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

Parameters
txconst pointer to a valid woss::Location instance
rxconst pointer to a valid woss::Location instance
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 ( Location *const  tx = CCInt::ALL_LOCATIONS,
Location *const  rx = CCInt::ALL_LOCATIONS 
)
inline

Erases the total number of channel simulator's runs

Parameters
txconst pointer to a valid woss::Location instance
rxconst pointer to a valid woss::Location instance
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 ( Location *const  tx = CCInt::ALL_LOCATIONS,
Location *const  rx = CCInt::ALL_LOCATIONS 
) const
inline

Returns the time evolution threshold

Parameters
txconst pointer to a valid woss::Location instance
rxconst pointer to a valid woss::Location instance
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(), woss::WossManagerResDb::getWossPressure(), woss::WossManagerResDbMT::getWossPressure(), woss::WossManagerResDb::getWossTimeArr(), and woss::WossManagerResDbMT::getWossTimeArr().

Here is the call graph for this function:

◆ getFrequencyStep() [2/2]

double woss::WossCreator::getFrequencyStep ( Location *const  tx = CCDouble::ALL_LOCATIONS,
Location *const  rx = CCDouble::ALL_LOCATIONS 
) const
inline

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

Parameters
txconst pointer to a valid woss::Location instance
rxconst pointer to a valid woss::Location instance
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(), woss::WossManagerResDbMT::getWossPressure(), woss::WossManager::getWossPressure(), woss::WossManagerResDbMT::getWossTimeArr(), woss::WossManager::getWossTimeArr(), woss::WMSMTcreateThreadPressure(), and woss::WMSMTcreateThreadTimeArr().

Here is the call graph for this function:

◆ getSimTime() [2/2]

SimTime woss::WossCreator::getSimTime ( Location *const  tx = CCSimTime::ALL_LOCATIONS,
Location *const  rx = CCSimTime::ALL_LOCATIONS 
) const
inline

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

Parameters
txconst pointer to a valid woss::Location instance
rxconst pointer to a valid woss::Location instance
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 ( Location *const  tx = CCInt::ALL_LOCATIONS,
Location *const  rx = CCInt::ALL_LOCATIONS 
) const
inline

Returns the total number of channel simulator's runs

Parameters
txconst pointer to a valid woss::Location instance
rxconst pointer to a valid woss::Location instance
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 *const  woss_ptr) 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,
Location *const  tx = CCInt::ALL_LOCATIONS,
Location *const  rx = CCInt::ALL_LOCATIONS 
)
inline

Sets time threshold for time evolution purposes

Parameters
valuetime threshold in seconds
txconst pointer to a valid woss::Location instance
rxconst pointer to a valid woss::Location instance
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,
Location *const  tx = CCDouble::ALL_LOCATIONS,
Location *const  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 pointer to a valid woss::Location instance
rxconst pointer to a valid woss::Location instance
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,
Location *const  tx = CCSimTime::ALL_LOCATIONS,
Location *const  rx = CCSimTime::ALL_LOCATIONS 
)
inline

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

Parameters
simtimeconst reference to a valid SimTime
txconst pointer to a valid woss::Location instance
rxconst pointer to a valid woss::Location instance
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,
Location *const  tx = CCInt::ALL_LOCATIONS,
Location *const  rx = CCInt::ALL_LOCATIONS 
)
inline

Sets the total number of channel simulator's runs

Parameters
runsnumber of runs
txconst pointer to a valid woss::Location instance
rxconst pointer to a valid woss::Location instance
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 TransducerHandler *const  ptr)
inline

Sets the WossDbManager pointer

Parameters
pathconst pointer to a const WossDbManager object
Returns
reference to *this

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

◆ setWossDbManager()

WossCreator & woss::WossCreator::setWossDbManager ( const WossDbManager *const  ptr)
inline

Sets the WossDbManager pointer

Parameters
pathconst pointer to a const WossDbManager object
Returns
reference to *this

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

◆ 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

CCDouble woss::WossCreator::ccevolution_time_quantum
protected

◆ 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(), getSimTime(), setSimTime(), and updateDebugFlag().

◆ cctotal_runs

CCInt woss::WossCreator::cctotal_runs
protected

Total number of channel simulator's runs

Referenced by eraseTotalRuns(), getTotalRuns(), initializeWoss(), setTotalRuns(), and updateDebugFlag().

◆ debug

bool woss::WossCreator::debug
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_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: