18 throw std::invalid_argument(
"Argument indexType incorrectly specified");
24 auto val = this->
value();
25 if (val ==
"SpectrumNumber")
27 else if (val ==
"WorkspaceIndex")
30 throw std::runtime_error(
"This value cannot be used until initialised");
32 throw std::runtime_error(val +
" is an invalid IndexType.");
40 if (std::find(beg, end,
"SpectrumNumber") != end) {
44 if (std::find(beg, end,
"WorkspaceIndex") != end) {
60 val =
"SpectrumNumber";
63 val =
"WorkspaceIndex";
IndexTypeProperty : Implementation of a property which stores the type of input indices users require...
bool isMultipleSelectionAllowed() override
Is Multiple Selection Allowed.
std::vector< std::string > allowedValues() const override
Returns the set of valid values for this property, if such a set exists.
IndexTypeProperty(const std::string &name="IndexType", int indexType=static_cast< int >(IndexType::WorkspaceIndex))
static std::string generatePropertyName(const std::string &name="")
IndexTypeProperty & operator=(API::IndexType type)
IndexType selectedType() const
std::vector< std::string > m_allowedValues
The concrete, templated class for properties.
std::string m_value
The value of the property.
std::string value() const override
const std::string & name() const
Get the property's name.
const std::string type() const
Returns the type of the property as a string.
Describes the direction (within an algorithm) of a Property.