Mantid
|
AbstractSpaceGroupGenerator is used by SpaceGroupFactory to delay (possibly costly) construction of space group prototype objects until they are actually requested. More...
#include <SpaceGroupFactory.h>
Public Member Functions | |
AbstractSpaceGroupGenerator (size_t number, std::string hmSymbol, std::string generatorInformation) | |
Constructor for AbstractSpaceGroupGenerator. More... | |
std::string | getGeneratorString () const |
std::string | getHMSymbol () const |
size_t | getNumber () const |
SpaceGroup_const_sptr | getPrototype () |
Returns the internally stored prototype, generates one if necessary. More... | |
virtual | ~AbstractSpaceGroupGenerator ()=default |
Protected Member Functions | |
virtual Group_const_sptr | generateGroup () const =0 |
Private Member Functions | |
SpaceGroup_const_sptr | generatePrototype () |
Generates a prototype space group object. More... | |
bool | hasValidPrototype () const |
Private Attributes | |
std::string | m_generatorString |
std::string | m_hmSymbol |
size_t | m_number |
SpaceGroup_const_sptr | m_prototype |
AbstractSpaceGroupGenerator is used by SpaceGroupFactory to delay (possibly costly) construction of space group prototype objects until they are actually requested.
Instead of constructing a prototype of a space group on registration, SpaceGroupFactory constructs an AbstractSpaceGroupGenerator and stores that. Once a space group is requested, a prototype is constructed - but only the first time.
The Group that contains the symmetry operations for a certain space group can be generated in different ways, so generateGroup is pure virtual and leaves the door open for new algorithms that may be more efficient or have other favorable properties.
Definition at line 39 of file SpaceGroupFactory.h.
Mantid::Geometry::AbstractSpaceGroupGenerator::AbstractSpaceGroupGenerator | ( | size_t | number, |
std::string | hmSymbol, | ||
std::string | generatorInformation | ||
) |
Constructor for AbstractSpaceGroupGenerator.
Definition at line 78 of file SpaceGroupFactory.cpp.
|
virtualdefault |
|
protectedpure virtual |
|
private |
Generates a prototype space group object.
Constructs a space group object using a Group generated by the pure virtual generateGroup()-method along with the stored number and Hermann-Mauguin-symbol.
generateGroup() has to be implemented by sub-classes and should probably use the generatorInformation supplied to the constructor.
Definition at line 104 of file SpaceGroupFactory.cpp.
References generateGroup(), m_hmSymbol, and m_number.
Referenced by getPrototype().
|
inline |
Definition at line 46 of file SpaceGroupFactory.h.
Referenced by Mantid::Geometry::AlgorithmicSpaceGroupGenerator::generateGroup(), and Mantid::Geometry::TabulatedSpaceGroupGenerator::generateGroup().
|
inline |
Definition at line 45 of file SpaceGroupFactory.h.
Referenced by Mantid::Geometry::AlgorithmicSpaceGroupGenerator::getCenteringSymbol().
|
inline |
Definition at line 44 of file SpaceGroupFactory.h.
SpaceGroup_const_sptr Mantid::Geometry::AbstractSpaceGroupGenerator::getPrototype | ( | ) |
Returns the internally stored prototype, generates one if necessary.
Definition at line 84 of file SpaceGroupFactory.cpp.
References generatePrototype(), hasValidPrototype(), and m_prototype.
|
inlineprivate |
Definition at line 54 of file SpaceGroupFactory.h.
Referenced by getPrototype().
|
private |
Definition at line 59 of file SpaceGroupFactory.h.
|
private |
Definition at line 58 of file SpaceGroupFactory.h.
Referenced by generatePrototype().
|
private |
Definition at line 57 of file SpaceGroupFactory.h.
Referenced by generatePrototype().
|
private |
Definition at line 61 of file SpaceGroupFactory.h.
Referenced by getPrototype().