11#include "MantidGeometry/DllConfig.h"
17#include <unordered_set>
123 const V3R &rotationAxis)
const;
200 if (isSubscribed(generatorClassName)) {
201 throw std::runtime_error(
"A generator with name '" + generatorClassName +
"' is already registered.");
204 subscribe(generator, generatorClassName);
208 bool isSubscribed(
const std::string &generatorClassName)
const;
230EXTERN_MANTID_GEOMETRY
template class MANTID_GEOMETRY_DLL
235#define DECLARE_SYMMETRY_ELEMENT_GENERATOR(classname) \
237 Mantid::Kernel::RegistrationHelper register_symmetry_element_generator_##classname(( \
238 (Mantid::Geometry::SymmetryElementFactory::Instance().subscribeSymmetryElementGenerator<classname>(#classname)), \
SymmetryElementFactoryImpl does not generate SymmetryElement objects directly.
virtual SymmetryElement_sptr generateElement(const SymmetryOperation &operation) const =0
Must generate a valid SymmetryElement from the given operation.
virtual ~AbstractSymmetryElementGenerator()=default
virtual bool canProcess(const SymmetryOperation &operation) const =0
Should return true if the generator can produce a valid SymmetryElement from the provided SymmetryOpe...
This factory takes a SymmetryOperation and generates the corresponding SymmetryElement.
std::unordered_set< std::string > m_generatorNames
std::map< std::string, SymmetryElement_sptr > m_prototypes
std::vector< AbstractSymmetryElementGenerator_sptr > m_generators
virtual ~SymmetryElementFactoryImpl()=default
void subscribeSymmetryElementGenerator(const std::string &generatorClassName)
Subscribes the generator of type T with its class name into the factory, throws std::runtime_error if...
This implementation of AbstractSymmetryElementGenerator produces only identity elements.
This implementation of AbstractSymmetryElementGenerator produces only inversion elements.
SymmetryElementMirrorGenerator also inherits from SymmetryElementWithAxisGenerator.
static std::map< V3R, std::string > g_glideSymbolMap
SymmetryElementRotationGenerator inherits from SymmetryElementWithAxisGenerator, using its methods fo...
This implementation of AbstractSymmetryElementGenerator produces only translation elements.
SymmetryElementWithAxisGenerator does not create any elements directly, it serves as a base for Symme...
virtual std::string determineSymbol(const SymmetryOperation &operation) const =0
Crystallographic symmetry operations are composed of a rotational component, which is represented by ...
Manage the lifetime of a class intended to be a singleton.
MANTID_GEOMETRY_DLL gsl_matrix * getGSLIdentityMatrix(size_t rows, size_t cols)
Returns a GSL-indentity matrix.
std::shared_ptr< AbstractSymmetryElementGenerator > AbstractSymmetryElementGenerator_sptr
MANTID_GEOMETRY_DLL gsl_matrix * getGSLMatrix(const Kernel::IntMatrix &matrix)
Returns a GSL-matrix for the given IntMatrix.
std::shared_ptr< SymmetryElement > SymmetryElement_sptr
Helper class which provides the Collimation Length for SANS instruments.
Policy class controlling creation of the singleton Implementation classes should mark their default c...