| QxOrm 1.4.1 C++ Object Relational Mapping library

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
qx::IxValidator Class Reference
QxValidator : QxOrm library validation engine using validator pattern

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

`#include <IxValidator.h>`

Inheritance diagram for qx::IxValidator:

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
IxDataMember * | getDataMember () 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.
IxDataMember * | m_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 : http://www.qxorm.com/qxorm_en/faq.html#faq_250

Definition at line 60 of file IxValidator.h.

## Member Enumeration Documentation

enum qx::IxValidator::validator_type

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]`

Reimplemented in qx::QxValidator_Recursive< DataType, Owner >, qx::QxValidator_WithDataType< DataType, Owner >, and qx::QxValidator< Owner >.

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.

IxDataMember* qx::IxValidator::m_pDataMember`[protected]`

Registered property associated to validator.

Definition at line 79 of file IxValidator.h.

validator_type qx::IxValidator::m_type`[protected]`

Validator type.

Definition at line 75 of file IxValidator.h.

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

- D:/Dvlp/_Perso/QxOrm/include/QxValidator/IxValidator.h