Mantid
Loading...
Searching...
No Matches
FuncMinimizerFactory.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2010 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#include "MantidAPI/DllConfig.h"
15#include <vector>
16
17namespace Mantid {
18namespace API {
19
20//----------------------------------------------------------------------
21// More forward declarations
22//----------------------------------------------------------------------
23class IFuncMinimizer;
24
36class MANTID_API_DLL FuncMinimizerFactoryImpl : public Kernel::DynamicFactory<IFuncMinimizer> {
37public:
39 std::shared_ptr<IFuncMinimizer> createMinimizer(const std::string &str) const;
40
41private:
45};
46
48
49} // namespace API
50} // namespace Mantid
51
52namespace Mantid {
53namespace Kernel {
54EXTERN_MANTID_API template class MANTID_API_DLL Mantid::Kernel::SingletonHolder<Mantid::API::FuncMinimizerFactoryImpl>;
55}
56} // namespace Mantid
57
62#define DECLARE_FUNCMINIMIZER(classname, username) \
63 namespace { \
64 Mantid::Kernel::RegistrationHelper register_funcminimizer_##classname( \
65 ((Mantid::API::FuncMinimizerFactory::Instance().subscribe<classname>(#username)), 0)); \
66 }
The FuncMinimizerFactory class is in charge of the creation of concrete instances of minimizers.
The dynamic factory is a base dynamic factory for serving up objects in response to requests from oth...
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...