10#include <boost/regex.hpp>
27 boost::regex pattern(
"(Angstrom\\^-1)");
28 boost::regex pattern2(
"A\\^-1");
31 auto isFullAngstrom = boost::regex_search(unitString, match, pattern);
32 auto isPartialAngstrom = boost::regex_search(unitString, match, pattern2);
34 return isFullAngstrom || isPartialAngstrom;
46 boost::regex pattern(
"in.*A.*\\^-1");
47 auto isHoraceStyle = boost::regex_match(unitString, pattern);
48 return isRLU || isHoraceStyle;
54 ->setSuccessor(std::make_unique<InverseAngstromsUnitFactory>())
58 .setSuccessor(std::make_unique<LabelUnitFactory>());
bool canInterpret(const std::string &unitString) const override
Indicate an ability to intepret the string.
InverseAngstromsUnit * createRaw(const std::string &unitString) const override
Create the product.
LabelUnit * createRaw(const std::string &unitString) const override
Create the product.
bool canInterpret(const std::string &unitString) const override
Indicate an ability to intepret the string.
bool canInterpret(const std::string &unitString) const override
Indicate an ability to intepret the string.
ReciprocalLatticeUnit * createRaw(const std::string &unitString) const override
Create the product.
A base-class for the a class that is able to return unit labels in different representations.
const AsciiString & ascii() const
Return an ascii label for unit.
static const UnitLabel RLU
Reciprocal lattice units.
std::unique_ptr< MDUnitFactory > MDUnitFactory_uptr
MDUnitFactory_uptr MANTID_KERNEL_DLL makeMDUnitFactoryChain()
Convience method. Pre-constructed builder chain.