|
World Ocean Simulation System (WOSS) library
|
Class for managing dynamic instantiation of foundation classes. More...
#include <definitions-handler.h>

Public Member Functions | |
| DefHandler ()=default | |
| DefHandler (const DefHandler ©)=default | |
| DefHandler (DefHandler &&tmp)=default | |
| DefHandler & | operator= (const DefHandler ©)=default |
| DefHandler & | operator= (DefHandler &&tmp)=default |
| ~DefHandler ()=default | |
| void | setPressure (std::unique_ptr< Pressure > ptr) |
| void | setTimeArr (std::unique_ptr< TimeArr > ptr) |
| void | setSSP (std::unique_ptr< SSP > ptr) |
| void | setSediment (std::unique_ptr< Sediment > ptr) |
| void | setTimeReference (std::unique_ptr< TimeReference > ptr) |
| void | setRandGenerator (std::unique_ptr< RandomGenerator > ptr) |
| void | setTransducer (std::unique_ptr< Transducer > ptr) |
| void | setAltimetry (std::unique_ptr< Altimetry > ptr) |
| void | setLocation (std::unique_ptr< Location > ptr) |
| void | setDebug (bool flag) |
| double | getRand () const |
| int | getRandInt () const |
| double | getTimeReference () const |
| bool | getDebug () const |
| template<class... Args> | |
| std::unique_ptr< Sediment > | createSediment (Args &&... args) const |
| template<class... Args> | |
| std::unique_ptr< Transducer > | createTransducer (Args &&... args) const |
| template<class... Args> | |
| std::unique_ptr< Altimetry > | createAltimetry (Args &&... args) const |
| template<class... Args> | |
| std::unique_ptr< Location > | createLocation (Args &&... args) const |
| template<class... Args> | |
| std::unique_ptr< SSP > | createSSP (Args &&... args) const |
| template<class... Args> | |
| std::unique_ptr< Pressure > | createPressure (Args &&... args) const |
| template<class... Args> | |
| std::unique_ptr< TimeArr > | createTimeArr (Args &&... args) const |
| template<class... Args> | |
| std::unique_ptr< Pressure[]> | createPressureArray (Args &&... args) const |
| template<class... Args> | |
| std::unique_ptr< TimeArr[]> | createTimeArrArray (Args &&... args) const |
Private Attributes | |
| bool | debug = false |
| std::unique_ptr< SSP > | ssp_creator = nullptr |
| std::unique_ptr< Sediment > | sediment_creator = nullptr |
| std::unique_ptr< TimeReference > | time_reference = nullptr |
| std::unique_ptr< RandomGenerator > | rand_generator = nullptr |
| std::unique_ptr< Transducer > | transducer_creator = nullptr |
| std::unique_ptr< Altimetry > | altimetry_creator = nullptr |
| std::unique_ptr< Location > | location_creator = nullptr |
| std::unique_ptr< Pressure > | pressure_creator = nullptr |
| std::unique_ptr< TimeArr > | time_arr_creator = nullptr |
Class for managing dynamic instantiation of foundation classes.
woss::DefHandler is a class that handle the creation of dynamic instances of woss::SSP, woss::Sediment, woss::TimeArr, woss::Pressure, woss::RandomGenerator, woss::TimeReference, woss::Transducer, woss::Location and woss::Altimetry. A custom derived definition class can be "plug in" at run time in the WOSS framework without changing the framework source code. DefHandler has been be created with singleton pattern for safety reasons (e.g. woss::Sigleton< woss::DefHandler > )
|
default |
|
default |
|
default |
|
default |
|
inline |
Returns a std::unique_ptr to heap allocated instance of the woss::Altimetry class hierarchy.
| args | variadic arguments that will be perfectly forwarded to the underlying woss::Altimetry::create() function |
References altimetry_creator.
|
inline |
Returns a std::unique_ptr to heap allocated instance of the woss::Location class hierarchy.
| args | variadic arguments that will be perfectly forwarded to the underlying woss::Location::create() function |
References location_creator.
|
inline |
Returns a std::unique_ptr to heap allocated instance of the woss::Pressure class hierarchy.
| args | variadic arguments that will be perfectly forwarded to the underlying woss::Pressure::create() function |
References pressure_creator.
|
inline |
Returns a std::unique_ptr to heap allocated array of instances of the woss::Pressure class hierarchy.
| args | variadic arguments that will be perfectly forwarded to the underlying woss::Pressure::createArray() function |
References pressure_creator.
|
inline |
Returns a std::unique_ptr to heap allocated instance of the woss::Sediment class hierarchy.
| args | variadic arguments that will be perfectly forwarded to the underlying woss::Sediment::create() function |
References sediment_creator.
|
inline |
Returns a std::unique_ptr to heap allocated instance of the woss::SSP class hierarchy.
| args | variadic arguments that will be perfectly forwarded to the underlying woss::SSP::create() function |
References ssp_creator.
|
inline |
Returns a std::unique_ptr to heap allocated instance of the woss::TimeArr class hierarchy.
| args | variadic arguments that will be perfectly forwarded to the underlying woss::TimeArr::create() function |
References time_arr_creator.
|
inline |
Returns a std::unique_ptr to heap allocated array of instances of the woss::TimeArr class hierarchy.
| args | variadic arguments that will be perfectly forwarded to the underlying woss::TimeArr::createArray() function |
References time_arr_creator.
|
inline |
Returns a std::unique_ptr to heap allocated instance of the woss::Transducer class hierarchy.
| args | variadic arguments that will be perfectly forwarded to the underlying woss::Transducer::create() function |
References transducer_creator.
|
inline |
|
inline |
Returns a random value from the connected woss::RandomGenerator object
References rand_generator.
|
inline |
Returns a random integer from the connected woss::RandomGenerator object
References rand_generator.
|
inline |
Returns the current simulation time reference from the connected woss::TimeReference object
References time_reference.
|
default |
|
default |
|
inline |
Sets the wos::Altimetry prototype, that will be used by the whole WOSS framework. The ownership of the input smart pointer will be trasfered to the woss::DefHandler instance.
| ptr | a std::unique_ptr to a woss::Altimetry object. |
References altimetry_creator.
Referenced by woss::WossTest::WossTest().
|
inline |
|
inline |
Sets the wos::Location prototype, that will be used by the whole WOSS framework. The ownership of the input smart pointer will be trasfered to the woss::DefHandler instance.
| ptr | a std::unique_ptr to a woss::Location object. |
References location_creator.
Referenced by woss::WossTest::WossTest().
|
inline |
Sets the wos::Pressure prototype, that will be used by the whole WOSS framework. The ownership of the input smart pointer will be trasfered to the woss::DefHandler instance.
| ptr | a std::unique_ptr to a woss::Pressure object. |
References pressure_creator.
Referenced by woss::WossTest::WossTest().
|
inline |
Sets the wos::RandomGenerator prototype, that will be used by the whole WOSS framework. The ownership of the input smart pointer will be trasfered to the woss::DefHandler instance.
| ptr | a std::unique_ptr to a woss::RandomGenerator object. |
References rand_generator.
Referenced by woss::WossTest::init().
|
inline |
Sets the wos::Sediment prototype, that will be used by the whole WOSS framework. The ownership of the input smart pointer will be trasfered to the woss::DefHandler instance.
| ptr | a std::unique_ptr to a woss::Sediment object. |
References sediment_creator.
Referenced by woss::WossTest::WossTest().
|
inline |
Sets the wos::SSP prototype, that will be used by the whole WOSS framework. The ownership of the input smart pointer will be trasfered to the woss::DefHandler instance.
| ptr | a std::unique_ptr to a woss::SSP object. |
References ssp_creator.
Referenced by woss::WossTest::WossTest().
|
inline |
Sets the wos::TimeArr prototype, that will be used by the whole WOSS framework. The ownership of the input smart pointer will be trasfered to the woss::DefHandler instance.
| ptr | a std::unique_ptr to a woss::TimeArr object. |
References time_arr_creator.
Referenced by woss::WossTest::WossTest().
|
inline |
Sets the wos::TimeReference prototype, that will be used by the whole WOSS framework. The ownership of the input smart pointer will be trasfered to the woss::DefHandler instance.
| ptr | a std::unique_ptr to a woss::TimeReference object. |
References time_reference.
Referenced by woss::WossTest::WossTest().
|
inline |
Sets the wos::Transducer prototype, that will be used by the whole WOSS framework. The ownership of the input smart pointer will be trasfered to the woss::DefHandler instance.
| ptr | a std::unique_ptr to a woss::Transducer object. |
References transducer_creator.
Referenced by woss::WossTest::WossTest().
|
private |
std::unique_ptr of an instance of the woss::Altimetry class hierarchy
Referenced by createAltimetry(), and setAltimetry().
|
private |
Debug flag
Referenced by getDebug(), and setDebug().
|
private |
std::unique_ptr of an instance of the woss::Location class hierarchy
Referenced by createLocation(), and setLocation().
|
private |
std::unique_ptr of an instance of the woss::Pressure class hierarchy
Referenced by createPressure(), createPressureArray(), and setPressure().
|
private |
std::unique_ptr of an instance of the woss::RandomGenerator class hierarchy
Referenced by getRand(), getRandInt(), and setRandGenerator().
|
private |
std::unique_ptr of an instance of the woss::Sediment class hierarchy
Referenced by createSediment(), and setSediment().
|
private |
std::unique_ptr of an instance of the woss::SSP class hierarchy
Referenced by createSSP(), and setSSP().
|
private |
std::unique_ptr of an instance of the woss::TimeArr class hierarchy
Referenced by createTimeArr(), createTimeArrArray(), and setTimeArr().
|
private |
std::unique_ptr of an instance of the woss::TimeReference class hierarchy
Referenced by getTimeReference(), and setTimeReference().
|
private |
std::unique_ptr of an instance of the woss::Transducer class hierarchy
Referenced by createTransducer(), and setTransducer().