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 getCell() const;
37
38protected:
39 void afterPropertySet(const std::string &propertyName) override;
40
43 virtual void afterScattererPropertySet(const std::string &) {}
44
48
49 virtual void setPosition(const Kernel::V3D &position);
50 virtual void setCell(const UnitCell &cell);
51
52 void declareProperties() override;
53
54 Kernel::V3D getPositionFromString(const std::string &positionString) const;
55
58};
59
60using BraggScattererInCrystalStructure_sptr = std::shared_ptr<BraggScattererInCrystalStructure>;
61
69class MANTID_GEOMETRY_DLL UnitCellStringValidator : public Kernel::TypedValidator<std::string> {
70protected:
71 Kernel::IValidator_sptr clone() const override;
72 std::string checkValidity(const std::string &unitCellString) const override;
73};
74
75MANTID_GEOMETRY_DLL std::vector<std::string> getTokenizedPositionString(const std::string &position);
76
77} // namespace Geometry
78} // 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.