Mantid
Loading...
Searching...
No Matches
MaskedProperty.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2011 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
10#include <string>
11
25namespace Mantid {
26namespace Kernel {
27template <typename TYPE = std::string> class MaskedProperty : public Kernel::PropertyWithValue<TYPE> {
28public:
30 MaskedProperty(std::string name, TYPE defaultvalue, IValidator_sptr validator = IValidator_sptr(new NullValidator),
31 const unsigned int direction = Direction::Input);
33 MaskedProperty(std::string name, TYPE defaultvalue, const unsigned int direction);
34
35 MaskedProperty(const MaskedProperty &) = default;
36 // Unhide the PropertyWithValue assignment operator
37 using Kernel::PropertyWithValue<TYPE>::operator=;
38
40 MaskedProperty *clone() const override;
41
43 const Kernel::PropertyHistory createHistory() const override;
44
47 TYPE getMaskedValue() const;
48
49private:
51 void doMasking() const;
52
54};
55} // namespace Kernel
56} // namespace Mantid
A property class for masking the properties.
const Kernel::PropertyHistory createHistory() const override
Mask out the out the value in the history.
void doMasking() const
Perform the actual masking.
MaskedProperty * clone() const override
"virtual" copy constructor
TYPE getMaskedValue() const
This method returns the masked property value.
MaskedProperty(const MaskedProperty &)=default
TYPE m_maskedValue
the masked value
NullValidator is a validator that doesn't.
Definition: NullValidator.h:20
This class stores information about the parameters used by an algorithm.
The concrete, templated class for properties.
unsigned int direction() const
returns the direction of the property
Definition: Property.h:172
const std::string & name() const
Get the property's name.
Definition: Property.cpp:60
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.
@ Input
An input workspace.
Definition: Property.h:53