|
Mantid
|
A validator to check whether a given algorithm has a named property. More...
#include <AlgorithmHasProperty.h>
Public Member Functions | |
| AlgorithmHasProperty (std::string propName) | |
| Constructor. More... | |
| Kernel::IValidator_sptr | clone () const override |
| Make a copy of the present type of validator. More... | |
| std::string | getType () const |
| Get a string representation of the type. More... | |
Protected Member Functions | |
| std::string | checkValidity (const std::shared_ptr< IAlgorithm > &value) const override |
| Checks the value based on the validator's rules. More... | |
Private Attributes | |
| std::string | m_propName |
| Store the property name. More... | |
A validator to check whether a given algorithm has a named property.
The algorithm's property must be valid for the validator to pass.
Definition at line 24 of file AlgorithmHasProperty.h.
| Mantid::API::AlgorithmHasProperty::AlgorithmHasProperty | ( | std::string | propName | ) |
Constructor.
Definition at line 16 of file AlgorithmHasProperty.cpp.
|
overrideprotected |
Checks the value based on the validator's rules.
| value | :: The input algorithm to check |
Definition at line 33 of file AlgorithmHasProperty.cpp.
References Mantid::Kernel::Property::isValid(), m_propName, value, and Mantid::Kernel::Property::value().
|
override |
Make a copy of the present type of validator.
Definition at line 25 of file AlgorithmHasProperty.cpp.
| std::string Mantid::API::AlgorithmHasProperty::getType | ( | ) | const |
Get a string representation of the type.
Definition at line 22 of file AlgorithmHasProperty.cpp.
|
private |
Store the property name.
Definition at line 35 of file AlgorithmHasProperty.h.
Referenced by checkValidity().