Mantid
Loading...
Searching...
No Matches
ITransformScale.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2009 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//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#ifndef Q_MOC_RUN
13#include <memory>
14#endif
15
16#include <string>
17#include <vector>
18
19#include "MantidAPI/DllConfig.h"
20
21namespace Mantid {
22namespace API {
23/*Base class representing a scaling transformation acting on a one-dimensional
24 grid domain
25
26 @author Jose Borreguero
27 @date Aug/28/2012
28*/
29
30class MANTID_API_DLL ITransformScale {
31public:
32 ITransformScale() = default;
34 virtual ~ITransformScale() = default;
35 virtual const std::string name() const { return "ITransformScale"; }
37 virtual void transform(std::vector<double> &gd) = 0;
38}; // class ITransformScale
39
41using ITransformScale_sptr = std::shared_ptr<ITransformScale>;
42
43} // namespace API
44} // namespace Mantid
45
46#define DECLARE_TRANSFORMSCALE(classname) \
47 namespace { \
48 Mantid::Kernel::RegistrationHelper register_trs_##classname( \
49 ((Mantid::API::TransformScaleFactory::Instance().subscribe<classname>(#classname)), 0)); \
50 }
virtual ~ITransformScale()=default
Virtual destructor needed for an abstract class.
virtual void transform(std::vector< double > &gd)=0
The scaling transformation. Define in derived classes.
virtual const std::string name() const
std::shared_ptr< ITransformScale > ITransformScale_sptr
typedef for a shared pointer
Helper class which provides the Collimation Length for SANS instruments.