OpenWalnut  1.4.0
Public Member Functions
WPropertyConstraintIsValid< T > Class Template Reference

This class allows constraining properties to only be set if a isValid method returns true. More...

#include <WPropertyConstraintIsValid.h>

+ Inheritance diagram for WPropertyConstraintIsValid< T >:

List of all members.

Public Member Functions

 WPropertyConstraintIsValid ()
 Constructor.
virtual ~WPropertyConstraintIsValid ()
 Destructor.
virtual bool accept (boost::shared_ptr< WPropertyVariable< T > > property, const T &value)
 Checks whether the specified new value is a valid, using T::isValid.
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.

Detailed Description

template<typename T>
class WPropertyConstraintIsValid< T >

This class allows constraining properties to only be set if a isValid method returns true.

This constraint is especially useful for class-type typenames T providing a isValid method.

Definition at line 36 of file WPropertyConstraintIsValid.h.


Constructor & Destructor Documentation

template<typename T >
WPropertyConstraintIsValid< T >::WPropertyConstraintIsValid ( )

Constructor.

Definition at line 77 of file WPropertyConstraintIsValid.h.

template<typename T >
WPropertyConstraintIsValid< T >::~WPropertyConstraintIsValid ( ) [virtual]

Destructor.

Definition at line 82 of file WPropertyConstraintIsValid.h.


Member Function Documentation

template<typename T >
bool WPropertyConstraintIsValid< T >::accept ( boost::shared_ptr< WPropertyVariable< T > >  property,
const T &  value 
) [virtual]

Checks whether the specified new value is a valid, using T::isValid.

Parameters:
propertythe property whose new value should be set.
valuethe new value to check
Returns:
true if value.isValid()

Implements WPropertyVariable< T >::PropertyConstraint.

Definition at line 87 of file WPropertyConstraintIsValid.h.

template<typename T >
boost::shared_ptr< typename WPropertyVariable< T >::PropertyConstraint > WPropertyConstraintIsValid< T >::clone ( ) [virtual]

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 99 of file WPropertyConstraintIsValid.h.

template<typename T >
PROPERTYCONSTRAINT_TYPE WPropertyConstraintIsValid< T >::getType ( ) [virtual]

Allows simple identification of the real constraint type.

Returns:
the type

Reimplemented from WPropertyVariable< T >::PropertyConstraint.

Definition at line 93 of file WPropertyConstraintIsValid.h.


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