Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Mantid::API::CatalogFactoryImpl Class Reference

The factory is a singleton that hands out shared pointers to the base Catalog class. More...

#include <CatalogFactory.h>

Inheritance diagram for Mantid::API::CatalogFactoryImpl:
Mantid::Kernel::DynamicFactory< ICatalog >

Public Member Functions

 CatalogFactoryImpl (const CatalogFactoryImpl &)=delete
 
CatalogFactoryImploperator= (const CatalogFactoryImpl &)=delete
 
- Public Member Functions inherited from Mantid::Kernel::DynamicFactory< ICatalog >
virtual std::shared_ptr< ICatalogcreate (const std::string &className) const
 Creates a new instance of the class with the given name. More...
 
virtual ICatalogcreateUnwrapped (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

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

Private Attributes

std::map< std::string, std::shared_ptr< ICatalog > > m_createdCatalogs
 Stores pointers to already created Catalog instances, with their name as the key. More...
 

Friends

struct Kernel::CreateUsingNew< CatalogFactoryImpl >
 

Additional Inherited Members

- Public Types inherited from Mantid::Kernel::DynamicFactory< ICatalog >
using AbstractFactory = AbstractInstantiator< ICatalog >
 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< ICatalog >
Poco::NotificationCenter notificationCenter
 Sends notifications to observers. More...
 
- Protected Member Functions inherited from Mantid::Kernel::DynamicFactory< ICatalog >
 DynamicFactory ()
 Protected constructor for base class. More...
 

Detailed Description

The factory is a singleton that hands out shared pointers to the base Catalog class.

Author
Sofia Antony, ISIS Rutherford Appleton Laboratory
Date
01/10/2010

Definition at line 45 of file CatalogFactory.h.

Constructor & Destructor Documentation

◆ CatalogFactoryImpl() [1/2]

Mantid::API::CatalogFactoryImpl::CatalogFactoryImpl ( const CatalogFactoryImpl )
delete

◆ CatalogFactoryImpl() [2/2]

Mantid::API::CatalogFactoryImpl::CatalogFactoryImpl ( )
privatedefault

Private Constructor for singleton class.

◆ ~CatalogFactoryImpl()

Mantid::API::CatalogFactoryImpl::~CatalogFactoryImpl ( )
overrideprivatedefault

Private Destructor.

Member Function Documentation

◆ operator=()

CatalogFactoryImpl & Mantid::API::CatalogFactoryImpl::operator= ( const CatalogFactoryImpl )
delete

Friends And Related Function Documentation

◆ Kernel::CreateUsingNew< CatalogFactoryImpl >

friend struct Kernel::CreateUsingNew< CatalogFactoryImpl >
friend

Definition at line 48 of file CatalogFactory.h.

Member Data Documentation

◆ m_createdCatalogs

std::map<std::string, std::shared_ptr<ICatalog> > Mantid::API::CatalogFactoryImpl::m_createdCatalogs
mutableprivate

Stores pointers to already created Catalog instances, with their name as the key.

Definition at line 58 of file CatalogFactory.h.


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