|
OpenWalnut 1.2.5
|
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. | |
| virtual | ~PropertyConstraint () |
| Destructor. | |
| virtual bool | accept (boost::shared_ptr< WPropertyVariable< T > > property, T value)=0 |
| This method decides whether the specified value is valid for a specific property. | |
| virtual PROPERTYCONSTRAINT_TYPE | getType () |
| Allows simple identification of the real constraint type. | |
| virtual boost::shared_ptr < PropertyConstraint > | clone ()=0 |
| Method to clone the constraint and create a new one with the correct dynamic type. | |
Static Public Member Functions | |
| static boost::shared_ptr < PropertyConstraint > | create (PROPERTYCONSTRAINT_TYPE type) |
| This method creates a constraint using the specified type. | |
Class building the base for user defined constraints on a property instance.
Definition at line 182 of file WPropertyVariable.h.
| WPropertyVariable< T >::PropertyConstraint::PropertyConstraint | ( | ) |
Default constructor.
Definition at line 887 of file WPropertyVariable.h.
| WPropertyVariable< T >::PropertyConstraint::~PropertyConstraint | ( | ) | [virtual] |
Destructor.
Definition at line 892 of file WPropertyVariable.h.
| virtual bool WPropertyVariable< T >::PropertyConstraint::accept | ( | boost::shared_ptr< WPropertyVariable< T > > | property, |
| T | value | ||
| ) | [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 WPropertyConstraintIsDirectory< T >, WPropertyConstraintIsValid< T >, WPropertyConstraintMax< T >, WPropertyConstraintMin< T >, WPropertyConstraintNotEmpty< T >, WPropertyConstraintPathExists< T >, and WPropertyConstraintSelectOnlyOne< T >.
| virtual boost::shared_ptr< PropertyConstraint > WPropertyVariable< T >::PropertyConstraint::clone | ( | ) | [pure virtual] |
Method to clone the constraint and create a new one with the correct dynamic type.
Implemented in WPropertyConstraintIsDirectory< T >, WPropertyConstraintIsValid< T >, WPropertyConstraintMax< T >, WPropertyConstraintMin< T >, WPropertyConstraintNotEmpty< T >, WPropertyConstraintPathExists< T >, and WPropertyConstraintSelectOnlyOne< T >.
| static boost::shared_ptr< PropertyConstraint > WPropertyVariable< T >::PropertyConstraint::create | ( | PROPERTYCONSTRAINT_TYPE | type | ) | [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 |
| PROPERTYCONSTRAINT_TYPE WPropertyVariable< T >::PropertyConstraint::getType | ( | ) | [virtual] |
Allows simple identification of the real constraint type.
Reimplemented in WPropertyConstraintIsDirectory< T >, WPropertyConstraintIsValid< T >, WPropertyConstraintMax< T >, WPropertyConstraintMin< T >, WPropertyConstraintNotEmpty< T >, WPropertyConstraintPathExists< T >, and WPropertyConstraintSelectOnlyOne< T >.
Definition at line 897 of file WPropertyVariable.h.
1.7.3