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

This class allows constraining properties to be not empty. More...

#include <WPropertyConstraintNotEmpty.h>

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

Public Member Functions

 WPropertyConstraintNotEmpty ()
 Constructor. More...
 
virtual ~WPropertyConstraintNotEmpty ()
 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...
 
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...
 

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 WPropertyConstraintNotEmpty< T >

This class allows constraining properties to be not empty.

This is especially useful for strings. This works on all types providing an empty() member function (as std::string and boost::filesystem::path do).

Definition at line 38 of file WPropertyConstraintNotEmpty.h.

Constructor & Destructor Documentation

◆ WPropertyConstraintNotEmpty()

template<typename T >
WPropertyConstraintNotEmpty< T >::WPropertyConstraintNotEmpty
explicit

Constructor.

Definition at line 79 of file WPropertyConstraintNotEmpty.h.

◆ ~WPropertyConstraintNotEmpty()

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

Destructor.

Definition at line 84 of file WPropertyConstraintNotEmpty.h.

Member Function Documentation

◆ accept()

template<typename T >
bool WPropertyConstraintNotEmpty< 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 89 of file WPropertyConstraintNotEmpty.h.

◆ clone()

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

◆ getType()

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

Allows simple identification of the real constraint type.

Returns
the type

Reimplemented from WPropertyVariable< T >::PropertyConstraint.

Definition at line 95 of file WPropertyConstraintNotEmpty.h.


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