Mantid
Loading...
Searching...
No Matches
BraggScattererInCrystalStructure.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
12#include "MantidGeometry/DllConfig.h"
13
14namespace Mantid {
15namespace Geometry {
16
31class MANTID_GEOMETRY_DLL BraggScattererInCrystalStructure : public BraggScatterer {
32public:
34
35 Kernel::V3D getPosition() const;
36 UnitCell const &getCell() const & { return m_cell; };
37 UnitCell getCell() const && { return m_cell; }; // cppcheck-suppress returnByReference
38
39protected:
40 void afterPropertySet(const std::string &propertyName) override;
41
44 virtual void afterScattererPropertySet(const std::string &) {}
45
49
50 virtual void setPosition(const Kernel::V3D &position);
51 virtual void setCell(const UnitCell &cell);
52
53 void declareProperties() override;
54
55 Kernel::V3D getPositionFromString(const std::string &positionString) const;
56
59};
60
61using BraggScattererInCrystalStructure_sptr = std::shared_ptr<BraggScattererInCrystalStructure>;
62
70class MANTID_GEOMETRY_DLL UnitCellStringValidator : public Kernel::TypedValidator<std::string> {
71protected:
72 Kernel::IValidator_sptr clone() const override;
73 std::string checkValidity(const std::string &unitCellString) const override;
74};
75
76MANTID_GEOMETRY_DLL std::vector<std::string> getTokenizedPositionString(const std::string &position);
77
78} // namespace Geometry
79} // namespace Mantid
double position
Definition GetAllEi.cpp:154
void(ComponentInfo::* setPosition)(const size_t, const Mantid::Kernel::V3D &)
This class provides an extension of BraggScatterer, suitable for scatterers that are part of a crysta...
virtual void declareScattererProperties()
This method should be implemented by subclasses for declaring additional properties.
virtual void afterScattererPropertySet(const std::string &)
This method should be re-implemented by subclasses for additional parameter processing.
BraggScatterer is a general interface for representing scatterers in the unit cell of a periodic stru...
Helper class for validating unit cell strings.
Class to implement unit cell of crystals.
Definition UnitCell.h:44
Class for 3D vectors.
Definition V3D.h:34
std::shared_ptr< BraggScattererInCrystalStructure > BraggScattererInCrystalStructure_sptr
MANTID_GEOMETRY_DLL std::vector< std::string > getTokenizedPositionString(const std::string &position)
Returns components of comma-separated position string, cleaned from [ and ].
std::shared_ptr< IValidator > IValidator_sptr
A shared_ptr to an IValidator.
Definition IValidator.h:26
Helper class which provides the Collimation Length for SANS instruments.