|
Mantid
|
Same as EnabledWhenProperty, but returns the value for the isVisible() property instead of the isEnabled() property. More...
#include <VisibleWhenProperty.h>
Public Member Functions | |
| virtual bool | checkComparison (const IPropertyManager *algo) const override |
| Checks two VisisbleWhenProperty objects to determine the result of both of them. | |
| IPropertySettings * | clone () const override |
| Make a copy of the present type of validator. | |
| std::vector< std::string > | dependsOn (const std::string &thisProp) const override |
| Other properties that this property depends on. | |
| bool | isEnabled (const IPropertyManager *algo) const override |
| Return true always as we only consider visible. | |
| bool | isVisible (const IPropertyManager *algo) const override |
| Return true/false based on whether the other property satisfies the criterion. | |
| VisibleWhenProperty (const std::string &otherPropName, ePropertyCriterion when, const std::string &value="") | |
| Constructs a VisibleWhenProperty object which checks the property with name given and if it matches the criteria makes it visible. | |
| VisibleWhenProperty (const VisibleWhenProperty &conditionOne, const VisibleWhenProperty &conditionTwo, eLogicOperator logicOperator) | |
| Constructs a VisibleWhenProperty object which copies two already constructed VisibleWhenProperty objects and returns the result of both of them with the specified logic operator. | |
| VisibleWhenProperty (std::shared_ptr< VisibleWhenProperty > &&conditionOne, std::shared_ptr< VisibleWhenProperty > &&conditionTwo, eLogicOperator logicOperator) | |
| Constructs a VisibleWhenProperty object which takes ownership of two already constructed VisibleWhenProperty objects and returns the result of both of them with the specified logic operator. | |
Public Member Functions inherited from Mantid::Kernel::EnabledWhenProperty | |
| virtual bool | checkCriterion (const IPropertyManager *algo) const |
| Checks that the specified property matches the criteria given. | |
| EnabledWhenProperty (const EnabledWhenProperty &conditionOne, const EnabledWhenProperty &conditionTwo, eLogicOperator logicOperator) | |
| Constructs a EnabledWhenProperty object which copies two already constructed EnabledWhenProperty objects and returns the result of both of them with the specified logic operator. | |
| EnabledWhenProperty (const EnabledWhenProperty &other) | |
| Copy constructor. | |
| EnabledWhenProperty (const std::string &otherPropName, const ePropertyCriterion when, const std::string &value="") | |
| Constructs a EnabledWhenProperty object which checks the property with name given and if it matches the criteria enables it. | |
| EnabledWhenProperty (std::shared_ptr< EnabledWhenProperty > &&conditionOne, std::shared_ptr< EnabledWhenProperty > &&conditionTwo, eLogicOperator logicOperator) | |
| Constructs a EnabledWhenProperty object which takes ownership of two already constructed EnabledWhenProperty objects and returns the result of both of them with the specified logic operator. | |
Public Member Functions inherited from Mantid::Kernel::IPropertySettings | |
| virtual bool | applyChanges (const IPropertyManager *algo, const std::string ¤tPropName) |
| Overload this virtual function in order to modify the current property based on changes to other properties. | |
| IPropertySettings ()=default | |
| Constructor. | |
| virtual bool | isConditionChanged (const IPropertyManager *algo, const std::string &changedPropName="") const |
| to verify if the properties, this one depends on have changed or other special condition occurs which needs the framework to react to | |
| virtual | ~IPropertySettings ()=default |
| Destructor. | |
Private Attributes | |
| std::shared_ptr< ComparisonDetails< VisibleWhenProperty > > | m_comparisonDetails = nullptr |
| Hold a copy of any existing VisibleWhenPropertyObjects. | |
Additional Inherited Members | |
Protected Member Functions inherited from Mantid::Kernel::EnabledWhenProperty | |
| EnabledWhenProperty ()=default | |
| Protected Constructor for derived classes to skip setting up the comparator in the base class as they will handle it. | |
| std::string | getPropertyValue (const IPropertyManager *algo) const |
| Checks the algorithm and property are both valid and attempts to get the value associated with the property. | |
Protected Member Functions inherited from Mantid::Kernel::IPropertySettings | |
| IPropertySettings (const IPropertySettings &)=default | |
Protected Attributes inherited from Mantid::Kernel::EnabledWhenProperty | |
| std::shared_ptr< PropertyDetails > | m_propertyDetails = nullptr |
| Holds the various details used within the comparison. | |
Same as EnabledWhenProperty, but returns the value for the isVisible() property instead of the isEnabled() property.
Definition at line 20 of file VisibleWhenProperty.h.
| Mantid::Kernel::VisibleWhenProperty::VisibleWhenProperty | ( | const std::string & | otherPropName, |
| ePropertyCriterion | when, | ||
| const std::string & | value = "" |
||
| ) |
Constructs a VisibleWhenProperty object which checks the property with name given and if it matches the criteria makes it visible.
Constructor.
| otherPropName | :: Name of the OTHER property that we will check. |
| when | :: Criterion to evaluate |
| value | :: For the IS_EQUAL_TO or IS_NOT_EQUAL_TO condition, the value (as string) to check for |
Definition at line 21 of file VisibleWhenProperty.cpp.
| Mantid::Kernel::VisibleWhenProperty::VisibleWhenProperty | ( | const VisibleWhenProperty & | conditionOne, |
| const VisibleWhenProperty & | conditionTwo, | ||
| eLogicOperator | logicOperator | ||
| ) |
Constructs a VisibleWhenProperty object which copies two already constructed VisibleWhenProperty objects and returns the result of both of them with the specified logic operator.
Multiple conditions constructor - takes two VisibleWhenProperty objects and returns the product of them with the specified logic operator.
| conditionOne | :: First VisibleWhenProperty object to use |
| conditionTwo | :: Second VisibleWhenProperty object to use |
| logicOperator | :: The logic operator to apply across both conditions |
Definition at line 34 of file VisibleWhenProperty.cpp.
| Mantid::Kernel::VisibleWhenProperty::VisibleWhenProperty | ( | std::shared_ptr< VisibleWhenProperty > && | conditionOne, |
| std::shared_ptr< VisibleWhenProperty > && | conditionTwo, | ||
| eLogicOperator | logicOperator | ||
| ) |
Constructs a VisibleWhenProperty object which takes ownership of two already constructed VisibleWhenProperty objects and returns the result of both of them with the specified logic operator.
Multiple conditions constructor - takes two shared pointers to VisibleWhenProperty objects and returns the product of them with the specified logic operator.
| conditionOne | :: First VisibleWhenProperty object to use |
| conditionTwo | :: Second VisibleWhenProperty object to use |
| logicOperator | :: The logic operator to apply across both conditions |
Definition at line 51 of file VisibleWhenProperty.cpp.
|
overridevirtual |
Checks two VisisbleWhenProperty objects to determine the result of both of them.
Checks if the user specified combination of visible criterion returns a true or false value.
| algo | :: Pointer to the algorithm containing the property |
| If | any problems was found |
Reimplemented from Mantid::Kernel::EnabledWhenProperty.
Definition at line 65 of file VisibleWhenProperty.cpp.
References Mantid::Kernel::AND, isVisible(), m_comparisonDetails, Mantid::Kernel::OR, and Mantid::Kernel::XOR.
Referenced by isVisible().
|
overridevirtual |
Make a copy of the present type of validator.
Clones the current VisibleWhenProperty object and returns a pointer to the new object.
The caller is responsible for deleting this pointer when finished
Reimplemented from Mantid::Kernel::EnabledWhenProperty.
Definition at line 141 of file VisibleWhenProperty.cpp.
|
overridevirtual |
Other properties that this property depends on.
Reimplemented from Mantid::Kernel::EnabledWhenProperty.
Definition at line 117 of file VisibleWhenProperty.cpp.
References m_comparisonDetails, and Mantid::Kernel::EnabledWhenProperty::m_propertyDetails.
|
overridevirtual |
Return true always as we only consider visible.
Returns true always in VisibleWhenProperty as we only consider visibility case.
| algo | :: The pointer to the algorithm containing this property |
Reimplemented from Mantid::Kernel::EnabledWhenProperty.
Definition at line 92 of file VisibleWhenProperty.cpp.
References UNUSED_ARG.
|
overridevirtual |
Return true/false based on whether the other property satisfies the criterion.
Returns true or false depending on whether the property or combination of properties specified satisfies the criterion.
| algo | :: Pointer to the algorithm containing the property |
| : | On an error condition such as property not being found |
Reimplemented from Mantid::Kernel::EnabledWhenProperty.
Definition at line 105 of file VisibleWhenProperty.cpp.
References checkComparison(), Mantid::Kernel::EnabledWhenProperty::checkCriterion(), m_comparisonDetails, and Mantid::Kernel::EnabledWhenProperty::m_propertyDetails.
Referenced by checkComparison().
|
private |
Hold a copy of any existing VisibleWhenPropertyObjects.
Definition at line 57 of file VisibleWhenProperty.h.
Referenced by checkComparison(), dependsOn(), and isVisible().