25 #ifndef WPROPERTYCONSTRAINTISVALID_H
26 #define WPROPERTYCONSTRAINTISVALID_H
30 #include "../WPropertyTypes.h"
31 #include "WPropertyConstraintTypes.h"
37 template<
typename T >
66 virtual PROPERTYCONSTRAINT_TYPE
getType();
73 virtual std::shared_ptr< typename WPropertyVariable< T >::PropertyConstraint >
clone();
78 template <
typename T >
83 template <
typename T >
88 template <
typename T >
91 return value.isValid();
94 template <
typename T >
100 template <
typename T >
This class allows constraining properties to only be set if a isValid method returns true.
virtual std::shared_ptr< typename WPropertyVariable< T >::PropertyConstraint > clone()
Method to clone the constraint and create a new one with the correct dynamic type.
virtual PROPERTYCONSTRAINT_TYPE getType()
Allows simple identification of the real constraint type.
virtual bool accept(std::shared_ptr< WPropertyVariable< T > > property, const T &value)
Checks whether the specified new value is a valid, using T::isValid.
WPropertyConstraintIsValid()
Constructor.
virtual ~WPropertyConstraintIsValid()
Destructor.
PropertyConstraint()
Default constructor.
A named property class with a concrete type.