22template <
class Base,
typename... Args>
53template <
class C,
class Base,
typename... Args>
62 std::shared_ptr<Base>
createInstance(Args... args)
const override {
return std::make_shared<C>(args...); }
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
The base class for instantiators.
virtual ~AbstractInstantiator()=default
Destroys the AbstractInstantiator.
AbstractInstantiator()=default
Creates the AbstractInstantiator.
virtual Base * createUnwrappedInstance(Args... args) const =0
Creates an instance of a concrete subclass of Base, which is not wrapped in a shared_ptr.
AbstractInstantiator(const AbstractInstantiator &)
Private copy constructor.
virtual std::shared_ptr< Base > createInstance(Args... args) const =0
Creates an instance of a concrete subclass of Base.
AbstractInstantiator & operator=(const AbstractInstantiator &)
Private assignment operator.
The instantiator is a generic class for creating objects of the template type.
Instantiator()=default
Creates the Instantiator.
std::shared_ptr< Base > createInstance(Args... args) const override
Creates an instance of a concrete subclass of Base.
Base * createUnwrappedInstance(Args... args) const override
Creates an instance of a concrete subclass of Base that is not wrapped in a shared_ptr.
Helper class which provides the Collimation Length for SANS instruments.