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

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

#include <WPropertyConstraintNotEmpty.h>

+ Inheritance diagram for WPropertyConstraintNotEmpty< T >:

List of all members.

Public Member Functions

 WPropertyConstraintNotEmpty ()
 Constructor.
virtual ~WPropertyConstraintNotEmpty ()
 Destructor.
virtual bool accept (boost::shared_ptr< WPropertyVariable< T > > property, const T &value)
 Checks whether the specified new value is larger or equal to the specified min value.
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 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 36 of file WPropertyConstraintNotEmpty.h.


Constructor & Destructor Documentation

template<typename T >
WPropertyConstraintNotEmpty< T >::WPropertyConstraintNotEmpty ( ) [explicit]

Constructor.

Definition at line 77 of file WPropertyConstraintNotEmpty.h.

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

Destructor.

Definition at line 82 of file WPropertyConstraintNotEmpty.h.


Member Function Documentation

template<typename T >
bool WPropertyConstraintNotEmpty< T >::accept ( boost::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 87 of file WPropertyConstraintNotEmpty.h.

template<typename T >
boost::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 99 of file WPropertyConstraintNotEmpty.h.

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 93 of file WPropertyConstraintNotEmpty.h.


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