![]() |
OpenWalnut
1.5.0dev
|
Class building the base for user defined constraints on a property instance. More...
#include <WPropertyVariable.h>
Inheritance diagram for WPropertyVariable< T >::PropertyConstraint:Public Member Functions | |
| PropertyConstraint () | |
| Default constructor. More... | |
| virtual | ~PropertyConstraint () |
| Destructor. More... | |
| virtual bool | accept (std::shared_ptr< WPropertyVariable< T > > property, const T &value)=0 |
| This method decides whether the specified value is valid for a specific property. More... | |
| virtual PROPERTYCONSTRAINT_TYPE | getType () |
| Allows simple identification of the real constraint type. More... | |
| virtual std::shared_ptr< PropertyConstraint > | clone ()=0 |
| Method to clone the constraint and create a new one with the correct dynamic type. More... | |
Static Public Member Functions | |
| static std::shared_ptr< PropertyConstraint > | create (PROPERTYCONSTRAINT_TYPE type) |
| This method creates a constraint using the specified type. More... | |
Class building the base for user defined constraints on a property instance.
Definition at line 176 of file WPropertyVariable.h.
| WPropertyVariable< T >::PropertyConstraint::PropertyConstraint |
Default constructor.
Definition at line 886 of file WPropertyVariable.h.
|
virtual |
Destructor.
Definition at line 891 of file WPropertyVariable.h.
|
pure virtual |
This method decides whether the specified value is valid for a specific property.
| value | the new value. |
| property | the property to which the value should be set. |
Implemented in WPropertyConstraintSelectOnlyOne< T >, WPropertyConstraintPathExists< T >, WPropertyConstraintNotEmpty< T >, WPropertyConstraintMin< T >, WPropertyConstraintMax< T >, WPropertyConstraintIsValid< T >, WPropertyConstraintIsDirectory< T >, and WPropertyConstraintConfirmOverwrite< T >.
|
pure virtual |
Method to clone the constraint and create a new one with the correct dynamic type.
Implemented in WMTemplate::StringLength, WMHARDIToSphericalHarmonics::evenInt, WPropertyConstraintSelectOnlyOne< T >, WPropertyConstraintPathExists< T >, WPropertyConstraintNotEmpty< T >, WPropertyConstraintMin< T >, WPropertyConstraintMax< T >, WPropertyConstraintIsValid< T >, WPropertyConstraintIsDirectory< T >, and WPropertyConstraintConfirmOverwrite< T >.
|
static |
This method creates a constraint using the specified type.
This is a useful convenience class for easily adding constraints.
| type | the type of the constraint to create |
|
virtual |
Allows simple identification of the real constraint type.
Reimplemented in WPropertyConstraintSelectOnlyOne< T >, WPropertyConstraintPathExists< T >, WPropertyConstraintNotEmpty< T >, WPropertyConstraintMin< T >, WPropertyConstraintMax< T >, WPropertyConstraintIsValid< T >, WPropertyConstraintIsDirectory< T >, and WPropertyConstraintConfirmOverwrite< T >.
Definition at line 896 of file WPropertyVariable.h.