36 std::string
value()
const override;
37 std::string
valueAsPrettyStr(
size_t const maxLength = 0,
bool const collapseLists =
true)
const override;
42 int size()
const override;
50 operator E()
const {
return static_cast<E
>(
m_value); };
51 operator std::string()
const {
return static_cast<std::string
>(
m_value); };
54 std::string
isValid()
const override;
63 std::string
setDataItem(
const std::shared_ptr<DataItem> &data)
override;
81 template <
typename U> std::string
setTypedValue(U
const &
value, std::true_type
const &);
83 template <
typename U> std::string
setTypedValue(U
const &
value, std::false_type
const &);
const std::vector< double > & rhs
A concrete property based on user options of a finite list of strings.
std::string isValid() const override
If the value has been set, then it is valid.
std::string setDataItem(const std::shared_ptr< DataItem > &data) override
Set a property value via a DataItem.
void saveProperty(Nexus::File *file) override
int size() const override
Get the size of the property.
std::string setTypedValue(U const &value, std::true_type const &)
Helper function for setValue(DataItem_sptr).
std::string getDefault() const override
Get the value the property was initialised with -its default value.
std::string valueAsPrettyStr(size_t const maxLength=0, bool const collapseLists=true) const override
Get the value of the property as a more prettier string.
ENUMSTRING m_initialValue
the property's default value which is also its initial value
Json::Value valueAsJson() const override
Attempt to construct a Json::Value object from the plain value.
EnumeratedStringProperty * clone() const override
Virtual copy constructor.
ENUMSTRING operator()() const
Allows you to get the value of the property simply by typing its name.
bool operator==(EnumeratedStringProperty const &rhs) const
Deep comparison.
EnumeratedStringProperty & operator=(EnumeratedStringProperty const &right)
Assignment operator.
ENUMSTRING m_value
The value of the property.
std::vector< std::string > allowedValues() const override
Returns the set of valid values for this property, if such a set exists.
EnumeratedString< E, names > ENUMSTRING
std::string value() const override
Get the value of the property as a string.
bool isDefault() const override
Indicates if the property's value is the same as it was when it was set N.B.
std::string setValueFromProperty(Property const &right) override
Set the value of the property via a reference to another property.
bool operator!=(EnumeratedStringProperty const &rhs) const
Deep comparison (not equal).
std::string setValue(E const value)
Set the value of the property from a string representation.
EnumeratedStringProperty & operator+=(Property const *right) override
Add the value of another property.
std::string setValueFromJson(const Json::Value &value) override
Set the value of the property from a Json representation.
Base class for properties.
unsigned int direction() const
returns the direction of the property
const std::string & name() const
Get the property's name.
Helper class which provides the Collimation Length for SANS instruments.
Type
Enum giving the possible directions.
@ Input
An input workspace.