Mantid
|
Atribute visitor class. More...
#include <IFunction.h>
Public Member Functions | |
T | operator() (bool &b) const |
implements static_visitor's operator() for bool More... | |
T | operator() (double &d) const |
implements static_visitor's operator() for double More... | |
T | operator() (int &i) const |
implements static_visitor's operator() for int More... | |
T | operator() (std::string &str) const |
implements static_visitor's operator() for std::string More... | |
T | operator() (std::vector< double > &v) const |
implements static_visitor's operator() for vector More... | |
virtual | ~AttributeVisitor ()=default |
Virtual destructor. More... | |
Protected Member Functions | |
virtual T | apply (bool &) const =0 |
Implement this method to access attribute as bool. More... | |
virtual T | apply (double &) const =0 |
Implement this method to access attribute as double. More... | |
virtual T | apply (int &) const =0 |
Implement this method to access attribute as int. More... | |
virtual T | apply (std::string &) const =0 |
Implement this method to access attribute as string. More... | |
virtual T | apply (std::vector< double > &) const =0 |
Implement this method to access attribute as vector. More... | |
template<typename T1 > | |
void | evaluateValidator (T1 &inputData) const |
Evaluates the validator associated with attribute this visitor is to visit. More... | |
Protected Attributes | |
Mantid::Kernel::IValidator_sptr | m_validator = Mantid::Kernel::IValidator_sptr() |
Validator against which to evaluate attribute value to set. More... | |
Atribute visitor class.
It provides a separate access method for each attribute type. When applied to a particular attribute the appropriate method will be used. The child classes must implement the virtual AttributeVisitor::apply methods. See implementation of Attribute::value() method for an example.
Definition at line 200 of file IFunction.h.
|
virtualdefault |
Virtual destructor.
|
protectedpure virtual |
Implement this method to access attribute as bool.
Implemented in MantidQt::MantidWidgets::SetAttributeFromProperty, and MantidQt::MantidWidgets::SetAttribute.
|
protectedpure virtual |
Implement this method to access attribute as double.
Implemented in MantidQt::MantidWidgets::SetAttributeFromProperty, and MantidQt::MantidWidgets::SetAttribute.
|
protectedpure virtual |
Implement this method to access attribute as int.
Implemented in MantidQt::MantidWidgets::SetAttributeFromProperty, and MantidQt::MantidWidgets::SetAttribute.
|
protectedpure virtual |
Implement this method to access attribute as string.
Implemented in MantidQt::MantidWidgets::SetAttributeFromProperty, and MantidQt::MantidWidgets::SetAttribute.
|
protectedpure virtual |
Implement this method to access attribute as vector.
Implemented in MantidQt::MantidWidgets::SetAttributeFromProperty, and MantidQt::MantidWidgets::SetAttribute.
|
inlineprotected |
Evaluates the validator associated with attribute this visitor is to visit.
Definition at line 228 of file IFunction.h.
References m_validator.
Referenced by MantidQt::MantidWidgets::SetAttribute::apply().
|
inline |
implements static_visitor's operator() for bool
Definition at line 211 of file IFunction.h.
|
inline |
implements static_visitor's operator() for double
Definition at line 207 of file IFunction.h.
References Mantid::Geometry::d.
|
inline |
implements static_visitor's operator() for int
Definition at line 209 of file IFunction.h.
|
inline |
implements static_visitor's operator() for std::string
Definition at line 205 of file IFunction.h.
|
inline |
implements static_visitor's operator() for vector
Definition at line 213 of file IFunction.h.
|
protected |
Validator against which to evaluate attribute value to set.
Definition at line 235 of file IFunction.h.
Referenced by MantidQt::MantidWidgets::SetAttribute::apply(), and MantidQt::MantidWidgets::SetAttribute::SetAttribute().