Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::Geometry::AbstractSpaceGroupGenerator Class Referenceabstract

AbstractSpaceGroupGenerator is used by SpaceGroupFactory to delay (possibly costly) construction of space group prototype objects until they are actually requested. More...

#include <SpaceGroupFactory.h>

Inheritance diagram for Mantid::Geometry::AbstractSpaceGroupGenerator:
Mantid::Geometry::AlgorithmicSpaceGroupGenerator Mantid::Geometry::TabulatedSpaceGroupGenerator Mantid::Geometry::TransformationSpaceGroupGenerator

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AbstractSpaceGroupGenerator()

Mantid::Geometry::AbstractSpaceGroupGenerator::AbstractSpaceGroupGenerator ( size_t  number,
std::string  hmSymbol,
std::string  generatorInformation 
)

Constructor for AbstractSpaceGroupGenerator.

Definition at line 78 of file SpaceGroupFactory.cpp.

◆ ~AbstractSpaceGroupGenerator()

virtual Mantid::Geometry::AbstractSpaceGroupGenerator::~AbstractSpaceGroupGenerator ( )
virtualdefault

Member Function Documentation

◆ generateGroup()

virtual Group_const_sptr Mantid::Geometry::AbstractSpaceGroupGenerator::generateGroup ( ) const
protectedpure virtual

◆ generatePrototype()

SpaceGroup_const_sptr Mantid::Geometry::AbstractSpaceGroupGenerator::generatePrototype ( )
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.

Returns
SpaceGroup prototype object

Definition at line 104 of file SpaceGroupFactory.cpp.

References generateGroup(), m_hmSymbol, and m_number.

Referenced by getPrototype().

◆ getGeneratorString()

std::string Mantid::Geometry::AbstractSpaceGroupGenerator::getGeneratorString ( ) const
inline

◆ getHMSymbol()

std::string Mantid::Geometry::AbstractSpaceGroupGenerator::getHMSymbol ( ) const
inline

◆ getNumber()

size_t Mantid::Geometry::AbstractSpaceGroupGenerator::getNumber ( ) const
inline

Definition at line 44 of file SpaceGroupFactory.h.

◆ getPrototype()

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.

◆ hasValidPrototype()

bool Mantid::Geometry::AbstractSpaceGroupGenerator::hasValidPrototype ( ) const
inlineprivate

Definition at line 54 of file SpaceGroupFactory.h.

Referenced by getPrototype().

Member Data Documentation

◆ m_generatorString

std::string Mantid::Geometry::AbstractSpaceGroupGenerator::m_generatorString
private

Definition at line 59 of file SpaceGroupFactory.h.

◆ m_hmSymbol

std::string Mantid::Geometry::AbstractSpaceGroupGenerator::m_hmSymbol
private

Definition at line 58 of file SpaceGroupFactory.h.

Referenced by generatePrototype().

◆ m_number

size_t Mantid::Geometry::AbstractSpaceGroupGenerator::m_number
private

Definition at line 57 of file SpaceGroupFactory.h.

Referenced by generatePrototype().

◆ m_prototype

SpaceGroup_const_sptr Mantid::Geometry::AbstractSpaceGroupGenerator::m_prototype
private

Definition at line 61 of file SpaceGroupFactory.h.

Referenced by getPrototype().


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