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

Public Member Functions | |
| DefHandler () | |
| DefHandler (const DefHandler ©) | |
| DefHandler & | operator= (const DefHandler ©) |
| virtual | ~DefHandler () |
| double | getRand () const |
| int | getRandInt () const |
| double | getTimeReference () const |
| void | setPressure (Pressure *const ptr) |
| void | setTimeArr (TimeArr *const ptr) |
| void | setSSP (SSP *const ptr) |
| void | setSediment (Sediment *const ptr) |
| void | setTimeReference (TimeReference *const ptr) |
| void | setRandGenerator (RandomGenerator *const ptr) |
| void | setTransducer (Transducer *const ptr) |
| void | setAltimetry (Altimetry *const ptr) |
| const Pressure *const | getPressure () const |
| const TimeArr *const | getTimeArr () const |
| const SSP *const | getSSP () const |
| const Sediment *const | getSediment () const |
| RandomGenerator *const | getRandomGenerator () const |
| const Transducer *const | getTransducer () const |
| const Altimetry *const | getAltimetry () const |
| void | setDebug (bool flag) |
| bool | getDebug () |
Protected Attributes | |
| bool | debug |
| SSP * | ssp_creator |
| Sediment * | sediment_creator |
| Pressure * | pressure_creator |
| TimeArr * | time_arr_creator |
| TimeReference * | time_reference |
| RandomGenerator * | rand_generator |
| Transducer * | transducer |
| Altimetry * | altimetry_creator |
Class for managing dynamic instantiation of foundation classes.
woss::DefHandler is a class that handle dynamic instances of woss::SSP, woss::Sediment, woss::TimeArr, woss::Pressure. A client should aks for a pointer to any of them, and then call the virtual create method for an instance of that particular class. In this way a class that inherits from any of those mentioned above, could be "plugged-in" at run time in any WOSS class without changing the code. It should be created with singleton pattern for safety reasons (e.g. woss::Sigleton< woss::DefHandler > )
| DefHandler::DefHandler | ( | ) |
Default constructor
| DefHandler::DefHandler | ( | const DefHandler & | copy | ) |
Copy constructor
|
virtual |
Destructor
|
inline |
Returns a random value from the connected woss::RandomGenerator object
References woss::RandomGenerator::getRand().

|
inline |
Returns a random integer from the connected woss::RandomGenerator object
References woss::RandomGenerator::getRandInt().

|
inline |
Returns the current simulation time reference from the connected woss::TimeReference object
References woss::TimeReference::getTimeReference().

| DefHandler & DefHandler::operator= | ( | const DefHandler & | copy | ) |
Assignment operator
References woss::Altimetry::clone(), woss::Pressure::clone(), woss::RandomGenerator::clone(), woss::Sediment::clone(), woss::SSP::clone(), woss::TimeArr::clone(), woss::Transducer::clone(), woss::TimeReference::clone(), and debug.

|
protected |
Debug flag
Referenced by operator=().