Mantid
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Private Attributes | List of all members
Mantid::Kernel::SingletonHolder< T > Class Template Reference

Manage the lifetime of a class intended to be a singleton. More...

#include <SingletonHolder.h>

Public Types

using HeldType = T
 

Public Member Functions

 SingletonHolder ()=delete
 

Static Public Member Functions

static T & Instance ()
 Return a reference to the Singleton instance, creating it if it does not already exist Creation is done using the CreateUsingNew policy.
 

Static Private Attributes

static bool destroyed = false
 

Detailed Description

template<typename T>
class Mantid::Kernel::SingletonHolder< T >

Manage the lifetime of a class intended to be a singleton.

Definition at line 41 of file SingletonHolder.h.

Member Typedef Documentation

◆ HeldType

template<typename T >
using Mantid::Kernel::SingletonHolder< T >::HeldType = T

Definition at line 43 of file SingletonHolder.h.

Constructor & Destructor Documentation

◆ SingletonHolder()

template<typename T >
Mantid::Kernel::SingletonHolder< T >::SingletonHolder ( )
delete

Member Function Documentation

◆ Instance()

template<typename T >
T & Mantid::Kernel::SingletonHolder< T >::Instance ( )
static

Return a reference to the Singleton instance, creating it if it does not already exist Creation is done using the CreateUsingNew policy.

Held types need to make CreateUsingNew<T> a friend. This method cannot be inlined due to the presence of a local static variable. Inlining causes each call site to receive a different copy of the static instance variable.

Definition at line 91 of file SingletonHolder.h.

References Mantid::Kernel::CreateUsingNew< T >::create(), Mantid::Kernel::deleteOnExit(), and Mantid::Kernel::CreateUsingNew< T >::destroy().

Referenced by Mantid::CurveFitting::Functions::ProcessBackground::addRegion(), MantidQt::MantidWidgets::MuonFitPropertyBrowser::boolChanged(), Mantid::CurveFitting::Algorithms::FitPowderDiffPeaks::buildPartialWorkspace(), Mantid::DataObjects::EventWorkspaceHelpers::convertEventTo2D(), Mantid::Algorithms::DiscusMultipleScatteringCorrection::convertWsBothAxesToPoints(), WorkspaceCreationHelper::create2DWorkspaceFromFunction(), Mantid::Algorithms::SumEventsByLogValue::createBinnedOutput(), Mantid::Algorithms::CorelliCalibration::CalibrationTableHandler::createCalibrationTableWorkspace(), MuonWorkspaceCreationHelper::createDeadTimeTable(), Mantid::DataHandling::LoadMuonStrategy::createDeadTimeTable(), Mantid::DataHandling::LoadMuonStrategy::createDetectorGroupingTable(), Mantid::DataObjects::PeaksWorkspace::createDetectorTable(), Mantid::DataHandling::CreatePolarizationEfficiencies::createEfficiencies(), Mantid::CurveFitting::IMWDomainCreator::createEmptyResultWS(), Mantid::CurveFitting::TableWorkspaceDomainCreator::createEmptyResultWS(), Mantid::DataHandling::LoadILLSANS::createEmptyWorkspace(), Mantid::DataHandling::CreateSimulationWorkspace::createInstrument(), Mantid::DataHandling::LoadSpiceXML2DDet::createMatrixWorkspace(), Mantid::CurveFitting::Algorithms::Fit::createOutput(), Mantid::CurveFitting::Algorithms::LeBailFit::createOutputDataWorkspace(), Mantid::Algorithms::FindPeaksConvolve::createOutputTables(), Mantid::Algorithms::Bin2DPowderDiffraction::createOutputWorkspace(), Mantid::CurveFitting::Algorithms::ConvertToYSpace::createOutputWorkspace(), Mantid::DataHandling::CreateSimulationWorkspace::createOutputWorkspace(), Mantid::MDAlgorithms::IntegrateFlux::createOutputWorkspace(), Mantid::Algorithms::Q1DWeighted::createOutputWorkspace(), Mantid::CurveFitting::LatticeDomainCreator::createOutputWorkspace(), Mantid::CurveFitting::GeneralDomainCreator::createOutputWorkspace(), Mantid::CurveFitting::SeqDomainSpectrumCreator::createOutputWorkspace(), Mantid::DataHandling::LoadEventPreNexus2::createOutputWorkspace(), Mantid::MDAlgorithms::GetSpiceDataRawCountsFromMD::createOutputWorkspace(), Mantid::DataHandling::LoadNexusMonitors2::createOutputWorkspace(), Mantid::CurveFitting::Algorithms::VesuvioCalculateGammaBackground::createOutputWorkspaces(), Mantid::CurveFitting::Algorithms::NormaliseByPeakArea::createOutputWorkspaces(), Mantid::Algorithms::ScaleX::createOutputWS(), Mantid::CurveFitting::Algorithms::PlotPeakByLogValue::createResultsTable(), Mantid::DataHandling::LoadSpiceAscii::createRunInfoWS(), Mantid::Algorithms::SumEventsByLogValue::createTableOutput(), MuonWorkspaceCreationHelper::createTimeZeroTable(), Mantid::DataHandling::createTimeZeroTable(), Mantid::DataHandling::LoadHFIRSANS::createWorkspace(), Mantid::DataHandling::LoadRawHelper::createWorkspace(), Mantid::DataHandling::LoadSpice2D::createWorkspace(), Mantid::DataHandling::LoadRawHelper::createWorkspace(), Mantid::API::GenericDataProcessorAlgorithm< Base >::createWorkspaceSingleValue(), Mantid::API::createWorkspaceSingleValue(), MuonWorkspaceCreationHelper::createWorkspaceWithInstrumentandRun(), Mantid::CurveFitting::Functions::ProcessBackground::deleteRegion(), Mantid::DataHandling::LoadNexusProcessed::doAccelleratedMultiPeriodLoading(), Mantid::DataObjects::detail::doInitializeFromParent(), Mantid::DataObjects::detail::doInitializeFromParent< std::true_type >(), Mantid::WorkflowAlgorithms::MuonGroupAsymmetryCalculator::estimateAsymmetry(), Mantid::Algorithms::CalculateEfficiency::exec(), Mantid::Algorithms::ConvertAxesToRealSpace::exec(), Mantid::Algorithms::CreateBootstrapWorkspaces::exec(), Mantid::Algorithms::CreateMonteCarloWorkspace::exec(), Mantid::Algorithms::DiffractionFocussing2::exec(), Mantid::Algorithms::FFTSmooth::FFTSmooth2::exec(), Mantid::Algorithms::Q1D2::exec(), Mantid::Algorithms::Qxy::exec(), Mantid::Algorithms::ReadGroupsFromFile::exec(), Mantid::Algorithms::RealFFT::RealFFT::exec(), Mantid::Algorithms::Rebunch::exec(), Mantid::Algorithms::Regroup::exec(), Mantid::Algorithms::RemoveBackground::exec(), Mantid::Algorithms::RemoveBins::exec(), Mantid::Algorithms::ResampleX::exec(), Mantid::Algorithms::ResetNegatives::exec(), Mantid::Algorithms::RingProfile::exec(), Mantid::Algorithms::MayersSampleCorrection::exec(), Mantid::Algorithms::SetUncertainties::exec(), Mantid::Algorithms::SmoothData::exec(), Mantid::Algorithms::SolidAngle::exec(), Mantid::Algorithms::SphericalAbsorption::exec(), Mantid::Algorithms::StripVanadiumPeaks::exec(), Mantid::Algorithms::SumRowColumn::exec(), Mantid::Algorithms::SumSpectra::exec(), Mantid::Algorithms::TOFSANSResolution::exec(), Mantid::Algorithms::UnaryOperation::exec(), Mantid::Algorithms::UnwrapMonitor::exec(), Mantid::Algorithms::UnwrapSNS::exec(), Mantid::Algorithms::VesuvioL1ThetaResolution::exec(), Mantid::Algorithms::WeightedMeanOfWorkspace::exec(), Mantid::Algorithms::WienerSmooth::exec(), Mantid::Algorithms::XDataConverter::exec(), Mantid::Crystal::AnvredCorrection::exec(), Mantid::Crystal::FilterPeaks::exec(), Mantid::Crystal::FindClusterFaces::exec(), Mantid::Crystal::IntegratePeakTimeSlices::exec(), Mantid::Crystal::LoadIsawSpectrum::exec(), Mantid::Crystal::NormaliseVanadium::exec(), Mantid::Crystal::OptimizeLatticeForCellType::exec(), Mantid::Crystal::PeakIntegration::exec(), Mantid::Crystal::PeakIntensityVsRadius::exec(), Mantid::Crystal::PredictSatellitePeaks::exec(), Mantid::Crystal::SCDCalibratePanels::exec(), Mantid::Crystal::ShowPeakHKLOffsets::exec(), Mantid::Crystal::SortHKL::exec(), Mantid::Crystal::StatisticsOfPeaksWorkspace::exec(), Mantid::CurveFitting::Algorithms::ConvolveWorkspaces::exec(), Mantid::CurveFitting::Algorithms::EstimatePeakErrors::exec(), Mantid::CurveFitting::Algorithms::Fit1D::exec(), Mantid::CurveFitting::Algorithms::SplineBackground::exec(), Mantid::CurveFitting::Algorithms::SplineInterpolation::exec(), Mantid::CurveFitting::Algorithms::VesuvioCalculateMS::exec(), Mantid::DataHandling::CreateChunkingFromInstrument::exec(), Mantid::DataHandling::DetermineChunking::exec(), Mantid::DataHandling::GroupDetectors2::exec(), Mantid::DataHandling::LoadCSNSNexus::exec(), Mantid::DataHandling::LoadDNSEvent::exec(), Mantid::DataHandling::LoadErrorEventsNexus::exec(), Mantid::DataHandling::LoadEventAsWorkspace2D::exec(), Mantid::DataHandling::LoadISISNexus2::exec(), Mantid::DataHandling::LoadMcStasNexus::exec(), Mantid::DataHandling::LoadNXSPE::exec(), Mantid::DataHandling::LoadPreNexusMonitors::exec(), Mantid::DataHandling::LoadRawSpectrum0::exec(), Mantid::DataHandling::LoadSPE::exec(), Mantid::DataHandling::LoadSpec::exec(), Mantid::DataHandling::LoadTBL::exec(), Mantid::DataHandling::LoadTOFRawNexus::exec(), Mantid::DataHandling::PDLoadCharacterizations::exec(), Mantid::DataHandling::RawFileInfo::exec(), Mantid::DataHandling::SNSAppendGeometryToNexus::exec(), Mantid::ICat::CatalogGetDataFiles::exec(), Mantid::ICat::CatalogGetDataSets::exec(), Mantid::ICat::CatalogMyDataSearch::exec(), Mantid::ICat::CatalogSearch::exec(), Mantid::MDAlgorithms::IntegrateEllipsoidsV1::exec(), Mantid::MDAlgorithms::QueryMDWorkspace::exec(), Mantid::WorkflowAlgorithms::AlignAndFocusPowder::exec(), Mantid::WorkflowAlgorithms::EQSANSMonitorTOF::exec(), Mantid::WorkflowAlgorithms::SANSSolidAngleCorrection::exec(), Mantid::Crystal::PredictSatellitePeaks::exec_peaks(), Mantid::CurveFitting::Algorithms::EstimateFitParameters::execConcrete(), Mantid::CurveFitting::Algorithms::ProfileChiSquared1D::execConcrete(), Mantid::DataHandling::GroupDetectors2::execEvent(), Mantid::Algorithms::SmoothNeighbours::execEvent(), Mantid::DataObjects::ReflectometryTransform::executeNormPoly(), Mantid::Algorithms::SmoothNeighbours::execWorkspace2D(), Mantid::Algorithms::WorkspaceJoiners::execWS2D(), export_WorkspaceFactory(), Mantid::CurveFitting::Functions::ProcessBackground::filterForBackground(), Mantid::Crystal::SCDCalibratePanels::findL1(), Mantid::Crystal::SCDCalibratePanels::findL2(), Mantid::Crystal::SCDCalibratePanels::findT0(), Mantid::DataHandling::GroupDetectors2::formGroupsEvent(), Mantid::Crystal::SCDCalibratePanels2::generateCalibrationTable(), Mantid::DataHandling::LoadPDFgetNFile::generateDataWorkspace(), Mantid::DataHandling::LoadEventPreNexus2::generateEventDistribtionWorkspace(), Mantid::CurveFitting::Algorithms::FitPowderDiffPeaks::genOutputFittedPatternWorkspace(), Mantid::CurveFitting::Algorithms::RefinePowderInstrumentParameters3::genOutputWorkspace(), Mantid::CurveFitting::Algorithms::RefinePowderInstrumentParameters::genPeakCentersWorkspace(), Mantid::CurveFitting::Algorithms::FitPowderDiffPeaks::genPeakParameterDataWorkspace(), Mantid::MDAlgorithms::QueryMDWorkspace::getBoxData(), Mantid::Crystal::SCDCalibratePanels2::getIdealQSampleAsHistogram1D(), Mantid::CurveFitting::Algorithms::PawleyFit::getLatticeFromFunction(), Mantid::CurveFitting::Algorithms::PawleyFit::getPeakParametersFromFunction(), Mantid::ICat::ICat4Catalog::getPublishInvestigations(), Mantid::CurveFitting::Algorithms::PlotPeakByLogValue::groupResParams(), Mantid::DataHandling::LoadILLDiffraction::initMovingWorkspace(), Mantid::DataHandling::LoadILLDiffraction::initStaticWorkspace(), Mantid::DataHandling::LoadILLPolarizedDiffraction::initStaticWorkspace(), Mantid::DataHandling::LoadILLIndirect2::initWorkSpace(), Mantid::DataHandling::LoadILLLagrange::initWorkspace(), Mantid::DataHandling::LoadILLTOF2::initWorkspace(), Mantid::DataHandling::LoadSINQFocus::initWorkSpace(), Mantid::DataHandling::LoadILLTOF3::initWorkspace(), Mantid::DataHandling::LoadMLZ::initWorkspace(), Mantid::MDAlgorithms::IntegratePeaksMD::integrate(), Mantid::MDAlgorithms::IntegratePeaksMD2::integrate(), Mantid::DataHandling::LoadCanSAS1D::loadEntry(), Mantid::DataHandling::LoadCanSAS1D2::loadEntry(), Mantid::DataHandling::LoadNexusProcessed::loadEventEntry(), Mantid::DataHandling::LoadSassena::loadFQ(), Mantid::DataHandling::LoadSassena::loadFQT(), Mantid::DataHandling::LoadGSS::loadGSASFile(), Mantid::DataHandling::LoadNexusProcessed::loadLeanElasticPeaksEntry(), Mantid::DataHandling::LoadNexusProcessed::loadNonEventEntry(), Mantid::DataHandling::LoadNexusProcessed::loadPeaksEntry(), Mantid::DataHandling::LoadSassena::loadQvectors(), Mantid::MDAlgorithms::ConvertSpiceDataToRealSpace::loadRunToMatrixWS(), Mantid::DataHandling::LoadNexusProcessed::loadTableEntry(), Mantid::MDAlgorithms::ConvertMDHistoToMatrixWorkspace::make1DWorkspace(), Mantid::MDAlgorithms::ConvertMDHistoToMatrixWorkspace::make2DWorkspace(), Mantid::DataHandling::LoadPSIMuonBin::makeDeadTimeTable(), Mantid::DataHandling::LoadSESANS::makeWorkspace(), Mantid::DataHandling::LoadFITS::makeWorkspace(), Mantid::CurveFitting::FuncMinimisers::FABADAMinimizer::outputChains(), Mantid::CurveFitting::FuncMinimisers::FABADAMinimizer::outputConvergedChains(), Mantid::CurveFitting::FuncMinimisers::FABADAMinimizer::outputCostFunctionTable(), Mantid::CurveFitting::FuncMinimisers::FABADAMinimizer::outputParameterTable(), Mantid::MDAlgorithms::IntegrateEllipsoidsV2::outputProfileWS(), MantidQt::CustomDialogs::CatalogPublishDialog::populateUserInvestigations(), MantidQt::MantidWidgets::FitPropertyBrowser::processMultiBGResults(), Mantid::DataHandling::LoadRKH::read1D(), Mantid::DataHandling::LoadRKH::read2DHeader(), Mantid::DataHandling::LoadAscii2::readData(), Mantid::DataHandling::LoadAscii::readData(), Mantid::Crystal::LoadIsawPeaks::readHeader(), Mantid::DataHandling::LoadMcStas::readHistogramData(), Mantid::MDAlgorithms::ConvertCWPDMDToSpectra::reducePowderData(), Mantid::CurveFitting::Functions::RemovePeaks::removePeaks(), Mantid::Algorithms::StripPeaks::removePeaks(), Mantid::DataHandling::LoadEmptyInstrument::runLoadIDFFromNexus(), Mantid::DataHandling::LoadEmptyInstrument::runLoadInstrument(), Mantid::DataHandling::GenerateGroupingPowder2::saveAsPAR(), Mantid::MDAlgorithms::LoadDNSSCD::saveHuber(), Mantid::Crystal::SCDCalibratePanels2::saveIsawDetCal(), Mantid::Crystal::SCDCalibratePanels::saveIsawDetCal(), Mantid::CurveFitting::Functions::ProcessBackground::selectFromGivenXValues(), Mantid::DataHandling::LoadPSIMuonBin::setDetectorGroupingTable(), Mantid::DataHandling::FindDetectorsPar::setOutputTable(), Mantid::Algorithms::CreateDetectorTable::setup(), Mantid::CurveFitting::Functions::ProcessBackground::setupDummyOutputWSes(), Mantid::Algorithms::SmoothNeighbours::setupNewInstrument(), Mantid::Algorithms::Qxy::setUpOutputWorkspace(), Mantid::CurveFitting::Algorithms::SplineSmoothing::setupOutputWorkspace(), Mantid::CurveFitting::Algorithms::SplineInterpolation::setupOutputWorkspace(), Mantid::Algorithms::RadiusSum::setUpOutputWorkspace(), Mantid::DataHandling::LoadDaveGrp::setupWorkspace(), Mantid::DataObjects::SpecialWorkspace2D::SpecialWorkspace2D(), Mantid::DataHandling::LoadNexusMonitors2::splitMutiPeriodHistrogramData(), Mantid::Algorithms::SmoothNeighbours::spreadPixels(), Mantid::API::Grouping::toTable(), Mantid::DataHandling::LoadSpiceXML2DDet::xmlCreateMatrixWorkspaceKnownGeometry(), and Mantid::DataHandling::LoadSpiceXML2DDet::xmlParseDetectorNode().

Member Data Documentation

◆ destroyed

template<typename T >
bool Mantid::Kernel::SingletonHolder< T >::destroyed = false
staticprivate

Definition at line 51 of file SingletonHolder.h.


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