13#include <boost/regex.hpp>
21 auto mdUnit = unitFactoryChain->create(argument.
unitString);
53 auto productMDUnit = unitFactoryChain->create(argument.
unitString);
54 return new HKL(productMDUnit);
60 auto mdUnit = unitFactoryChain->create(argument.
unitString);
64 boost::regex pattern(
"in.*A.*\\^-1");
65 auto isHoraceStyle = boost::regex_match(mdUnit->getUnitLabel().ascii(), pattern);
66 const bool compatibleUnit = isInverseAngstrom || isRLU || isHoraceStyle;
76 auto mdUnit = unitFactoryChain->create(argument.
unitString);
88 first->setSuccessor(std::make_unique<QSampleFrameFactory>())
89 .setSuccessor(std::make_unique<HKLFrameFactory>())
92 .setSuccessor(std::make_unique<GeneralFrameFactory>())
93 .setSuccessor(std::make_unique<UnknownFrameFactory>());
GeneralFrame * createRaw(const MDFrameArgument &argument) const override
Create the product.
bool canInterpret(const MDFrameArgument &) const override
Indicate an ability to intepret the string.
GeneralFrame : Any MDFrame that isn't related to momemtum transfer.
HKL * createRaw(const MDFrameArgument &argument) const override
Create the product.
bool canInterpret(const MDFrameArgument &argument) const override
Indicate an ability to intepret the string.
static const std::string HKLName
Input argument type for MDFrameFactory chainable factory.
const std::string unitString
const std::string frameString
bool canInterpret(const MDFrameArgument &argument) const override
Indicate an ability to intepret the string.
QLab * createRaw(const MDFrameArgument &argument) const override
Create the product.
QLab : Q in the lab frame MDFrame.
static const std::string QLabName
QSample * createRaw(const MDFrameArgument &argument) const override
Create the product.
bool canInterpret(const MDFrameArgument &argument) const override
Indicate an ability to intepret the string.
QSample : Q in the sample frame.
static const std::string QSampleName
UnknownFrame * createRaw(const MDFrameArgument &argument) const override
Create the product.
bool canInterpret(const MDFrameArgument &argument) const override
Indicate an ability to intepret the string.
UnknownFrame : Unknown MDFrame.
static const std::string UnknownFrameName
static const UnitLabel InverseAngstrom
InverseAngstrom.
static const UnitLabel RLU
Reciprocal lattice units.
std::unique_ptr< MDFrameFactory > MDFrameFactory_uptr
Helper typedef.
MDFrameFactory_uptr MANTID_GEOMETRY_DLL makeMDFrameFactoryChain()
Make a complete factory chain.
MDUnitFactory_uptr MANTID_KERNEL_DLL makeMDUnitFactoryChain()
Convience method. Pre-constructed builder chain.
std::unique_ptr< MDUnit > MDUnit_uptr