OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
WPropertyConstraintMin< T > Class Template Reference

This class allows constraining properties using a minimum value and the corresponding >= operator. More...

#include <WPropertyConstraintMin.h>

+ Inheritance diagram for WPropertyConstraintMin< T >:
+ Collaboration diagram for WPropertyConstraintMin< T >:

Public Member Functions

 WPropertyConstraintMin (T min)
 Constructor. More...
 
virtual ~WPropertyConstraintMin ()
 Destructor. More...
 
virtual bool accept (std::shared_ptr< WPropertyVariable< T > > property, const T &value)
 Checks whether the specified new value is larger or equal to the specified min value. More...
 
getMin ()
 Returns the current min value. More...
 
virtual PROPERTYCONSTRAINT_TYPE getType ()
 Allows simple identification of the real constraint type. More...
 
virtual std::shared_ptr< typename WPropertyVariable< T >::PropertyConstraintclone ()
 Method to clone the constraint and create a new one with the correct dynamic type. More...
 
- Public Member Functions inherited from WPropertyVariable< T >::PropertyConstraint
 PropertyConstraint ()
 Default constructor. More...
 
virtual ~PropertyConstraint ()
 Destructor. More...
 

Private Attributes

m_min
 The minimal value the property should have. More...
 

Additional Inherited Members

- 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

template<typename T>
class WPropertyConstraintMin< T >

This class allows constraining properties using a minimum value and the corresponding >= operator.

Definition at line 37 of file WPropertyConstraintMin.h.

Constructor & Destructor Documentation

◆ WPropertyConstraintMin()

template<typename T >
WPropertyConstraintMin< T >::WPropertyConstraintMin ( min)
explicit

Constructor.

Parameters
minthe minimum value which the new property value should have.

Definition at line 91 of file WPropertyConstraintMin.h.

◆ ~WPropertyConstraintMin()

template<typename T >
WPropertyConstraintMin< T >::~WPropertyConstraintMin
virtual

Destructor.

Definition at line 97 of file WPropertyConstraintMin.h.

Member Function Documentation

◆ accept()

template<typename T >
bool WPropertyConstraintMin< T >::accept ( std::shared_ptr< WPropertyVariable< T > >  property,
const T &  value 
)
virtual

Checks whether the specified new value is larger or equal to the specified min value.

Parameters
propertythe property whose new value should be set.
valuethe new value to check
Returns
true if value >= m_min

Implements WPropertyVariable< T >::PropertyConstraint.

Definition at line 102 of file WPropertyConstraintMin.h.

◆ clone()

template<typename T >
std::shared_ptr< typename WPropertyVariable< T >::PropertyConstraint > WPropertyConstraintMin< 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 120 of file WPropertyConstraintMin.h.

◆ getMin()

template<typename T >
T WPropertyConstraintMin< T >::getMin

Returns the current min value.

Returns
the min value.

Definition at line 108 of file WPropertyConstraintMin.h.

◆ getType()

template<typename T >
PROPERTYCONSTRAINT_TYPE WPropertyConstraintMin< T >::getType
virtual

Allows simple identification of the real constraint type.

Returns
the type

Reimplemented from WPropertyVariable< T >::PropertyConstraint.

Definition at line 114 of file WPropertyConstraintMin.h.

Member Data Documentation

◆ m_min

template<typename T >
T WPropertyConstraintMin< T >::m_min
private

The minimal value the property should have.

Definition at line 87 of file WPropertyConstraintMin.h.


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