|
Mantid
|
ADSValidator : a validator that requires the value of a property to be present in the ADS. More...
#include <ADSValidator.h>
Public Member Functions | |
| ADSValidator (const bool allowMultiSelection=true, const bool isOptional=false) | |
| Default constructor. Sets up an empty list of valid values. More... | |
| std::vector< std::string > | allowedValues () const override |
| Returns the current contents of the AnalysisDataService for input workspaces. More... | |
| Kernel::IValidator_sptr | clone () const override |
| Clone the validator. More... | |
| bool | isMultipleSelectionAllowed () override |
| bool | isOptional () const |
| void | setMultipleSelectionAllowed (const bool isMultiSelectionAllowed) |
| void | setOptional (const bool setOptional) |
Protected Member Functions | |
| std::string | checkValidity (const std::vector< std::string > &value) const override |
| Checks if the string passed is in the ADS, or if all members are in the ADS. More... | |
Private Attributes | |
| bool | m_AllowMultiSelection |
| if the validator should allow multiple selection More... | |
| bool | m_isOptional |
| if the validator should an empty selection More... | |
ADSValidator : a validator that requires the value of a property to be present in the ADS.
The type must be std::string
Definition at line 21 of file ADSValidator.h.
| Mantid::API::ADSValidator::ADSValidator | ( | const bool | allowMultiSelection = true, |
| const bool | isOptional = false |
||
| ) |
Default constructor. Sets up an empty list of valid values.
Definition at line 17 of file ADSValidator.cpp.
|
override |
Returns the current contents of the AnalysisDataService for input workspaces.
For output workspaces, an empty set is returned
Definition at line 60 of file ADSValidator.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance(), isOptional(), and Mantid::Kernel::Sorted.
|
overrideprotected |
Checks if the string passed is in the ADS, or if all members are in the ADS.
| value | :: The value to test |
Definition at line 39 of file ADSValidator.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance(), m_AllowMultiSelection, m_isOptional, and value.
|
override |
Clone the validator.
Definition at line 22 of file ADSValidator.cpp.
|
override |
Definition at line 24 of file ADSValidator.cpp.
References m_AllowMultiSelection.
Referenced by export_ADSValidator().
| bool Mantid::API::ADSValidator::isOptional | ( | ) | const |
Definition at line 30 of file ADSValidator.cpp.
References m_isOptional.
Referenced by allowedValues(), and export_ADSValidator().
| void Mantid::API::ADSValidator::setMultipleSelectionAllowed | ( | const bool | isMultiSelectionAllowed | ) |
Definition at line 26 of file ADSValidator.cpp.
References m_AllowMultiSelection.
Referenced by export_ADSValidator().
| void Mantid::API::ADSValidator::setOptional | ( | const bool | setOptional | ) |
Definition at line 32 of file ADSValidator.cpp.
References m_isOptional, and setOptional().
Referenced by export_ADSValidator(), and setOptional().
|
private |
if the validator should allow multiple selection
Definition at line 50 of file ADSValidator.h.
Referenced by checkValidity(), isMultipleSelectionAllowed(), and setMultipleSelectionAllowed().
|
private |
if the validator should an empty selection
Definition at line 52 of file ADSValidator.h.
Referenced by checkValidity(), isOptional(), and setOptional().