18 : TypedValidator<
std::vector<
std::string>>(), m_AllowMultiSelection(allowMultiSelection), m_isOptional(isOptional) {
41 return "Select a value";
43 return "Only one workspace was expected.";
46 std::ostringstream os;
47 for (
const auto &wsName :
value) {
48 if (!ads.doesExist(wsName)) {
49 os <<
"The workspace \"" << wsName <<
"\" is not in the workspace list.\n";
65 vals.emplace_back(
"");
double value
The value of the point.
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.
void setOptional(const bool setOptional)
bool m_AllowMultiSelection
if the validator should allow multiple selection
std::vector< std::string > allowedValues() const override
Returns the current contents of the AnalysisDataService for input workspaces.
Kernel::IValidator_sptr clone() const override
Clone the validator.
bool isMultipleSelectionAllowed() override
ADSValidator(const bool allowMultiSelection=true, const bool isOptional=false)
Default constructor. Sets up an empty list of valid values.
bool m_isOptional
if the validator should an empty selection
void setMultipleSelectionAllowed(const bool isMultiSelectionAllowed)
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
std::shared_ptr< IValidator > IValidator_sptr
A shared_ptr to an IValidator.