Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Friends | List of all members
Mantid::Kernel::UnitFactoryImpl Class Referencefinal

Creates instances of concrete units. More...

#include <UnitFactory.h>

Inheritance diagram for Mantid::Kernel::UnitFactoryImpl:
Mantid::Kernel::DynamicFactory< Unit >

Public Member Functions

const std::vector< std::string > getConvertibleUnits () const
 Returns the names of the convertible units in the factory. More...
 
UnitFactoryImploperator= (const UnitFactoryImpl &)=delete
 
 UnitFactoryImpl (const UnitFactoryImpl &)=delete
 
- Public Member Functions inherited from Mantid::Kernel::DynamicFactory< Unit >
virtual std::shared_ptr< Unitcreate (const std::string &className) const
 Creates a new instance of the class with the given name. More...
 
virtual UnitcreateUnwrapped (const std::string &className) const
 Creates a new instance of the class with the given name, which is not wrapped in a boost shared_ptr. More...
 
void disableNotifications ()
 Disable notifications. More...
 
 DynamicFactory (const DynamicFactory &)=delete
 
void enableNotifications ()
 Enable notifications. More...
 
bool exists (const std::string &className) const
 Returns true if the given class is currently registered. More...
 
virtual const std::vector< std::string > getKeys () const
 Returns the keys in the map. More...
 
DynamicFactoryoperator= (const DynamicFactory &)=delete
 
void subscribe (const std::string &className)
 Registers the instantiator for the given class with the DynamicFactory. More...
 
void subscribe (const std::string &className, std::unique_ptr< AbstractFactory > pAbstractFactory, SubscribeAction replace=ErrorIfExists)
 Registers the instantiator for the given class with the DynamicFactory. More...
 
void unsubscribe (const std::string &className)
 Unregisters the given class and deletes the instantiator for the class. More...
 
virtual ~DynamicFactory ()=default
 Destroys the DynamicFactory and deletes the instantiators for all registered classes. More...
 

Private Member Functions

 UnitFactoryImpl ()=default
 Private Constructor for singleton class. More...
 
 ~UnitFactoryImpl () override=default
 Private Destructor. More...
 

Friends

struct CreateUsingNew< UnitFactoryImpl >
 

Additional Inherited Members

- Public Types inherited from Mantid::Kernel::DynamicFactory< Unit >
using AbstractFactory = AbstractInstantiator< Unit >
 A typedef for the instantiator. More...
 
enum  NotificationStatus
 Defines the whether notifications are dispatched. More...
 
enum  SubscribeAction
 Defines replacement behaviour. More...
 
- Public Attributes inherited from Mantid::Kernel::DynamicFactory< Unit >
Poco::NotificationCenter notificationCenter
 Sends notifications to observers. More...
 
- Protected Member Functions inherited from Mantid::Kernel::DynamicFactory< Unit >
 DynamicFactory ()
 Protected constructor for base class. More...
 

Detailed Description

Creates instances of concrete units.

The factory is a singleton that hands out shared pointers to the base Unit class. It overrides the base class DynamicFactory::create method so that only a single instance of a given unit is ever created, and a pointer to that same instance is passed out each time the unit is requested.

Author
Russell Taylor, Tessella Support Services plc
Date
13/03/2008

Definition at line 47 of file UnitFactory.h.

Constructor & Destructor Documentation

◆ UnitFactoryImpl() [1/2]

Mantid::Kernel::UnitFactoryImpl::UnitFactoryImpl ( const UnitFactoryImpl )
delete

◆ UnitFactoryImpl() [2/2]

Mantid::Kernel::UnitFactoryImpl::UnitFactoryImpl ( )
privatedefault

Private Constructor for singleton class.

◆ ~UnitFactoryImpl()

Mantid::Kernel::UnitFactoryImpl::~UnitFactoryImpl ( )
overrideprivatedefault

Private Destructor.

Member Function Documentation

◆ getConvertibleUnits()

const std::vector< std::string > Mantid::Kernel::UnitFactoryImpl::getConvertibleUnits ( ) const
inline

Returns the names of the convertible units in the factory.

Returns
A string vector of keys

Definition at line 54 of file UnitFactory.h.

◆ operator=()

UnitFactoryImpl & Mantid::Kernel::UnitFactoryImpl::operator= ( const UnitFactoryImpl )
delete

Friends And Related Function Documentation

◆ CreateUsingNew< UnitFactoryImpl >

friend struct CreateUsingNew< UnitFactoryImpl >
friend

Definition at line 54 of file UnitFactory.h.


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