OpenWalnut  1.5.0dev
Private Member Functions | List of all members
WMTemplate::StringLength Class Reference

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 >::PropertyConstraintclone ()
 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< PropertyConstraintcreate (PROPERTYCONSTRAINT_TYPE type)
 This method creates a constraint using the specified type. More...
 

Detailed Description

This shows how to write custom constraints for your modules.

Please refer to the documentation in properties() for more details.

Note
: always use WPVBaseTypes to specialize the PropertyVariable template.

Definition at line 397 of file WMTemplate.h.

Member Function Documentation

◆ accept()

bool WMTemplate::StringLength::accept ( std::shared_ptr< WPropertyVariable< WPVBaseTypes::PV_STRING > >  property,
const WPVBaseTypes::PV_STRING value 
)
privatevirtual

You need to overwrite this method.

It decides whether the specified new value should be accepted or not.

Parameters
propertythe property thats going to be changed.
valuethe new value
Returns
true if the new value is OK.

Definition at line 808 of file WMTemplate.cpp.

◆ clone()

std::shared_ptr< WPropertyVariable< WPVBaseTypes::PV_STRING >::PropertyConstraint > WMTemplate::StringLength::clone ( )
privatevirtual

Method to clone the constraint and create a new one with the correct dynamic type.

Returns
the constraint.

Implements WPropertyVariable< T >::PropertyConstraint.

Definition at line 820 of file WMTemplate.cpp.


The documentation for this class was generated from the following files: