Mantid
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Mantid::Kernel::Instantiator< C, Base, Args > Class Template Reference

The instantiator is a generic class for creating objects of the template type. More...

#include <Kernel/Instantiator.h>

Inheritance diagram for Mantid::Kernel::Instantiator< C, Base, Args >:
Mantid::Kernel::AbstractInstantiator< Base, Args... >

Public Member Functions

std::shared_ptr< Base > createInstance (Args... args) const override
 Creates an instance of a concrete subclass of Base. More...
 
Base * createUnwrappedInstance (Args... args) const override
 Creates an instance of a concrete subclass of Base that is not wrapped in a shared_ptr. More...
 
 Instantiator ()=default
 Creates the Instantiator. More...
 
- Public Member Functions inherited from Mantid::Kernel::AbstractInstantiator< Base, Args... >
 AbstractInstantiator ()=default
 Creates the AbstractInstantiator. More...
 
virtual std::shared_ptr< Base > createInstance (Args... args) const=0
 Creates an instance of a concrete subclass of Base. More...
 
virtual Base * createUnwrappedInstance (Args... args) const=0
 Creates an instance of a concrete subclass of Base, which is not wrapped in a shared_ptr. More...
 
virtual ~AbstractInstantiator ()=default
 Destroys the AbstractInstantiator. More...
 

Detailed Description

template<class C, class Base, typename... Args>
class Mantid::Kernel::Instantiator< C, Base, Args >

The instantiator is a generic class for creating objects of the template type.

It is used by DynamicFactory.

Author
Nick Draper, Tessella Support Services plc
Date
10/10/2007

Definition at line 54 of file Instantiator.h.

Constructor & Destructor Documentation

◆ Instantiator()

template<class C , class Base , typename... Args>
Mantid::Kernel::Instantiator< C, Base, Args >::Instantiator ( )
default

Creates the Instantiator.

Member Function Documentation

◆ createInstance()

template<class C , class Base , typename... Args>
std::shared_ptr< Base > Mantid::Kernel::Instantiator< C, Base, Args >::createInstance ( Args...  args) const
inlineoverridevirtual

Creates an instance of a concrete subclass of Base.

Returns
A pointer to the base type

Implements Mantid::Kernel::AbstractInstantiator< Base, Args... >.

Definition at line 62 of file Instantiator.h.

◆ createUnwrappedInstance()

template<class C , class Base , typename... Args>
Base * Mantid::Kernel::Instantiator< C, Base, Args >::createUnwrappedInstance ( Args...  args) const
inlineoverridevirtual

Creates an instance of a concrete subclass of Base that is not wrapped in a shared_ptr.

Returns
A bare pointer to the base type

Implements Mantid::Kernel::AbstractInstantiator< Base, Args... >.

Definition at line 68 of file Instantiator.h.


The documentation for this class was generated from the following files: