OpenWalnut
1.3.1
|
This class allows constraining properties to only be set if a isValid method returns true. More...
#include <WPropertyConstraintIsValid.h>
Public Member Functions | |
WPropertyConstraintIsValid () | |
Constructor. More... | |
virtual | ~WPropertyConstraintIsValid () |
Destructor. More... | |
virtual bool | accept (boost::shared_ptr< WPropertyVariable< T > > property, const T &value) |
Checks whether the specified new value is a valid, using T::isValid. More... | |
virtual PROPERTYCONSTRAINT_TYPE | getType () |
Allows simple identification of the real constraint type. More... | |
virtual boost::shared_ptr < typename WPropertyVariable < T >::PropertyConstraint > | clone () |
Method to clone the constraint and create a new one with the correct dynamic type. More... | |
![]() | |
PropertyConstraint () | |
Default constructor. More... | |
virtual | ~PropertyConstraint () |
Destructor. More... | |
Additional Inherited Members | |
![]() | |
static boost::shared_ptr < PropertyConstraint > | create (PROPERTYCONSTRAINT_TYPE type) |
This method creates a constraint using the specified type. More... | |
This class allows constraining properties to only be set if a isValid method returns true.
This constraint is especially useful for class-type typenames T providing a isValid method.
Definition at line 36 of file WPropertyConstraintIsValid.h.
WPropertyConstraintIsValid< T >::WPropertyConstraintIsValid | ( | ) |
Constructor.
Definition at line 77 of file WPropertyConstraintIsValid.h.
|
virtual |
Destructor.
Definition at line 82 of file WPropertyConstraintIsValid.h.
|
virtual |
Checks whether the specified new value is a valid, using T::isValid.
property | the property whose new value should be set. |
value | the new value to check |
Implements WPropertyVariable< T >::PropertyConstraint.
Definition at line 87 of file WPropertyConstraintIsValid.h.
|
virtual |
Method to clone the constraint and create a new one with the correct dynamic type.
Implements WPropertyVariable< T >::PropertyConstraint.
Definition at line 99 of file WPropertyConstraintIsValid.h.
|
virtual |
Allows simple identification of the real constraint type.
Reimplemented from WPropertyVariable< T >::PropertyConstraint.
Definition at line 93 of file WPropertyConstraintIsValid.h.