Mantid
Loading...
Searching...
No Matches
Static Public Member Functions | Private Types | Private Member Functions | Static Private Attributes | List of all members
Mantid::Geometry::ParameterFactory Class Reference

The ParameterFactory class creates parameters for the instrument ParameterMap. More...

#include <ParameterFactory.h>

Static Public Member Functions

static std::shared_ptr< Parametercreate (const std::string &className, const std::string &name, const std::string &visible="true")
 Creates an instance of a parameter. More...
 
template<class C >
static void subscribe (const std::string &className)
 Templated method for parameter subscription. More...
 

Private Types

using AbstractFactory = Kernel::AbstractInstantiator< Parameter >
 A typedef for the instantiator. More...
 
using FactoryMap = std::map< std::string, std::unique_ptr< AbstractFactory > >
 

Private Member Functions

ParameterFactoryoperator= (const ParameterFactory &)
 Private assignment operator. More...
 
 ParameterFactory ()
 Private default constructor. More...
 
 ParameterFactory (const ParameterFactory &)
 Private copy constructor. More...
 

Static Private Attributes

static FactoryMap s_map
 The map holding the registered class names and their instantiators. More...
 

Detailed Description

The ParameterFactory class creates parameters for the instrument ParameterMap.

Author
Roman Tolchenov, Tessella plc
Date
19/05/2009

Definition at line 39 of file ParameterFactory.h.

Member Typedef Documentation

◆ AbstractFactory

A typedef for the instantiator.

Definition at line 55 of file ParameterFactory.h.

◆ FactoryMap

using Mantid::Geometry::ParameterFactory::FactoryMap = std::map<std::string, std::unique_ptr<AbstractFactory> >
private

Definition at line 56 of file ParameterFactory.h.

Constructor & Destructor Documentation

◆ ParameterFactory() [1/2]

Mantid::Geometry::ParameterFactory::ParameterFactory ( )
private

Private default constructor.

◆ ParameterFactory() [2/2]

Mantid::Geometry::ParameterFactory::ParameterFactory ( const ParameterFactory )
private

Private copy constructor.

Member Function Documentation

◆ create()

std::shared_ptr< Parameter > Mantid::Geometry::ParameterFactory::create ( const std::string &  className,
const std::string &  name,
const std::string &  visible = "true" 
)
static

Creates an instance of a parameter.

Parameters
className:: The parameter registered type name
name:: The parameter name
visible:: Whether the parameter should be visible in InstrumentViewer
Returns
A pointer to the created parameter
Exceptions
runtime_errorif the type has not been registered

Definition at line 83 of file Parameter.cpp.

References s_map.

Referenced by Mantid::Geometry::ParameterMap::add(), and Mantid::Geometry::ParameterMap::create().

◆ operator=()

ParameterFactory & Mantid::Geometry::ParameterFactory::operator= ( const ParameterFactory )
private

Private assignment operator.

◆ subscribe()

template<class C >
void Mantid::Geometry::ParameterFactory::subscribe ( const std::string &  className)
static

Templated method for parameter subscription.

Parameters
className:: The parameter type name
Template Parameters
CThe parameter type

Definition at line 65 of file ParameterFactory.h.

References s_map.

Member Data Documentation

◆ s_map

ParameterFactory::FactoryMap Mantid::Geometry::ParameterFactory::s_map
staticprivate

The map holding the registered class names and their instantiators.

Definition at line 58 of file ParameterFactory.h.

Referenced by create(), and subscribe().


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