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

Abstract class that interfaces Pressure or TimeArr requests from user layer. More...

#include <woss-manager.h>

Inheritance diagram for woss::WossManager:
Inheritance graph
Collaboration diagram for woss::WossManager:
Collaboration graph

Public Member Functions

 WossManager ()
virtual ~WossManager ()=default
virtual std::shared_ptr< WossgetActiveWoss (const CoordZ &tx, const CoordZ &rx, double start_frequency, double end_frequency)
virtual WossManagereraseActiveWoss (const CoordZ &tx, const CoordZ &rx, double start_frequency, double end_frequency)=0
virtual std::unique_ptr< PressuregetWossPressure (const CoordZ &tx_coordz, const CoordZ &rx_coordz, double start_frequency, double end_frequency, const Time &time_value)=0
virtual std::unique_ptr< PressuregetWossPressure (const CoordZ &tx_coordz, const CoordZ &rx_coordz, double start_frequency, double end_frequency, double time_value=0.0)
virtual PressureVector getWossPressure (const CoordZPairVect &coordinates, double start_frequency, double end_frequency, const Time &time_value)
virtual PressureVector getWossPressure (const CoordZPairVect &coordinates, double start_frequency, double end_frequency, double time_value=0.0)
virtual std::unique_ptr< TimeArrgetWossTimeArr (const CoordZ &tx_coordz, const CoordZ &rx_coordz, double start_frequency, double end_frequency, const Time &time_value)=0
virtual std::unique_ptr< TimeArrgetWossTimeArr (const CoordZ &tx_coordz, const CoordZ &rx_coordz, double start_frequency, double end_frequency, double time_value=0.0)
virtual TimeArrVector getWossTimeArr (const CoordZPairVect &coordinates, double start_frequency, double end_frequency, const Time &time_value)
virtual TimeArrVector getWossTimeArr (const CoordZPairVect &coordinates, double start_frequency, double end_frequency, double time_value=0.0)
virtual bool reset ()=0
virtual bool timeEvolve (const Time &time_value)=0
WossManagersetWossCreator (const std::shared_ptr< WossCreator > &ptr)
void setTimeEvolutionActiveFlag (bool flag)
void setDebugFlag (bool flag)
std::shared_ptr< WossCreatorgetWossCreator () const
bool getTimeEvolutionActiveFlag () const
bool getDebugFlag () const

Protected Member Functions

virtual std::shared_ptr< WossgetWoss (const CoordZ &tx, const CoordZ &rx, double start_frequency, double end_frequency)=0

Protected Attributes

std::shared_ptr< WossCreatorwoss_creator
bool debug
bool is_time_evolution_active

Static Protected Attributes

static const Time NO_EVOLUTION_TIME = {1, 1, 1901 , 1, 1, 1}

Detailed Description

Abstract class that interfaces Pressure or TimeArr requests from user layer.

WossManager interfaces the user with the whole library. Every request for Pressure or TimeArr should be done to this class. Logical inteligence for planning CPU load, multi-frequency and multi-run channel simulations should be placed in this inheritance chain

Constructor & Destructor Documentation

◆ WossManager()

WossManager::WossManager ( )

WossManager default constructor

References debug, and woss_creator.

Referenced by eraseActiveWoss(), and setWossCreator().

◆ ~WossManager()

virtual woss::WossManager::~WossManager ( )
virtualdefault

Member Function Documentation

◆ eraseActiveWoss()

virtual WossManager & woss::WossManager::eraseActiveWoss ( const CoordZ & tx,
const CoordZ & rx,
double start_frequency,
double end_frequency )
pure virtual

Deletes a woss::Woss object for given params

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
reference to *this

Implemented in woss::WossManagerSimple< WMResDb >.

References WossManager().

Here is the call graph for this function:

◆ getActiveWoss()

std::shared_ptr< Woss > WossManager::getActiveWoss ( const CoordZ & tx,
const CoordZ & rx,
double start_frequency,
double end_frequency )
virtual

Returns a shared_ptr to a valid and properly initialized woss::Woss object.

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
std::shared_ptr to a valid Woss instance

References getWoss().

Here is the call graph for this function:

◆ getDebugFlag()

bool woss::WossManager::getDebugFlag ( ) const
inline

References debug.

◆ getTimeEvolutionActiveFlag()

bool woss::WossManager::getTimeEvolutionActiveFlag ( ) const
inline

◆ getWoss()

virtual std::shared_ptr< Woss > woss::WossManager::getWoss ( const CoordZ & tx,
const CoordZ & rx,
double start_frequency,
double end_frequency )
protectedpure virtual

Returns a pointer to a properly initialized Woss, for storage purposes.

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
std::shared_ptr to a valid Woss object

Implemented in woss::WossManagerSimple< WMResDb >.

Referenced by getActiveWoss(), getWossPressure(), woss::WossManagerResDb::getWossPressure(), woss::WossManagerResDbMT::getWossPressure(), getWossTimeArr(), woss::WossManagerResDb::getWossTimeArr(), and woss::WossManagerResDbMT::getWossTimeArr().

◆ getWossCreator()

std::shared_ptr< WossCreator > woss::WossManager::getWossCreator ( ) const
inline

◆ getWossPressure() [1/4]

std::unique_ptr< Pressure > WossManager::getWossPressure ( const CoordZ & tx_coordz,
const CoordZ & rx_coordz,
double start_frequency,
double end_frequency,
const Time & time_value )
pure virtual

Returns a valid unique_ptr<Pressure> 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]
time_valueconst reference to a valid Time object
Returns
std::unique_ptr to a valid Pressure object

Implemented in woss::WossManagerResDb, and woss::WossManagerResDbMT.

References debug, woss::CoordZ::getCartDistance(), woss::CoordZ::getDepth(), woss::Coord::getGreatCircleDistance(), getWoss(), and woss::Singleton< DefHandler >::instance().

Referenced by getWossPressure(), getWossPressure(), getWossPressure(), woss::WossManagerResDbMT::getWossPressure(), and woss::WossManagerResDbMT::getWossPressure().

Here is the call graph for this function:

◆ getWossPressure() [2/4]

std::unique_ptr< Pressure > WossManager::getWossPressure ( const CoordZ & tx_coordz,
const CoordZ & rx_coordz,
double start_frequency,
double end_frequency,
double time_value = 0.0 )
virtual

Returns a valid Pressure* 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]
time_valueconst reference to a valid Time object
Returns
std::unique_ptr to a valid Pressure object

Reimplemented in woss::WossManagerResDbMT.

References debug, woss::CoordZ::getCartDistance(), getWossPressure(), woss::Singleton< DefHandler >::instance(), woss::Time::isValid(), woss::SimTime::start_time, and woss_creator.

Here is the call graph for this function:

◆ getWossPressure() [3/4]

PressureVector WossManager::getWossPressure ( const CoordZPairVect & coordinates,
double start_frequency,
double end_frequency,
const Time & time_value )
virtual

Returns a valid vector of Pressure* for given parameters

Parameters
coordinatesconst reference to a valid CoordZPairVect
start_freqstart frequency [Hz]
end_freqend frequency [Hz]
time_valueconst reference to a valid Time object
Returns
valid PressureVector

Reimplemented in woss::WossManagerResDbMT.

References getWossPressure().

Here is the call graph for this function:

◆ getWossPressure() [4/4]

PressureVector WossManager::getWossPressure ( const CoordZPairVect & coordinates,
double start_frequency,
double end_frequency,
double time_value = 0.0 )
virtual

Returns a valid vector of Pressure* for given parameters

Parameters
coordinatesconst reference to a valid CoordZPairVect
start_freqstart frequency [Hz]
end_freqend frequency [Hz]
time_valueseconds after start time
Returns
valid PressureVector

Reimplemented in woss::WossManagerResDbMT.

References woss::Pressure::createNotValid(), debug, getWossPressure(), woss::Singleton< DefHandler >::instance(), woss::Time::isValid(), woss::SimTime::start_time, and woss_creator.

Here is the call graph for this function:

◆ getWossTimeArr() [1/4]

std::unique_ptr< TimeArr > WossManager::getWossTimeArr ( const CoordZ & tx_coordz,
const CoordZ & rx_coordz,
double start_frequency,
double end_frequency,
const Time & time_value )
pure virtual

Returns a valid TimeArr* 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]
time_valueconst reference to a valid Time object
Returns
std::unique_ptr to a valid TimeArr object

Implemented in woss::WossManagerResDb, and woss::WossManagerResDbMT.

References woss::TimeArr::createImpulse(), debug, woss::CoordZ::getCartDistance(), woss::CoordZ::getDepth(), woss::Coord::getGreatCircleDistance(), getWoss(), and woss::Singleton< DefHandler >::instance().

Referenced by getWossTimeArr(), getWossTimeArr(), getWossTimeArr(), woss::WossManagerResDbMT::getWossTimeArr(), and woss::WossManagerResDbMT::getWossTimeArr().

Here is the call graph for this function:

◆ getWossTimeArr() [2/4]

std::unique_ptr< TimeArr > WossManager::getWossTimeArr ( const CoordZ & tx_coordz,
const CoordZ & rx_coordz,
double start_frequency,
double end_frequency,
double time_value = 0.0 )
virtual

Returns a valid TimeArr* 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]
time_valueconst reference to a valid Time object
Returns
std::unique_ptr to a valid TimeArr object

Reimplemented in woss::WossManagerResDbMT.

References woss::TimeArr::createImpulse(), debug, woss::CoordZ::getCartDistance(), getWossTimeArr(), woss::Singleton< DefHandler >::instance(), woss::Time::isValid(), woss::SimTime::start_time, and woss_creator.

Here is the call graph for this function:

◆ getWossTimeArr() [3/4]

TimeArrVector WossManager::getWossTimeArr ( const CoordZPairVect & coordinates,
double start_frequency,
double end_frequency,
const Time & time_value )
virtual

Returns a valid vector of TimeArr* for given parameters

Parameters
coordinatesconst reference to a valid CoordZPairVect
start_freqstart frequency [Hz]
end_freqend frequency [Hz]
time_valueconst reference to a Time object
Returns
valid TimeArrVector

Reimplemented in woss::WossManagerResDbMT.

References getWossTimeArr().

Here is the call graph for this function:

◆ getWossTimeArr() [4/4]

TimeArrVector WossManager::getWossTimeArr ( const CoordZPairVect & coordinates,
double start_frequency,
double end_frequency,
double time_value = 0.0 )
virtual

Returns a valid vector of TimeArr* for given parameters

Parameters
coordinatesconst reference to a valid CoordZPairVect
start_freqstart frequency [Hz]
end_freqend frequency [Hz]
time_valuenumber of seconds after start time
Returns
valid TimeArrVector

Reimplemented in woss::WossManagerResDbMT.

References woss::TimeArr::createNotValid(), debug, getWossTimeArr(), woss::Singleton< DefHandler >::instance(), woss::Time::isValid(), woss::SimTime::start_time, and woss_creator.

Here is the call graph for this function:

◆ reset()

virtual bool woss::WossManager::reset ( )
pure virtual

Deletes all created Woss instances

Returns
true if method was successful, false otherwise

Implemented in woss::WossManagerSimple< WMResDb >.

◆ setDebugFlag()

void woss::WossManager::setDebugFlag ( bool flag)
inline

References debug.

◆ setTimeEvolutionActiveFlag()

void woss::WossManager::setTimeEvolutionActiveFlag ( bool flag)
inline

◆ setWossCreator()

WossManager & woss::WossManager::setWossCreator ( const std::shared_ptr< WossCreator > & ptr)
inline

Sets a pointer to a WossCreator instance, for Woss creation purposes

Parameters
ptrconst pointer to a const WossCreator instance
Returns
reference to *this

References woss_creator, and WossManager().

Here is the call graph for this function:

◆ timeEvolve()

virtual bool woss::WossManager::timeEvolve ( const Time & time_value)
pure virtual

Performs a time evoulion of all time-dependant parameters of all created Woss instances

Parameters
time_valueconst reference to a valid Time object
Returns
true if method was successful, false otherwise

Implemented in woss::WossManagerSimple< WMResDb >.

Member Data Documentation

◆ debug

◆ is_time_evolution_active

◆ NO_EVOLUTION_TIME

◆ woss_creator


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