Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Mantid::Geometry::PeakTransformSelector Class Reference

Used to choose an appropriate PeakTransformFactory. More...

#include <PeakTransformSelector.h>

Public Member Functions

bool hasFactoryForTransform (const std::string &labelX, const std::string &labelY) const
 Has a factory capable of the requested transform. More...
 
PeakTransformFactory_sptr makeChoice (const std::string &labelX, const std::string &labelY) const
 Make choice. More...
 
PeakTransformFactory_sptr makeDefaultChoice () const
 Make default choice. More...
 
size_t numberRegistered () const
 Get the number of registered factories. More...
 
 PeakTransformSelector ()
 Constructor. More...
 
void registerCandidate (const PeakTransformFactory_sptr &candidate)
 Register a candidate factory. More...
 

Private Types

using Factories = std::set< PeakTransformFactory_sptr >
 Collection of candidate factories. More...
 

Private Member Functions

PeakTransformSelectoroperator= (const PeakTransformSelector &)
 Disabled assigment operator. More...
 
 PeakTransformSelector (const PeakTransformSelector &)
 Disabled copy constructor. More...
 

Private Attributes

Factories m_candidateFactories
 

Detailed Description

Used to choose an appropriate PeakTransformFactory.

Definition at line 18 of file PeakTransformSelector.h.

Member Typedef Documentation

◆ Factories

Collection of candidate factories.

Definition at line 39 of file PeakTransformSelector.h.

Constructor & Destructor Documentation

◆ PeakTransformSelector() [1/2]

Mantid::Geometry::PeakTransformSelector::PeakTransformSelector ( )
default

Constructor.

◆ PeakTransformSelector() [2/2]

Mantid::Geometry::PeakTransformSelector::PeakTransformSelector ( const PeakTransformSelector )
private

Disabled copy constructor.

Member Function Documentation

◆ hasFactoryForTransform()

bool Mantid::Geometry::PeakTransformSelector::hasFactoryForTransform ( const std::string &  labelX,
const std::string &  labelY 
) const

Has a factory capable of the requested transform.

Can any of the registered peak transform factories peform the requested transformation.

Parameters
labelXX-label to use in determining selection.
labelYY-label to use in determining selection.
Returns
TRUE only if such a factory is available.

Definition at line 98 of file PeakTransformSelector.cpp.

References hasFactoryForTransform(), and makeChoice().

Referenced by hasFactoryForTransform().

◆ makeChoice()

PeakTransformFactory_sptr Mantid::Geometry::PeakTransformSelector::makeChoice ( const std::string &  labelX,
const std::string &  labelY 
) const

Make choice.

Make a choice for the peak transform factory.

Parameters
labelXX-label to use in determining selection.
labelYY-label to use in determining selection.
Returns
selected factory

Definition at line 59 of file PeakTransformSelector.cpp.

References m_candidateFactories, and numberRegistered().

Referenced by hasFactoryForTransform().

◆ makeDefaultChoice()

PeakTransformFactory_sptr Mantid::Geometry::PeakTransformSelector::makeDefaultChoice ( ) const

Make default choice.

Make a choice for the peak transform factory, but use the default labels known to each factory.

Returns
selected factory

Definition at line 32 of file PeakTransformSelector.cpp.

References m_candidateFactories, and numberRegistered().

◆ numberRegistered()

size_t Mantid::Geometry::PeakTransformSelector::numberRegistered ( ) const

Get the number of registered factories.

Returns
the number of registered candidates.

Definition at line 25 of file PeakTransformSelector.cpp.

References m_candidateFactories.

Referenced by makeChoice(), and makeDefaultChoice().

◆ operator=()

PeakTransformSelector & Mantid::Geometry::PeakTransformSelector::operator= ( const PeakTransformSelector )
private

Disabled assigment operator.

◆ registerCandidate()

void Mantid::Geometry::PeakTransformSelector::registerCandidate ( const PeakTransformFactory_sptr candidate)

Register a candidate factory.

Register a peak transform factory as a candidate.

Parameters
candidate: candidate peak transform factory

Definition at line 18 of file PeakTransformSelector.cpp.

References m_candidateFactories.

Member Data Documentation

◆ m_candidateFactories

Factories Mantid::Geometry::PeakTransformSelector::m_candidateFactories
private

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