Mantid
Loading...
Searching...
No Matches
PeakShapeFactory.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 "MantidDataObjects/DllConfig.h"
10#include <memory>
11#include <string>
12
13namespace Mantid {
14namespace Geometry {
15// Forward declaration
16class PeakShape;
17} // namespace Geometry
18namespace DataObjects {
19
22class MANTID_DATAOBJECTS_DLL PeakShapeFactory {
23public:
25 virtual ~PeakShapeFactory() = default;
27 virtual Mantid::Geometry::PeakShape *create(const std::string &source) const = 0;
30 virtual void setSuccessor(std::shared_ptr<const PeakShapeFactory> successorFactory) = 0;
31};
32
34using PeakShapeFactory_sptr = std::shared_ptr<PeakShapeFactory>;
36using PeakShapeFactory_const_sptr = std::shared_ptr<const PeakShapeFactory>;
37
38} // namespace DataObjects
39} // namespace Mantid
PeakShapeFactory : Factory for creating peak shapes.
virtual Mantid::Geometry::PeakShape * create(const std::string &source) const =0
Make the product.
virtual ~PeakShapeFactory()=default
Destructor.
virtual void setSuccessor(std::shared_ptr< const PeakShapeFactory > successorFactory)=0
Set the successor factory.
PeakShape : Abstract type to describes the shape of a peak.
Definition: PeakShape.h:20
std::shared_ptr< const PeakShapeFactory > PeakShapeFactory_const_sptr
Helper typedef.
std::shared_ptr< PeakShapeFactory > PeakShapeFactory_sptr
Helper typedef.
Helper class which provides the Collimation Length for SANS instruments.