25 #ifndef WPROPERTYCONSTRAINTMIN_H
26 #define WPROPERTYCONSTRAINTMIN_H
30 #include "../WPropertyTypes.h"
31 #include "WPropertyConstraintTypes.h"
36 template<
typename T >
74 virtual PROPERTYCONSTRAINT_TYPE
getType();
81 virtual std::shared_ptr< typename WPropertyVariable< T >::PropertyConstraint >
clone();
90 template <
typename T >
96 template <
typename T >
101 template <
typename T >
104 return value >= m_min;
107 template <
typename T >
113 template <
typename T >
119 template <
typename T >
This class allows constraining properties using a minimum value and the corresponding >= operator.
virtual bool accept(std::shared_ptr< WPropertyVariable< T > > property, const T &value)
Checks whether the specified new value is larger or equal to the specified min value.
WPropertyConstraintMin(T min)
Constructor.
virtual PROPERTYCONSTRAINT_TYPE getType()
Allows simple identification of the real constraint type.
T m_min
The minimal value the property should have.
T getMin()
Returns the current min value.
virtual ~WPropertyConstraintMin()
Destructor.
virtual std::shared_ptr< typename WPropertyVariable< T >::PropertyConstraint > clone()
Method to clone the constraint and create a new one with the correct dynamic type.
PropertyConstraint()
Default constructor.
A named property class with a concrete type.