10#include <boost/python/class.hpp>
11#include <boost/python/list.hpp>
18 std::vector<SymmetryOperation> symOps = self.
createSymOps(identifiers);
20 boost::python::list pythonOperations;
21 for (
auto &symOp : symOps) {
22 pythonOperations.append(symOp);
25 return pythonOperations;
30 class_<SymmetryOperationFactoryImpl, boost::noncopyable>(
"SymmetryOperationFactoryImpl", no_init)
32 "Returns true if the symmetry operation is supplied.")
34 "Creates the symmetry operation from the supplied x,y,z-identifier.")
35 .def(
"createSymOps", &createSymOps, (arg(
"self"), arg(
"identifier")),
36 "Creates a vector of SymmetryOperation objects from a semi-colon "
37 "separated list of x,y,z-identifiers.")
39 "Return all subscribed symbols.")
41 "Returns a reference to the SymmetryOperationFactory singleton")
42 .staticmethod(
"Instance");
void export_SymmetryOperationFactory()
A factory for symmetry operations.
bool isSubscribed(const std::string &identifier) const
Returns true if identifier already has a prototype in the factory.
std::vector< std::string > subscribedSymbols() const
Returns all symbols in the factory.
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).
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...