22 container.emplace_back(std::make_shared<R>());
35 if (conditions.empty()) {
46std::vector<std::string>
50 std::vector<std::string> names;
51 names.reserve(conditions.size());
52 std::transform(conditions.cbegin(), conditions.cend(), std::back_inserter(names), fn);
82 const std::string &hint) {
85 auto it = std::find_if(conditions.cbegin(), conditions.cend(), fn);
87 if (it == conditions.cend()) {
88 throw std::invalid_argument(
"No ReflectionCondition found that matches '" + hint +
"'.");
A-face centred ReflectionCondition.
All-face centred ReflectionCondition.
B-face centred ReflectionCondition.
Body centred ReflectionCondition.
C-face centred ReflectionCondition.
Hexagonally centred, reverse ReflectionCondition.
Primitive ReflectionCondition.
Rhombohedrally centred, obverse ReflectionCondition.
Rhombohedrally centred, reverse ReflectionCondition.
std::shared_ptr< ReflectionCondition > ReflectionCondition_sptr
Shared pointer to a ReflectionCondition.
MANTID_GEOMETRY_DLL ReflectionCondition_sptr getReflectionConditionBySymbol(const std::string &symbol)
Returns the ReflectionCondition for the specified centering symbol, see getAllReflectionConditionSymb...
std::vector< ReflectionCondition_sptr > ReflectionConditions
A collection of reflections.
ReflectionCondition_sptr getReflectionConditionWhere(const std::function< bool(const ReflectionCondition_sptr &)> &fn, const std::string &hint)
Returns a reflection condition according to a filter function.
std::vector< std::string > transformReflectionConditions(const std::function< std::string(const ReflectionCondition_sptr &)> &fn)
Helper function that transforms all ReflectionConditions to strings.
MANTID_GEOMETRY_DLL const ReflectionConditions & getAllReflectionConditions()
MANTID_GEOMETRY_DLL ReflectionCondition_sptr getReflectionConditionByName(const std::string &name)
Returns the requested ReflectionCondition, see getAllReflectionConditionNames for possible names.
MANTID_GEOMETRY_DLL std::vector< std::string > getAllReflectionConditionSymbols()
Returns all centering symbols.
MANTID_GEOMETRY_DLL std::vector< std::string > getAllReflectionConditionNames()
Returns all ReflectionCondition names.
static void run(ReflectionConditions &container)
static void run(ReflectionConditions &)