25 #ifndef WPROPERTYCONSTRAINTSELECTONLYONE_H
26 #define WPROPERTYCONSTRAINTSELECTONLYONE_H
28 #include "../WPropertyTypes.h"
29 #include "WPropertyConstraintTypes.h"
34 template <
typename T >
63 virtual PROPERTYCONSTRAINT_TYPE
getType();
70 virtual boost::shared_ptr< typename WPropertyVariable< T >::PropertyConstraint >
clone();
75 template <
typename T >
80 template <
typename T >
85 template <
typename T >
88 return ( value.size() <= 1 );
91 template <
typename T >
94 return PC_SELECTONLYONE;
97 template <
typename T >
103 #endif // WPROPERTYCONSTRAINTSELECTONLYONE_H
A named property class with a concrete type.
virtual bool accept(boost::shared_ptr< WPropertyVariable< T > > property, const T &value)
Checks whether the specified value is a directory or not.
This class allows constraining selection properties to not allow selection of multiple items...
WPropertyConstraintSelectOnlyOne()
Constructor.
virtual PROPERTYCONSTRAINT_TYPE getType()
Allows simple identification of the real constraint type.
virtual boost::shared_ptr< typename WPropertyVariable< T >::PropertyConstraint > clone()
Method to clone the constraint and create a new one with the correct dynamic type.
virtual ~WPropertyConstraintSelectOnlyOne()
Destructor.
PropertyConstraint()
Default constructor.