Mantid
|
A Factory for creating Parameterized component from their respective non-parameterized objects. More...
#include <ParComponentFactory.h>
Static Public Member Functions | |
static std::shared_ptr< IComponent > | create (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< IDetector > | createDetector (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< Instrument > | createInstrument (const std::shared_ptr< const Instrument > &base, const std::shared_ptr< ParameterMap > &map) |
Create a parameterized instrument from the given base and ParameterMap. More... | |
A Factory for creating Parameterized component from their respective non-parameterized objects.
Definition at line 32 of file ParComponentFactory.h.
|
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.
base | A pointer to the unparameterized version |
map | A pointer to the ParameterMap |
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[]().
|
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
base | A pointer to the unparameterized version |
map | A pointer to the ParameterMap |
Definition at line 29 of file ParComponentFactory.cpp.
References Mantid::Geometry::IDetector::cloneParameterized().
Referenced by create(), and Mantid::Geometry::Instrument::getDetector().
|
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
base | A pointer to the unparameterized version |
map | A pointer to the ParameterMap |
Definition at line 43 of file ParComponentFactory.cpp.
Referenced by create(), Mantid::API::ExperimentInfo::getInstrument(), Mantid::Geometry::InstrumentVisitor::makeWrappers(), and Mantid::Geometry::Instrument::makeWrappers().