Mantid
Loading...
Searching...
No Matches
SymmetryOperationFactory.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9#include <list>
10#include <map>
11
14#include "MantidGeometry/DllConfig.h"
17
18namespace Mantid {
19namespace Geometry {
41class MANTID_GEOMETRY_DLL SymmetryOperationFactoryImpl {
42public:
43 SymmetryOperation createSymOp(const std::string &identifier);
44 std::vector<SymmetryOperation> createSymOps(const std::string &identifiers);
45 std::vector<SymmetryOperation> createSymOps(const std::vector<std::string> &identifiers);
46
47 void subscribeSymOp(const std::string &identifier);
48 void unsubscribeSymOp(const std::string &identifier);
49
50 bool isSubscribed(const std::string &identifier) const;
51
52 std::vector<std::string> subscribedSymbols() const;
53
54protected:
55 void subscribe(const std::string &alias, const SymmetryOperation &prototype);
56
57 std::map<std::string, SymmetryOperation> m_prototypes;
58
59private:
61
63};
64
66
67} // namespace Geometry
68} // namespace Mantid
69
70namespace Mantid {
71namespace Kernel {
72EXTERN_MANTID_GEOMETRY template class MANTID_GEOMETRY_DLL
74}
75} // namespace Mantid
76
77#define DECLARE_SYMMETRY_OPERATION(operation, name) \
78 namespace { \
79 Mantid::Kernel::RegistrationHelper \
80 register_symop_##name(((Mantid::Geometry::SymmetryOperationFactory::Instance().subscribeSymOp(operation)), 0)); \
81 }
std::map< std::string, SymmetryOperation > m_prototypes
Crystallographic symmetry operations are composed of a rotational component, which is represented by ...
Manage the lifetime of a class intended to be a singleton.
Helper class which provides the Collimation Length for SANS instruments.
Policy class controlling creation of the singleton Implementation classes should mark their default c...