Mantid
Loading...
Searching...
No Matches
Framework
Kernel
inc
MantidKernel
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
9
#include "
MantidKernel/PropertyWithValue.h
"
10
#include <string>
11
25
namespace
Mantid
{
26
namespace
Kernel {
27
template
<
typename
TYPE = std::
string
>
class
MaskedProperty
:
public
Kernel::PropertyWithValue
<TYPE> {
28
public
:
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
49
private
:
51
void
doMasking
()
const
;
52
53
mutable
TYPE
m_maskedValue
;
54
};
55
}
// namespace Kernel
56
}
// namespace Mantid
PropertyWithValue.h
Mantid::Kernel::MaskedProperty
A property class for masking the properties.
Definition:
MaskedProperty.h:27
Mantid::Kernel::MaskedProperty::createHistory
const Kernel::PropertyHistory createHistory() const override
Mask out the out the value in the history.
Definition:
MaskedProperty.cpp:53
Mantid::Kernel::MaskedProperty::doMasking
void doMasking() const
Perform the actual masking.
Definition:
MaskedProperty.cpp:72
Mantid::Kernel::MaskedProperty::clone
MaskedProperty * clone() const override
"virtual" copy constructor
Definition:
MaskedProperty.cpp:46
Mantid::Kernel::MaskedProperty::getMaskedValue
TYPE getMaskedValue() const
This method returns the masked property value.
Definition:
MaskedProperty.cpp:60
Mantid::Kernel::MaskedProperty::MaskedProperty
MaskedProperty(const MaskedProperty &)=default
Mantid::Kernel::MaskedProperty::m_maskedValue
TYPE m_maskedValue
the masked value
Definition:
MaskedProperty.h:53
Mantid::Kernel::NullValidator
NullValidator is a validator that doesn't.
Definition:
NullValidator.h:20
Mantid::Kernel::PropertyHistory
This class stores information about the parameters used by an algorithm.
Definition:
PropertyHistory.h:34
Mantid::Kernel::PropertyWithValue
The concrete, templated class for properties.
Definition:
PropertyWithValue.h:37
Mantid::Kernel::Property::direction
unsigned int direction() const
returns the direction of the property
Definition:
Property.h:172
Mantid::Kernel::Property::name
const std::string & name() const
Get the property's name.
Definition:
Property.cpp:60
Mantid::DataHandling::TYPE
TYPE
Definition:
PatchBBY.cpp:20
Mantid::Kernel::IValidator_sptr
std::shared_ptr< IValidator > IValidator_sptr
A shared_ptr to an IValidator.
Definition:
IValidator.h:26
Mantid
Helper class which provides the Collimation Length for SANS instruments.
Definition:
AbsorptionCorrection.h:18
Mantid::Kernel::Direction::Input
@ Input
An input workspace.
Definition:
Property.h:53
Generated on Tue Jan 3 2023 11:57:50 for Mantid by
1.9.5