![]() |
OpenWalnut
1.5.0dev
|
This shows how to write custom constraints for your modules. More...
Inheritance diagram for WMTemplate::StringLength:
Collaboration diagram for WMTemplate::StringLength:Private Member Functions | |
| virtual bool | accept (std::shared_ptr< WPropertyVariable< WPVBaseTypes::PV_STRING > > property, const WPVBaseTypes::PV_STRING &value) |
| You need to overwrite this method. More... | |
| virtual std::shared_ptr< WPropertyVariable< WPVBaseTypes::PV_STRING >::PropertyConstraint > | clone () |
| Method to clone the constraint and create a new one with the correct dynamic type. More... | |
Additional Inherited Members | |
Public Member Functions inherited from WPropertyVariable< T >::PropertyConstraint | |
| PropertyConstraint () | |
| Default constructor. More... | |
| virtual | ~PropertyConstraint () |
| Destructor. More... | |
| virtual bool | accept (std::shared_ptr< WPropertyVariable< T > > property, const T &value)=0 |
| This method decides whether the specified value is valid for a specific property. More... | |
| virtual PROPERTYCONSTRAINT_TYPE | getType () |
| Allows simple identification of the real constraint type. More... | |
Static Public Member Functions inherited from WPropertyVariable< T >::PropertyConstraint | |
| static std::shared_ptr< PropertyConstraint > | create (PROPERTYCONSTRAINT_TYPE type) |
| This method creates a constraint using the specified type. More... | |
This shows how to write custom constraints for your modules.
Please refer to the documentation in properties() for more details.
Definition at line 397 of file WMTemplate.h.
|
privatevirtual |
You need to overwrite this method.
It decides whether the specified new value should be accepted or not.
| property | the property thats going to be changed. |
| value | the new value |
Definition at line 808 of file WMTemplate.cpp.
|
privatevirtual |
Method to clone the constraint and create a new one with the correct dynamic type.
Implements WPropertyVariable< T >::PropertyConstraint.
Definition at line 820 of file WMTemplate.cpp.