Mantid
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
Mantid::Geometry::ParComponentFactory Class Reference

A Factory for creating Parameterized component from their respective non-parameterized objects. More...

#include <ParComponentFactory.h>

Static Public Member Functions

static std::shared_ptr< IComponentcreate (const std::shared_ptr< const IComponent > &base, const ParameterMap *map)
 Create a parameterized component from the given base component and ParameterMap. More...
 
static std::shared_ptr< IDetectorcreateDetector (const IDetector *base, const ParameterMap *map)
 Create a parameterized detector from the given base component and ParameterMap and return a shared_ptr<IDetector> More...
 
static std::shared_ptr< InstrumentcreateInstrument (const std::shared_ptr< const Instrument > &base, const std::shared_ptr< ParameterMap > &map)
 Create a parameterized instrument from the given base and ParameterMap. More...
 

Detailed Description

A Factory for creating Parameterized component from their respective non-parameterized objects.

Author
Nicholas Draper, ISIS RAL
Date
20/10/2009

Definition at line 32 of file ParComponentFactory.h.

Member Function Documentation

◆ create()

IComponent_sptr Mantid::Geometry::ParComponentFactory::create ( const std::shared_ptr< const IComponent > &  base,
const ParameterMap map 
)
static

Create a parameterized component from the given base component and ParameterMap.

Create a parameterized component from the given base component and ParameterMap SLOW VERSION as it has to check each possible type.

Parameters
baseA pointer to the unparameterized version
mapA pointer to the ParameterMap
Returns
A pointer to a parameterized component

Definition at line 56 of file ParComponentFactory.cpp.

References createDetector(), and createInstrument().

Referenced by Mantid::Geometry::CompAssembly::getChild(), Mantid::Geometry::Instrument::getComponentByID(), Mantid::Geometry::Component::getParent(), Mantid::Geometry::Instrument::getPlottable(), and Mantid::Geometry::ObjCompAssembly::operator[]().

◆ createDetector()

std::shared_ptr< IDetector > Mantid::Geometry::ParComponentFactory::createDetector ( const IDetector base,
const ParameterMap map 
)
static

Create a parameterized detector from the given base component and ParameterMap and return a shared_ptr<IDetector>

Create a parameterized detector from the given base detector and ParameterMap.

This version avoids a cast by directly returning the Detector pointer

Parameters
baseA pointer to the unparameterized version
mapA pointer to the ParameterMap
Returns
A pointer to a parameterized component

Definition at line 29 of file ParComponentFactory.cpp.

References Mantid::Geometry::IDetector::cloneParameterized().

Referenced by create(), and Mantid::Geometry::Instrument::getDetector().

◆ createInstrument()

std::shared_ptr< Instrument > Mantid::Geometry::ParComponentFactory::createInstrument ( const std::shared_ptr< const Instrument > &  base,
const std::shared_ptr< ParameterMap > &  map 
)
static

Create a parameterized instrument from the given base and ParameterMap.

Create a parameterized instrument from the given base detector and ParameterMap.

This version avoids a cast by directly returning the Instrument pointer

Parameters
baseA pointer to the unparameterized version
mapA pointer to the ParameterMap
Returns
A pointer to a parameterized component

Definition at line 43 of file ParComponentFactory.cpp.

Referenced by create(), Mantid::API::ExperimentInfo::getInstrument(), Mantid::Geometry::InstrumentVisitor::makeWrappers(), and Mantid::Geometry::Instrument::makeWrappers().


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