Mantid
|
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 | |
PeakTransformSelector & | operator= (const PeakTransformSelector &) |
Disabled assigment operator. More... | |
PeakTransformSelector (const PeakTransformSelector &) | |
Disabled copy constructor. More... | |
Private Attributes | |
Factories | m_candidateFactories |
Used to choose an appropriate PeakTransformFactory.
Definition at line 18 of file PeakTransformSelector.h.
|
private |
Collection of candidate factories.
Definition at line 39 of file PeakTransformSelector.h.
|
default |
Constructor.
|
private |
Disabled copy constructor.
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.
labelX | X-label to use in determining selection. |
labelY | Y-label to use in determining selection. |
Definition at line 98 of file PeakTransformSelector.cpp.
References hasFactoryForTransform(), and makeChoice().
Referenced by hasFactoryForTransform().
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.
labelX | X-label to use in determining selection. |
labelY | Y-label to use in determining selection. |
Definition at line 59 of file PeakTransformSelector.cpp.
References m_candidateFactories, and numberRegistered().
Referenced by hasFactoryForTransform().
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.
Definition at line 32 of file PeakTransformSelector.cpp.
References m_candidateFactories, and numberRegistered().
size_t Mantid::Geometry::PeakTransformSelector::numberRegistered | ( | ) | const |
Get the number of registered factories.
Definition at line 25 of file PeakTransformSelector.cpp.
References m_candidateFactories.
Referenced by makeChoice(), and makeDefaultChoice().
|
private |
Disabled assigment operator.
void Mantid::Geometry::PeakTransformSelector::registerCandidate | ( | const PeakTransformFactory_sptr & | candidate | ) |
Register a candidate factory.
Register a peak transform factory as a candidate.
candidate | : candidate peak transform factory |
Definition at line 18 of file PeakTransformSelector.cpp.
References m_candidateFactories.
|
private |
Definition at line 40 of file PeakTransformSelector.h.
Referenced by makeChoice(), makeDefaultChoice(), numberRegistered(), and registerCandidate().