32#ifndef _QX_VALIDATOR_H_
33#define _QX_VALIDATOR_H_
54QxInvalidValueX
validate(T & t,
const QString & group);
107template <
typename DataType,
class Owner>
133 DataType * val = pDataMember->
getValuePtr<DataType>(pOwner);
149template <
typename DataType,
class Owner>
162 DataType * val = pDataMember->
getValuePtr<DataType>(pOwner);
163 if (! val) {
qAssert(
false);
return; }
167 lstInvalidValues.
insert(invalidValues);
Common interface for all class properties registered into QxOrm context.
Common interface for validator engine.
qx::IxDataMember : common interface for all class properties registered into QxOrm context
T * getValuePtr(void *pOwner, bool *bOk=NULL)
virtual QVariant toVariant(const void *pOwner, const QString &sFormat, int iIndexName=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context) const =0
qx::IxValidator : common interface for validator engine
IxDataMember * m_pDataMember
Registered property associated to validator.
QString m_group
Validator group.
qx::QxInvalidValueX : list of invalid values
void insert(const IxValidator *pValidator)
void setCurrentPath(const QString &s)
qx::QxValidator_Recursive<DataType, Owner> : concrete class for a recursive validator
virtual void validate(void *pOwner, QxInvalidValueX &lstInvalidValues) const
virtual ~QxValidator_Recursive()
qx::QxValidator_WithDataType<DataType, Owner> : concrete class for a custom validator with data type
std::function< void(const DataType &, QxInvalidValueX &)> type_fct_custom_validator_data_type
void setFunction(type_fct_custom_validator_data_type fct)
type_fct_custom_validator_data_type_validator m_fctCustomValidator_DataTypeValidator
Custom validator function : global function with value and a IxValidator pointer containing all param...
QxValidator_WithDataType()
virtual ~QxValidator_WithDataType()
virtual void validate(void *pOwner, QxInvalidValueX &lstInvalidValues) const
type_fct_custom_validator_data_type m_fctCustomValidator_DataType
Custom validator function : global function with value.
void setFunction(type_fct_custom_validator_data_type_validator fct)
std::function< void(const DataType &, const IxValidator *, QxInvalidValueX &)> type_fct_custom_validator_data_type_validator
qx::QxValidator<Owner> : concrete class for a custom validator
std::function< void(Owner *, QxInvalidValueX &)> type_fct_custom_validator_member
std::function< void(const QVariant &, const IxValidator *, QxInvalidValueX &)> type_fct_custom_validator_variant_validator
void setFunction(type_fct_custom_validator_variant fct)
type_fct_custom_validator_variant m_fctCustomValidator_Variant
Custom validator function : global function with value converted to QVariant type.
type_fct_custom_validator_variant_validator m_fctCustomValidator_VariantValidator
Custom validator function : global function with value converted to QVariant type and a IxValidator p...
void setFunction(type_fct_custom_validator_member fct)
virtual void validate(void *pOwner, QxInvalidValueX &lstInvalidValues) const
type_fct_custom_validator_member m_fctCustomValidator_Member
Custom validator function : class method.
std::function< void(const QVariant &, QxInvalidValueX &)> type_fct_custom_validator_variant
void setFunction(type_fct_custom_validator_variant_validator fct)
Root namespace for all QxOrm library features.
QxInvalidValueX validate(T &t, const QString &group)