12#include <boost/algorithm/string.hpp>
28 std::vector<std::string> symOpStrings;
29 boost::split(symOpStrings, identifiers, boost::is_any_of(
";"));
37 std::vector<SymmetryOperation> symOps;
38 symOps.reserve(identifiers.size());
39 std::transform(identifiers.cbegin(), identifiers.cend(), std::back_inserter(symOps),
40 [
this](
const auto &identifier) { return createSymOp(boost::trim_copy(identifier)); });
65 std::vector<std::string> symbols;
68 [](
const auto &prototype) { return prototype.first; });
void unsubscribeSymOp(const std::string &identifier)
Unsubscribes a symmetry operation from the factory.
bool isSubscribed(const std::string &identifier) const
Returns true if identifier already has a prototype in the factory.
std::map< std::string, SymmetryOperation > m_prototypes
SymmetryOperationFactoryImpl()
Private default constructor.
std::vector< std::string > subscribedSymbols() const
Returns all symbols in the factory.
void subscribeSymOp(const std::string &identifier)
Subscribes a symmetry operation into the factory.
void subscribe(const std::string &alias, const SymmetryOperation &prototype)
Subscribes symmetry operation into factory, using the supplied alias as key.
SymmetryOperation createSymOp(const std::string &identifier)
Creates a SymmetryOperation object from its identifier.
std::vector< SymmetryOperation > createSymOps(const std::string &identifiers)
Creates all symmetry operations in string (separated by semicolon).
Crystallographic symmetry operations are composed of a rotational component, which is represented by ...
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...