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

The ConstraintFactory class is in charge of the creation of concrete instances of Constraints. More...

#include <ConstraintFactory.h>

Inheritance diagram for Mantid::API::ConstraintFactoryImpl:
Mantid::Kernel::DynamicFactory< IConstraint >

Public Member Functions

 ConstraintFactoryImpl (const ConstraintFactoryImpl &)=delete
 
IConstraintcreateInitialized (IFunction *fun, const Expression &expr, bool isDefault=false) const
 Creates an instance of a Constraint. More...
 
IConstraintcreateInitialized (IFunction *fun, const std::string &input, bool isDefault=false) const
 Creates an instance of a Constraint. More...
 
ConstraintFactoryImploperator= (const ConstraintFactoryImpl &)=delete
 
- Public Member Functions inherited from Mantid::Kernel::DynamicFactory< IConstraint >
virtual std::shared_ptr< IConstraintcreate (const std::string &className) const
 Creates a new instance of the class with the given name. More...
 
virtual IConstraintcreateUnwrapped (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

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

Friends

struct Mantid::Kernel::CreateUsingNew< ConstraintFactoryImpl >
 

Additional Inherited Members

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

Detailed Description

The ConstraintFactory class is in charge of the creation of concrete instances of Constraints.

It inherits most of its implementation from the Dynamic Factory base class. It is implemented as a singleton class.

Author
Roman Tolchenov, Tessella Support Services plc
Date
4/02/2010

Definition at line 39 of file ConstraintFactory.h.

Constructor & Destructor Documentation

◆ ConstraintFactoryImpl() [1/2]

Mantid::API::ConstraintFactoryImpl::ConstraintFactoryImpl ( const ConstraintFactoryImpl )
delete

◆ ConstraintFactoryImpl() [2/2]

Mantid::API::ConstraintFactoryImpl::ConstraintFactoryImpl ( )
private

Private Constructor for singleton class.

Definition at line 15 of file ConstraintFactory.cpp.

References Mantid::Kernel::SingletonHolder< T >::Instance().

◆ ~ConstraintFactoryImpl()

Mantid::API::ConstraintFactoryImpl::~ConstraintFactoryImpl ( )
overrideprivatedefault

Private Destructor.

Member Function Documentation

◆ createInitialized() [1/2]

IConstraint * Mantid::API::ConstraintFactoryImpl::createInitialized ( IFunction fun,
const Expression expr,
bool  isDefault = false 
) const

Creates an instance of a Constraint.

An overloaded method using Expression.

Parameters
fun:: The function
expr:: A parsed initialization Expression.
isDefault:: Is this initialization a default one?
Returns
A pointer to the created Constraint

Definition at line 43 of file ConstraintFactory.cpp.

References Mantid::Kernel::DynamicFactory< IConstraint >::createUnwrapped(), Mantid::API::IConstraint::initialize(), and Mantid::API::Expression::name().

◆ createInitialized() [2/2]

IConstraint * Mantid::API::ConstraintFactoryImpl::createInitialized ( IFunction fun,
const std::string &  input,
bool  isDefault = false 
) const

Creates an instance of a Constraint.

Creates an instance of a Constraint initialized using an expression.

Parameters
fun:: The function
input:: The creation expression, format depends on the constraint implementation. For BoundaryConstraint it is an inequality defining the boundaries for a parameter, eg: 0 < paramName < 1, paramName > 0, etc.
isDefault:: Is this initialization a default one?
Returns
A pointer to the created Constraint

Definition at line 31 of file ConstraintFactory.cpp.

References createInitialized(), and Mantid::API::Expression::parse().

Referenced by createInitialized().

◆ operator=()

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

Friends And Related Function Documentation

◆ Mantid::Kernel::CreateUsingNew< ConstraintFactoryImpl >

Definition at line 46 of file ConstraintFactory.h.


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