Mantid
Loading...
Searching...
No Matches
BraggScattererFactory.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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 +
9
10namespace Mantid::Geometry {
11
28 const std::string &properties) const {
29 BraggScatterer_sptr scatterer = create(name);
30 scatterer->initialize();
31
32 if (!properties.empty()) {
33 scatterer->setProperties(properties);
34 }
35
36 return scatterer;
37}
38
41
42} // namespace Mantid::Geometry
BraggScatterer_sptr createScatterer(const std::string &name, const std::string &properties="") const
Creates an initialized instance of the desired scatterer class.
virtual std::shared_ptr< BraggScatterer > create(const std::string &className) const
Creates a new instance of the class with the given name.
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
std::shared_ptr< BraggScatterer > BraggScatterer_sptr