Mantid
Loading...
Searching...
No Matches
Framework
API
src
OrientedLatticeValidator.cpp
Go to the documentation of this file.
1
// Mantid Repository : https://github.com/mantidproject/mantid
2
//
3
// Copyright © 2018 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
#include "
MantidAPI/OrientedLatticeValidator.h
"
8
#include "
MantidAPI/ExperimentInfo.h
"
9
#include "
MantidAPI/Sample.h
"
10
#include "
MantidKernel/IValidator.h
"
11
#include <memory>
12
13
using
Mantid::Kernel::IValidator_sptr
;
14
15
namespace
Mantid::API
{
16
20
Kernel::IValidator_sptr
OrientedLatticeValidator::clone
()
const
{
21
return
std::make_shared<OrientedLatticeValidator>(*
this
);
22
}
23
29
std::string
OrientedLatticeValidator::checkValidity
(
const
ExperimentInfo_sptr
&info)
const
{
30
if
(!info->sample().hasOrientedLattice()) {
31
return
"Workspace must have a sample with an orientation matrix defined."
;
32
}
else
{
33
return
""
;
34
}
35
}
36
37
}
// namespace Mantid::API
ExperimentInfo.h
IValidator.h
OrientedLatticeValidator.h
Sample.h
Mantid::API::OrientedLatticeValidator::clone
Kernel::IValidator_sptr clone() const override
Clone the current state.
Definition
OrientedLatticeValidator.cpp:20
Mantid::API::OrientedLatticeValidator::checkValidity
std::string checkValidity(const ExperimentInfo_sptr &workspace) const override
Check for validity.
Definition
OrientedLatticeValidator.cpp:29
Mantid::API
Definition
AbsorptionCorrection.h:20
Mantid::API::ExperimentInfo_sptr
std::shared_ptr< ExperimentInfo > ExperimentInfo_sptr
Shared pointer to ExperimentInfo.
Definition
ExperimentInfo.h:220
Mantid::Kernel::IValidator_sptr
std::shared_ptr< IValidator > IValidator_sptr
A shared_ptr to an IValidator.
Definition
IValidator.h:26
Generated by
1.9.8