QxOrm  1.4.5
C++ Object Relational Mapping library

qx::IxValidator : common interface for validator engine More...

#include <IxValidator.h>

Inheritance diagram for qx::IxValidator:
qx::QxPropertyBag qx::QxValidator< Owner > qx::QxValidator_Recursive< DataType, Owner > qx::QxValidator_WithDataType< DataType, Owner >

List of all members.

Public Types

enum  validator_type {
  not_null, not_empty, min_value, max_value,
  min_length, max_length, date_past, date_future,
  min_decimal, max_decimal, regular_expression, e_mail,
  recursive_validator, custom_validator
}

Public Member Functions

 IxValidator (validator_type type)
virtual ~IxValidator ()
validator_type getType () const
QString getMessage () const
QString getGroup () const
QVariant getConstraint () const
QVariantList getConstraints () const
IxDataMembergetDataMember () const
void setMessage (const QString &s)
void setGroup (const QString &s)
void setConstraint (const QVariant &v)
void setConstraints (const QVariantList &lst)
void setDataMember (IxDataMember *p)
virtual void validate (void *pOwner, QxInvalidValueX &lstInvalidValues) const

Protected Member Functions

void initDefaultMessage ()
void validateNotNull (const QVariant &v, QxInvalidValueX &lstInvalidValues) const
void validateNotEmpty (const QVariant &v, QxInvalidValueX &lstInvalidValues) const
void validateMinValue (const QVariant &v, QxInvalidValueX &lstInvalidValues) const
void validateMaxValue (const QVariant &v, QxInvalidValueX &lstInvalidValues) const
void validateMinDecimal (const QVariant &v, QxInvalidValueX &lstInvalidValues) const
void validateMaxDecimal (const QVariant &v, QxInvalidValueX &lstInvalidValues) const
void validateMinLength (const QVariant &v, QxInvalidValueX &lstInvalidValues) const
void validateMaxLength (const QVariant &v, QxInvalidValueX &lstInvalidValues) const
void validateDatePast (const QVariant &v, QxInvalidValueX &lstInvalidValues) const
void validateDateFuture (const QVariant &v, QxInvalidValueX &lstInvalidValues) const
void validateRegularExpression (const QVariant &v, QxInvalidValueX &lstInvalidValues) const
void validateEMail (const QVariant &v, QxInvalidValueX &lstInvalidValues) const

Protected Attributes

validator_type m_type
 Validator type.
QString m_message
 Validator message when invalid value is detected.
QString m_group
 Validator group.
QVariantList m_Constraints
 List of constraints to verify.
IxDataMemberm_pDataMember
 Registered property associated to validator.

Detailed Description

qx::IxValidator : common interface for validator engine

For more informations about QxValidator module, goto the FAQ of QxOrm website : https://www.qxorm.com/qxorm_en/faq.html#faq_250

Definition at line 60 of file IxValidator.h.


Member Enumeration Documentation

Enumerator:
not_null 
not_empty 
min_value 
max_value 
min_length 
max_length 
date_past 
date_future 
min_decimal 
max_decimal 
regular_expression 
e_mail 
recursive_validator 
custom_validator 

Definition at line 65 of file IxValidator.h.


Constructor & Destructor Documentation

qx::IxValidator::IxValidator ( validator_type  type)
virtual qx::IxValidator::~IxValidator ( ) [virtual]

Member Function Documentation

QVariant qx::IxValidator::getConstraint ( ) const
QVariantList qx::IxValidator::getConstraints ( ) const
IxDataMember* qx::IxValidator::getDataMember ( ) const
QString qx::IxValidator::getGroup ( ) const
QString qx::IxValidator::getMessage ( ) const
validator_type qx::IxValidator::getType ( ) const
void qx::IxValidator::initDefaultMessage ( ) [protected]
void qx::IxValidator::setConstraint ( const QVariant &  v)
void qx::IxValidator::setConstraints ( const QVariantList &  lst)
void qx::IxValidator::setDataMember ( IxDataMember p)
void qx::IxValidator::setGroup ( const QString &  s)
void qx::IxValidator::setMessage ( const QString &  s)
virtual void qx::IxValidator::validate ( void *  pOwner,
QxInvalidValueX lstInvalidValues 
) const [virtual]
void qx::IxValidator::validateDateFuture ( const QVariant &  v,
QxInvalidValueX lstInvalidValues 
) const [protected]
void qx::IxValidator::validateDatePast ( const QVariant &  v,
QxInvalidValueX lstInvalidValues 
) const [protected]
void qx::IxValidator::validateEMail ( const QVariant &  v,
QxInvalidValueX lstInvalidValues 
) const [protected]
void qx::IxValidator::validateMaxDecimal ( const QVariant &  v,
QxInvalidValueX lstInvalidValues 
) const [protected]
void qx::IxValidator::validateMaxLength ( const QVariant &  v,
QxInvalidValueX lstInvalidValues 
) const [protected]
void qx::IxValidator::validateMaxValue ( const QVariant &  v,
QxInvalidValueX lstInvalidValues 
) const [protected]
void qx::IxValidator::validateMinDecimal ( const QVariant &  v,
QxInvalidValueX lstInvalidValues 
) const [protected]
void qx::IxValidator::validateMinLength ( const QVariant &  v,
QxInvalidValueX lstInvalidValues 
) const [protected]
void qx::IxValidator::validateMinValue ( const QVariant &  v,
QxInvalidValueX lstInvalidValues 
) const [protected]
void qx::IxValidator::validateNotEmpty ( const QVariant &  v,
QxInvalidValueX lstInvalidValues 
) const [protected]
void qx::IxValidator::validateNotNull ( const QVariant &  v,
QxInvalidValueX lstInvalidValues 
) const [protected]
void qx::IxValidator::validateRegularExpression ( const QVariant &  v,
QxInvalidValueX lstInvalidValues 
) const [protected]

Member Data Documentation

QVariantList qx::IxValidator::m_Constraints [protected]

List of constraints to verify.

Definition at line 78 of file IxValidator.h.

QString qx::IxValidator::m_group [protected]

Validator group.

Definition at line 77 of file IxValidator.h.

QString qx::IxValidator::m_message [protected]

Validator message when invalid value is detected.

Definition at line 76 of file IxValidator.h.

Registered property associated to validator.

Definition at line 79 of file IxValidator.h.

Validator type.

Definition at line 75 of file IxValidator.h.


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