Mantid
Loading...
Searching...
No Matches
MDFrameFactory.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2015 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 "MantidGeometry/DllConfig.h"
17#include <memory>
18
19namespace Mantid {
20namespace Geometry {
21
23class MANTID_GEOMETRY_DLL MDFrameArgument {
24public:
25 const std::string unitString;
26 const std::string frameString;
27 MDFrameArgument(const std::string &_frameString, const std::string &_unitString)
28 : unitString(_unitString), frameString(_frameString) {}
29 MDFrameArgument(const std::string &_frameString) : unitString(""), frameString(_frameString) {}
30};
31
34class MANTID_GEOMETRY_DLL MDFrameFactory : public Kernel::ChainableFactory<MDFrameFactory, MDFrame, MDFrameArgument> {};
35
37using MDFrameFactory_uptr = std::unique_ptr<MDFrameFactory>;
38
39//-----------------------------------------------------------------------
40// Derived MDFrameFactory declarations
41//-----------------------------------------------------------------------
42
44class MANTID_GEOMETRY_DLL GeneralFrameFactory : public MDFrameFactory {
45private:
46 GeneralFrame *createRaw(const MDFrameArgument &argument) const override;
47
48public:
49 bool canInterpret(const MDFrameArgument &) const override;
50};
51
53class MANTID_GEOMETRY_DLL QLabFrameFactory : public MDFrameFactory {
54private:
55 QLab *createRaw(const MDFrameArgument &argument) const override;
56
57public:
58 bool canInterpret(const MDFrameArgument &argument) const override;
59};
60
62class MANTID_GEOMETRY_DLL QSampleFrameFactory : public MDFrameFactory {
63private:
64 QSample *createRaw(const MDFrameArgument &argument) const override;
65
66public:
67 bool canInterpret(const MDFrameArgument &argument) const override;
68};
69
71class MANTID_GEOMETRY_DLL HKLFrameFactory : public MDFrameFactory {
72private:
73 HKL *createRaw(const MDFrameArgument &argument) const override;
74
75public:
76 bool canInterpret(const MDFrameArgument &argument) const override;
77};
78
80class MANTID_GEOMETRY_DLL UnknownFrameFactory : public MDFrameFactory {
81private:
82 UnknownFrame *createRaw(const MDFrameArgument &argument) const override;
83
84public:
85 bool canInterpret(const MDFrameArgument &argument) const override;
86};
87
90
91} // namespace Geometry
92} // namespace Mantid
GeneralFrameFactory derived MDFrameFactory type.
GeneralFrame : Any MDFrame that isn't related to momemtum transfer.
Definition: GeneralFrame.h:21
HKLFrame derived MDFrameFactory type.
HKL : HKL MDFrame.
Definition: HKL.h:21
Input argument type for MDFrameFactory chainable factory.
MDFrameArgument(const std::string &_frameString, const std::string &_unitString)
MDFrameArgument(const std::string &_frameString)
MDFrameFactory.h : Chain of repsonsibility factory for the MDFrameFactory.
QLabFrameFactory derived MDFrameFactory type.
QLab : Q in the lab frame MDFrame.
Definition: QLab.h:21
QSampleFrameFactory derived MDFrameFactory type.
QSample : Q in the sample frame.
Definition: QSample.h:21
Unknown Frame derived MDFrameFactory type.
UnknownFrame : Unknown MDFrame.
Definition: UnknownFrame.h:21
ChainableFactory : Chain of Responsiblity generic factory.
std::unique_ptr< MDFrameFactory > MDFrameFactory_uptr
Helper typedef.
MDFrameFactory_uptr MANTID_GEOMETRY_DLL makeMDFrameFactoryChain()
Make a complete factory chain.
Helper class which provides the Collimation Length for SANS instruments.