89 enum {
is_valid_base_class = ((! std::is_same<type_base_class, T>::value) && (std::is_base_of<type_base_class, T>::value || std::is_same<type_base_class, qx::trait::no_base_class_defined>::value)) };
110 template <
typename V,
typename U>
IxDataMember *
data(V U::* pData, const QString & sKey, long lVersion = 0, bool bSerialize = true, bool bDao = true);
114 template <
typename V,
typename U>
IxSqlRelation *
relationManyToMany(V U::* pData, const QString & sKey, const QString & sExtraTable, const QString & sForeignKeyOwner, const QString & sForeignKeyDataType, long lVersion = 0);
116 template <
typename V,
typename U>
IxDataMember *
pimpl(V U::* pData, const QString & sKey = QString(
"_PIMPL_"));
118 template <
typename V,
typename U>
IxDataMember *
data(V U::* pData, const QString & sKey, long lVersion, bool bSerialize, bool bDao,
IxDataMember * pImpl);
122 template <
typename V,
typename U>
IxSqlRelation *
relationManyToMany(V U::* pData, const QString & sKey, const QString & sExtraTable, const QString & sForeignKeyOwner, const QString & sForeignKeyDataType, long lVersion,
IxDataMember * pImpl);
128 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4>
IxFunction *
fct_4(
const typename QxFunction_4<T, R, P1, P2, P3, P4>::type_fct & fct,
const QString & sKey);
129 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5>
IxFunction *
fct_5(
const typename QxFunction_5<T, R, P1, P2, P3, P4, P5>::type_fct & fct,
const QString & sKey);
130 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6>
IxFunction *
fct_6(
const typename QxFunction_6<T, R, P1, P2, P3, P4, P5, P6>::type_fct & fct,
const QString & sKey);
131 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7>
IxFunction *
fct_7(
const typename QxFunction_7<T, R, P1, P2, P3, P4, P5, P6, P7>::type_fct & fct,
const QString & sKey);
132 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8>
IxFunction *
fct_8(
const typename QxFunction_8<T, R, P1, P2, P3, P4, P5, P6, P7, P8>::type_fct & fct,
const QString & sKey);
133 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9>
IxFunction *
fct_9(
const typename QxFunction_9<T, R, P1, P2, P3, P4, P5, P6, P7, P8, P9>::type_fct & fct,
const QString & sKey);
139 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4>
IxFunction *
fctStatic_4(
const typename QxFunction_4<void, R, P1, P2, P3, P4>::type_fct & fct,
const QString & sKey);
140 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5>
IxFunction *
fctStatic_5(
const typename QxFunction_5<void, R, P1, P2, P3, P4, P5>::type_fct & fct,
const QString & sKey);
141 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6>
IxFunction *
fctStatic_6(
const typename QxFunction_6<void, R, P1, P2, P3, P4, P5, P6>::type_fct & fct,
const QString & sKey);
142 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7>
IxFunction *
fctStatic_7(
const typename QxFunction_7<void, R, P1, P2, P3, P4, P5, P6, P7>::type_fct & fct,
const QString & sKey);
143 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8>
IxFunction *
fctStatic_8(
const typename QxFunction_8<void, R, P1, P2, P3, P4, P5, P6, P7, P8>::type_fct & fct,
const QString & sKey);
144 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9>
IxFunction *
fctStatic_9(
const typename QxFunction_9<void, R, P1, P2, P3, P4, P5, P6, P7, P8, P9>::type_fct & fct,
const QString & sKey);
152 {
return std::is_abstract<T>::value; }
159 {
return typeid(T); }
165#if _QX_SUPPORT_COVARIANT_RETURN_TYPE
197 template <
typename U,
typename V,
int dummy>
201 {
return ((pOwner && pFct) ? pFct->invoke(pOwner, params, ret) :
QxClass<V>::invoke(sKey,
static_cast<V *
>(pOwner), params, ret)); }
204 {
return ((pOwner && pFct) ? pFct->invoke(pOwner, params, ret) :
QxClass<V>::invoke(sKey,
static_cast<V *
>(pOwner), params, ret)); }
213 template <
typename U,
int dummy>
217 { Q_UNUSED(sKey);
return ((pOwner && pFct) ? pFct->invoke(pOwner, params, ret) :
qx_bool(
false)); }
220 { Q_UNUSED(sKey);
return ((pOwner && pFct) ? pFct->invoke(pOwner, params, ret) :
qx_bool(
false)); }
223 { Q_UNUSED(sKey);
return (pFct ? pFct->invoke(params, ret) :
qx_bool(
false)); }
226 { Q_UNUSED(sKey);
return (pFct ? pFct->invoke(params, ret) :
qx_bool(
false)); }
233 { Q_UNUSED(sKey); Q_UNUSED(pOwner); Q_UNUSED(params); Q_UNUSED(ret); Q_UNUSED(pFct);
return qx_bool(
false); }
236 { Q_UNUSED(sKey); Q_UNUSED(pOwner); Q_UNUSED(params); Q_UNUSED(ret); Q_UNUSED(pFct);
return qx_bool(
false); }
239 { Q_UNUSED(sKey); Q_UNUSED(params); Q_UNUSED(ret); Q_UNUSED(pFct);
return qx_bool(
false); }
242 { Q_UNUSED(sKey); Q_UNUSED(params); Q_UNUSED(ret); Q_UNUSED(pFct);
return qx_bool(
false); }
249 { Q_UNUSED(sKey); Q_UNUSED(pOwner); Q_UNUSED(params); Q_UNUSED(ret); Q_UNUSED(pFct);
return qx_bool(
false); }
252 { Q_UNUSED(sKey); Q_UNUSED(pOwner); Q_UNUSED(params); Q_UNUSED(ret); Q_UNUSED(pFct);
return qx_bool(
false); }
255 { Q_UNUSED(sKey); Q_UNUSED(params); Q_UNUSED(ret); Q_UNUSED(pFct);
return qx_bool(
false); }
258 { Q_UNUSED(sKey); Q_UNUSED(params); Q_UNUSED(ret); Q_UNUSED(pFct);
return qx_bool(
false); }
263 template <
typename U,
int dummy>
269 {
static bool get() {
return false; } };
273 {
static bool get() {
return false; } };
279#include "../../inl/QxRegister/QxClass.inl"
Common interface for all classes registered into QxOrm context.
Concrete list of class properties registered into QxOrm context.
Concrete class to define a thread-safe singleton of QxOrm library.
Concrete class for a list of validators associated to a type registered into QxOrm context.
qx::IxClass : common interface for all classes registered into QxOrm context
IxFunctionX * getFctStaticX() const
bool isRegistered() const
IxFunctionX * getFctMemberX() const
virtual IxValidatorX * getAllValidator()
IxDataMemberX * getDataMemberX() const
IxValidatorX_ptr & getAllValidatorRef()
void setRegistered(bool b)
qx::IxDataMember : common interface for all class properties registered into QxOrm context
qx::IxFunction : common interface for all functions registered into QxOrm context (used by introspect...
std::vector< qx::any > type_any_params
qx::IxSqlRelation : common interface for all relationships defined between 2 classes (or between 2 ta...
qx::IxValidatorX : common interface for a list of validators
qx_bool : boolean type with code and description message when an error occured
qx::QxClass<T> : concrete class of type T registered into QxOrm context (this class is a singleton an...
IxFunction * fct_4(const typename QxFunction_4< T, R, P1, P2, P3, P4 >::type_fct &fct, const QString &sKey)
IxFunction * fctStatic_5(const typename QxFunction_5< void, R, P1, P2, P3, P4, P5 >::type_fct &fct, const QString &sKey)
IxSqlRelation * relationOneToMany(V U::*pData, const QString &sKey, const QString &sForeignKey, long lVersion, IxDataMember *pImpl)
IxSqlRelation * relationManyToMany(V U::*pData, const QString &sKey, const QString &sExtraTable, const QString &sForeignKeyOwner, const QString &sForeignKeyDataType, long lVersion, IxDataMember *pImpl)
virtual bool implementIxPersistable() const
IxFunction * fct_2(const typename QxFunction_2< T, R, P1, P2 >::type_fct &fct, const QString &sKey)
virtual IxClass * getBaseClass() const
IxFunction * fct_5(const typename QxFunction_5< T, R, P1, P2, P3, P4, P5 >::type_fct &fct, const QString &sKey)
IxFunction * fctStatic_7(const typename QxFunction_7< void, R, P1, P2, P3, P4, P5, P6, P7 >::type_fct &fct, const QString &sKey)
qx::trait::get_base_class< T >::type type_base_class
IxDataMember * id(type_primary_key U::*pDataMemberId, const QString &sKey, long lVersion, IxDataMember *pImpl)
IxFunction * fct_3(const typename QxFunction_3< T, R, P1, P2, P3 >::type_fct &fct, const QString &sKey)
IxFunction * fct_9(const typename QxFunction_9< T, R, P1, P2, P3, P4, P5, P6, P7, P8, P9 >::type_fct &fct, const QString &sKey)
IxFunction * insertFct(IxFunction_ptr pFct, const QString &sKey)
IxFunction * fct_1(const typename QxFunction_1< T, R, P1 >::type_fct &fct, const QString &sKey)
static qx_bool invokeStatic(const QString &sKey, const QString ¶ms=QString(), qx::any *ret=NULL)
IxFunction * fct_8(const typename QxFunction_8< T, R, P1, P2, P3, P4, P5, P6, P7, P8 >::type_fct &fct, const QString &sKey)
IxDataMember * pimpl(V U::*pData, const QString &sKey=QString("_PIMPL_"))
IxFunction * fctStatic_0(const typename QxFunction_0< void, R >::type_fct &fct, const QString &sKey)
QxDataMemberX< T > * dataMemberX() const
void beforeRegisterClass()
IxFunction * fct_6(const typename QxFunction_6< T, R, P1, P2, P3, P4, P5, P6 >::type_fct &fct, const QString &sKey)
IxFunction * fctStatic_6(const typename QxFunction_6< void, R, P1, P2, P3, P4, P5, P6 >::type_fct &fct, const QString &sKey)
IxDataMember * data(V U::*pData, const QString &sKey, long lVersion, bool bSerialize, bool bDao, IxDataMember *pImpl)
IxFunction * fct_7(const typename QxFunction_7< T, R, P1, P2, P3, P4, P5, P6, P7 >::type_fct &fct, const QString &sKey)
virtual IxValidatorX * getAllValidator()
IxSqlRelation * relationOneToOne(V U::*pData, const QString &sKey, long lVersion=0)
IxDataMember * data(V U::*pData, const QString &sKey, long lVersion=0, bool bSerialize=true, bool bDao=true)
IxFunction * fctStatic_4(const typename QxFunction_4< void, R, P1, P2, P3, P4 >::type_fct &fct, const QString &sKey)
virtual bool isAbstract() const
IxFunction * insertFctStatic(IxFunction_ptr pFct, const QString &sKey)
IxFunction * fctStatic_3(const typename QxFunction_3< void, R, P1, P2, P3 >::type_fct &fct, const QString &sKey)
IxFunctionX * fctMemberX() const
IxDataMember * id(type_primary_key T::*pDataMemberId, const QString &sKey, long lVersion=0)
IxSqlRelation * relationOneToMany(V U::*pData, const QString &sKey, const QString &sForeignKey, long lVersion=0)
IxSqlRelation * relationManyToMany(V U::*pData, const QString &sKey, const QString &sExtraTable, const QString &sForeignKeyOwner, const QString &sForeignKeyDataType, long lVersion=0)
IxDataMember * data(const QString &sKey, long lVersion)
qx::trait::get_primary_key< T >::type type_primary_key
static qx_bool invokeStatic(const QString &sKey, const type_any_params ¶ms, qx::any *ret=NULL)
IxFunctionX * fctStaticX() const
IxFunction::type_any_params type_any_params
IxSqlRelation * relationOneToOne(V U::*pData, const QString &sKey, long lVersion, IxDataMember *pImpl)
IxFunction * fct_0(const typename QxFunction_0< T, R >::type_fct &fct, const QString &sKey)
static qx_bool invoke(const QString &sKey, T *pOwner, const QString ¶ms=QString(), qx::any *ret=NULL)
static qx_bool invoke(const QString &sKey, T *pOwner, const type_any_params ¶ms, qx::any *ret=NULL)
IxFunction * fctStatic_8(const typename QxFunction_8< void, R, P1, P2, P3, P4, P5, P6, P7, P8 >::type_fct &fct, const QString &sKey)
QMutex m_oMutexClass
Mutex -> 'QxClass' is thread-safe.
IxFunction * fctStatic_2(const typename QxFunction_2< void, R, P1, P2 >::type_fct &fct, const QString &sKey)
IxFunction * fctStatic_9(const typename QxFunction_9< void, R, P1, P2, P3, P4, P5, P6, P7, P8, P9 >::type_fct &fct, const QString &sKey)
IxFunction * fctStatic_1(const typename QxFunction_1< void, R, P1 >::type_fct &fct, const QString &sKey)
virtual const std::type_info & typeInfo() const
IxDataMember * id(const QString &sKey, long lVersion)
IxSqlRelation * relationManyToOne(V U::*pData, const QString &sKey, long lVersion, IxDataMember *pImpl)
IxSqlRelation * relationManyToOne(V U::*pData, const QString &sKey, long lVersion=0)
qx::QxCollection<Key, Value> : QxOrm thread-safe container (keep insertion order + quick access by in...
const_reference_value getByKey(const Key &key) const
Return the item associated with the 'key'.
bool exist(const Key &key) const
Return 'true' if the list contains an occurrence of 'key', otherwise return 'false' (same as 'contain...
qx::QxDataMemberX<T> : concrete list of properties registered into QxOrm context for the class T
std::function< R(Owner *)> type_fct
std::function< R(Owner *, P1)> type_fct
std::function< R(Owner *, P1, P2)> type_fct
std::function< R(Owner *, P1, P2, P3)> type_fct
std::function< R(Owner *, P1, P2, P3, P4)> type_fct
std::function< R(Owner *, P1, P2, P3, P4, P5)> type_fct
std::function< R(Owner *, P1, P2, P3, P4, P5, P6)> type_fct
std::function< R(Owner *, P1, P2, P3, P4, P5, P6, P7)> type_fct
std::function< R(Owner *, P1, P2, P3, P4, P5, P6, P7, P8)> type_fct
std::function< R(Owner *, P1, P2, P3, P4, P5, P6, P7, P8, P9)> type_fct
qx::QxSingleton<T> : concrete class to define a thread-safe singleton of type T
static T * getSingleton()
qx::QxValidatorX<T> : concrete class for a list of validators associated to a type registered into Qx...
qx::trait::get_base_class<T>::type : retrieve base class of type T registered into QxOrm context and ...
qx::trait::get_class_name<T>::get() : return class name of type T under const char * format,...
qx::trait::get_primary_key<T>::type : return primary key type of T, by default primary key is long ty...
void register_class(T &t)
qx::register_class<T>(T & t) : specialize this template to register a class of type T into QxOrm cont...
Root namespace for all QxOrm library features.
std::shared_ptr< IxFunction > IxFunction_ptr
static qx_bool invoke(const QString &sKey, QObject *pOwner, const QString ¶ms, qx::any *ret, IxFunction_ptr pFct)
static qx_bool invoke(const QString &sKey, const QString ¶ms, qx::any *ret, IxFunction_ptr pFct)
static qx_bool invoke(const QString &sKey, QObject *pOwner, const type_any_params ¶ms, qx::any *ret, IxFunction_ptr pFct)
static qx_bool invoke(const QString &sKey, const type_any_params ¶ms, qx::any *ret, IxFunction_ptr pFct)
static qx_bool invoke(const QString &sKey, const QString ¶ms, qx::any *ret, IxFunction_ptr pFct)
static qx_bool invoke(const QString &sKey, U *pOwner, const type_any_params ¶ms, qx::any *ret, IxFunction_ptr pFct)
static qx_bool invoke(const QString &sKey, U *pOwner, const QString ¶ms, qx::any *ret, IxFunction_ptr pFct)
static qx_bool invoke(const QString &sKey, const type_any_params ¶ms, qx::any *ret, IxFunction_ptr pFct)
static qx_bool invoke(const QString &sKey, qx::trait::no_base_class_defined *pOwner, const type_any_params ¶ms, qx::any *ret, IxFunction_ptr pFct)
static qx_bool invoke(const QString &sKey, qx::trait::no_base_class_defined *pOwner, const QString ¶ms, qx::any *ret, IxFunction_ptr pFct)
static qx_bool invoke(const QString &sKey, const QString ¶ms, qx::any *ret, IxFunction_ptr pFct)
static qx_bool invoke(const QString &sKey, const type_any_params ¶ms, qx::any *ret, IxFunction_ptr pFct)
static qx_bool invoke(const QString &sKey, U *pOwner, const type_any_params ¶ms, qx::any *ret, IxFunction_ptr pFct)
static qx_bool invoke(const QString &sKey, const QString ¶ms, qx::any *ret, IxFunction_ptr pFct)
static qx_bool invoke(const QString &sKey, const type_any_params ¶ms, qx::any *ret, IxFunction_ptr pFct)
static qx_bool invoke(const QString &sKey, U *pOwner, const QString ¶ms, qx::any *ret, IxFunction_ptr pFct)
qx::trait::is_ix_persistable<T>::value : return true if T implements qx::IxPersistable interface,...