World Ocean Simulation System (WOSS) library
woss::Singleton< T > Class Template Reference

Singleton design pattern template. More...

#include <singleton-definitions.h>

Collaboration diagram for woss::Singleton< T >:
Collaboration graph

Static Public Member Functions

static T * instance ()
 

Private Member Functions

 Singleton ()
 
 Singleton (const Singleton &copy)
 
Singletonoperator= (const Singleton &copy)
 

Static Private Attributes

static T * the_instance = 0
 

Detailed Description

template<typename T>
class woss::Singleton< T >

Singleton design pattern template.

A simple singleton template pattern, useful to decouple classes from singleton implementation

Constructor & Destructor Documentation

◆ Singleton() [1/2]

template<typename T >
woss::Singleton< T >::Singleton ( )
inlineprivate

Disallowed default constructor

◆ Singleton() [2/2]

template<typename T >
woss::Singleton< T >::Singleton ( const Singleton< T > &  copy)
inlineprivate

Disallowed copy constructor

Member Function Documentation

◆ instance()

template<typename T >
T * woss::Singleton< T >::instance ( )
inlinestatic

Returns the singleton instance

Returns
a pointer to the_instance

Referenced by woss::SedimDeck41Db::calculateSediment(), woss::SedimDeck41Db::createSediment(), woss::WossManagerResDb::dbGetPressure(), woss::WossManagerResDb::dbGetTimeArr(), woss::SSP::fullRandomize(), woss::WossDbManager::getAltimetry(), woss::ArrAscResReader::getArrAscHeader(), woss::ArrBinResReader::getArrBinHeader(), woss::WossDbManager::getAverageSSP(), woss::WossDbManager::getPressure(), woss::WossDbManager::getSediment(), woss::WossDbManager::getSediment(), woss::WossDbManager::getSSP(), woss::WossDbManager::getTimeArr(), WossMPhyBpsk::getTxPower(), woss::SspWoa2005Db::getValue(), woss::ResPressureTxtDb::getValue(), woss::ResTimeArrTxtDb::getValue(), woss::WossManagerResDb::getWossPressure(), woss::WossManagerResDbMT::getWossPressure(), woss::WossManager::getWossPressure(), woss::WossManagerResDbMT::getWossPressure(), woss::WossManager::getWossPressure(), woss::WossManager::getWossPressure(), woss::WossManagerResDb::getWossTimeArr(), woss::WossManagerResDbMT::getWossTimeArr(), woss::WossManager::getWossTimeArr(), woss::WossManagerResDbMT::getWossTimeArr(), woss::WossManager::getWossTimeArr(), woss::WossManager::getWossTimeArr(), woss::WossDbManager::importCustomSSP(), woss::TransducerHandler::importValueAscii(), woss::TransducerHandler::importValueBinary(), woss::TransducerHandler::operator=(), woss::Altimetry::randomize(), woss::SSP::randomize(), woss::ArrAscResReader::readAvgPressure(), woss::ArrBinResReader::readAvgPressure(), woss::ShdResReader::readAvgPressure(), woss::ArrAscResReader::readPressure(), woss::ArrBinResReader::readPressure(), woss::ShdResReader::readPressure(), woss::ArrAscResReader::readTimeArr(), woss::ArrBinResReader::readTimeArr(), woss::ShdResReader::readTimeArr(), woss::WossDbManager::setCustomSediment(), woss::TransducerHandler::TransducerHandler(), woss::TransducerHandler::TransducerHandler(), and woss::TransducerHandler::TransducerHandler().

◆ operator=()

template<typename T >
Singleton & woss::Singleton< T >::operator= ( const Singleton< T > &  copy)
inlineprivate

Disallowed assignment operator

Member Data Documentation

◆ the_instance

template<typename T >
T * woss::Singleton< T >::the_instance = 0
staticprivate

static heap instance


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