Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
Mantid::Kernel::ChainableFactory< Factory, Product, Argument > Class Template Referenceabstract

ChainableFactory : Chain of Responsiblity generic factory. More...

#include <ChainableFactory.h>

Inheritance diagram for Mantid::Kernel::ChainableFactory< Factory, Product, Argument >:
Mantid::Kernel::Chainable< Factory >

Public Member Functions

std::unique_ptr< Product > create (const Argument &argument) const
 Factory method wrapper. More...
 
- Public Member Functions inherited from Mantid::Kernel::Chainable< Factory >
bool hasSuccessor () const
 
ChainablesetSuccessor (T &&successor)
 Set the successor. More...
 
virtual ~Chainable ()=0
 Keep our destructor pure virtual, but require an implementation. More...
 

Private Member Functions

virtual bool canInterpret (const Argument &unitString) const =0
 Indicate an ability to intepret the string. More...
 
virtual Product * createRaw (const Argument &argument) const =0
 Create the product. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Mantid::Kernel::Chainable< Factory >
virtual void checkSuccessor () const
 Provide option for derived classes to check successor and throw if bad. More...
 
- Protected Attributes inherited from Mantid::Kernel::Chainable< Factory >
std::unique_ptr< Factory > m_successor
 Successor factory boost::optional<std::unique_ptr<ChainableType>> m_successor;. More...
 

Detailed Description

template<typename Factory, typename Product, typename Argument>
class Mantid::Kernel::ChainableFactory< Factory, Product, Argument >

ChainableFactory : Chain of Responsiblity generic factory.

Definition at line 20 of file ChainableFactory.h.

Member Function Documentation

◆ canInterpret()

template<typename Factory , typename Product , typename Argument >
virtual bool Mantid::Kernel::ChainableFactory< Factory, Product, Argument >::canInterpret ( const Argument &  unitString) const
privatepure virtual

◆ create()

template<typename Factory , typename Product , typename Argument >
std::unique_ptr< Product > Mantid::Kernel::ChainableFactory< Factory, Product, Argument >::create ( const Argument &  argument) const
inline

Factory method wrapper.

Wraps results in smart pointer.

Parameters
argument: creational arguments
Returns
Product

Definition at line 27 of file ChainableFactory.h.

◆ createRaw()

template<typename Factory , typename Product , typename Argument >
virtual Product * Mantid::Kernel::ChainableFactory< Factory, Product, Argument >::createRaw ( const Argument &  argument) const
privatepure virtual

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