QxOrm 1.4.9
C++ Object Relational Mapping library
Loading...
Searching...
No Matches
QxClass.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** https://www.qxorm.com/
4** Copyright (C) 2013 Lionel Marty (contact@qxorm.com)
5**
6** This file is part of the QxOrm library
7**
8** This software is provided 'as-is', without any express or implied
9** warranty. In no event will the authors be held liable for any
10** damages arising from the use of this software
11**
12** Commercial Usage
13** Licensees holding valid commercial QxOrm licenses may use this file in
14** accordance with the commercial license agreement provided with the
15** Software or, alternatively, in accordance with the terms contained in
16** a written agreement between you and Lionel Marty
17**
18** GNU General Public License Usage
19** Alternatively, this file may be used under the terms of the GNU
20** General Public License version 3.0 as published by the Free Software
21** Foundation and appearing in the file 'license.gpl3.txt' included in the
22** packaging of this file. Please review the following information to
23** ensure the GNU General Public License version 3.0 requirements will be
24** met : http://www.gnu.org/copyleft/gpl.html
25**
26** If you are unsure which license is appropriate for your use, or
27** if you have questions regarding the use of this file, please contact :
28** contact@qxorm.com
29**
30****************************************************************************/
31
32#ifndef _QX_CLASS_H_
33#define _QX_CLASS_H_
34
35#ifdef _MSC_VER
36#pragma once
37#endif
38
46#include <QxRegister/IxClass.h>
47
49
51
53
57
59
60namespace qx {
61
62namespace trait {
63template <typename T> struct is_ix_persistable;
64} // namespace trait
65
70template <class T>
71void register_class(T & t) { Q_UNUSED(t); qAssert(false); };
72
77template <class T>
78class QxClass : public IxClass, public QxSingleton< QxClass<T> >
79{
80
81 friend class QxSingleton< QxClass<T> >;
82
83public:
84
88
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)) };
90
91protected:
92
94
95protected:
96
97 QxClass() : IxClass(), QxSingleton< QxClass<T> >(QString("qx::QxClass_") + qx::trait::get_class_name<T>::get_xml_tag()) { init(); }
98 virtual ~QxClass() { ; }
99
100public:
101
102 QxDataMemberX<T> * dataMemberX() const { return static_cast<QxDataMemberX<T> *>(this->getDataMemberX()); }
103 IxFunctionX * fctMemberX() const { return this->getFctMemberX(); }
104 IxFunctionX * fctStaticX() const { return this->getFctStaticX(); }
105
106 IxDataMember * id(type_primary_key T::* pDataMemberId, const QString & sKey, long lVersion = 0);
107 IxDataMember * id(const QString & sKey, long lVersion);
108 IxDataMember * data(const QString & sKey, long lVersion);
109
110 template <typename V, typename U> IxDataMember * data(V U::* pData, const QString & sKey, long lVersion = 0, bool bSerialize = true, bool bDao = true);
111 template <typename V, typename U> IxSqlRelation * relationOneToOne(V U::* pData, const QString & sKey, long lVersion = 0);
112 template <typename V, typename U> IxSqlRelation * relationManyToOne(V U::* pData, const QString & sKey, long lVersion = 0);
113 template <typename V, typename U> IxSqlRelation * relationOneToMany(V U::* pData, const QString & sKey, const QString & sForeignKey, long lVersion = 0);
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);
115
116 template <typename V, typename U> IxDataMember * pimpl(V U::* pData, const QString & sKey = QString("_PIMPL_"));
117 template <typename U> IxDataMember * id(type_primary_key U::* pDataMemberId, const QString & sKey, long lVersion, IxDataMember * pImpl);
118 template <typename V, typename U> IxDataMember * data(V U::* pData, const QString & sKey, long lVersion, bool bSerialize, bool bDao, IxDataMember * pImpl);
119 template <typename V, typename U> IxSqlRelation * relationOneToOne(V U::* pData, const QString & sKey, long lVersion, IxDataMember * pImpl);
120 template <typename V, typename U> IxSqlRelation * relationManyToOne(V U::* pData, const QString & sKey, long lVersion, IxDataMember * pImpl);
121 template <typename V, typename U> IxSqlRelation * relationOneToMany(V U::* pData, const QString & sKey, const QString & sForeignKey, long lVersion, 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);
123
124 template <typename R> IxFunction * fct_0(const typename QxFunction_0<T, R>::type_fct & fct, const QString & sKey);
125 template <typename R, typename P1> IxFunction * fct_1(const typename QxFunction_1<T, R, P1>::type_fct & fct, const QString & sKey);
126 template <typename R, typename P1, typename P2> IxFunction * fct_2(const typename QxFunction_2<T, R, P1, P2>::type_fct & fct, const QString & sKey);
127 template <typename R, typename P1, typename P2, typename P3> IxFunction * fct_3(const typename QxFunction_3<T, R, P1, P2, P3>::type_fct & fct, const QString & sKey);
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);
134
135 template <typename R> IxFunction * fctStatic_0(const typename QxFunction_0<void, R>::type_fct & fct, const QString & sKey);
136 template <typename R, typename P1> IxFunction * fctStatic_1(const typename QxFunction_1<void, R, P1>::type_fct & fct, const QString & sKey);
137 template <typename R, typename P1, typename P2> IxFunction * fctStatic_2(const typename QxFunction_2<void, R, P1, P2>::type_fct & fct, const QString & sKey);
138 template <typename R, typename P1, typename P2, typename P3> IxFunction * fctStatic_3(const typename QxFunction_3<void, R, P1, P2, P3>::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);
145
146 static qx_bool invoke(const QString & sKey, T * pOwner, const QString & params = QString(), qx::any * ret = NULL) { IxFunctionX * pFctX = QxClass<T>::getSingleton()->fctMemberX(); IxFunction_ptr pFct = ((pFctX && pFctX->exist(sKey)) ? pFctX->getByKey(sKey) : IxFunction_ptr()); return invokeHelper<T, type_base_class, 0>::invoke(sKey, pOwner, params, ret, pFct); }
147 static qx_bool invoke(const QString & sKey, T * pOwner, const type_any_params & params, qx::any * ret = NULL) { IxFunctionX * pFctX = QxClass<T>::getSingleton()->fctMemberX(); IxFunction_ptr pFct = ((pFctX && pFctX->exist(sKey)) ? pFctX->getByKey(sKey) : IxFunction_ptr()); return invokeHelper<T, type_base_class, 0>::invoke(sKey, pOwner, params, ret, pFct); }
148 static qx_bool invokeStatic(const QString & sKey, const QString & params = QString(), qx::any * ret = NULL) { IxFunctionX * pFctX = QxClass<T>::getSingleton()->fctStaticX(); IxFunction_ptr pFct = ((pFctX && pFctX->exist(sKey)) ? pFctX->getByKey(sKey) : IxFunction_ptr()); return invokeHelper<T, type_base_class, 0>::invoke(sKey, params, ret, pFct); }
149 static qx_bool invokeStatic(const QString & sKey, const type_any_params & params, qx::any * ret = NULL) { IxFunctionX * pFctX = QxClass<T>::getSingleton()->fctStaticX(); IxFunction_ptr pFct = ((pFctX && pFctX->exist(sKey)) ? pFctX->getByKey(sKey) : IxFunction_ptr()); return invokeHelper<T, type_base_class, 0>::invoke(sKey, params, ret, pFct); }
150
151 virtual bool isAbstract() const
152 { return std::is_abstract<T>::value; }
153
156
157#ifndef _QX_NO_RTTI
158 virtual const std::type_info & typeInfo() const
159 { return typeid(T); }
160#endif // _QX_NO_RTTI
161
162 virtual IxClass * getBaseClass() const
163 { return (std::is_same<type_base_class, qx::trait::no_base_class_defined>::value ? NULL : QxClass<type_base_class>::getSingleton()); }
164
165#if _QX_SUPPORT_COVARIANT_RETURN_TYPE
167 {
168 if (! this->getAllValidatorRef()) { this->getAllValidatorRef().reset(new QxValidatorX<T>()); IxClass::getAllValidator(); }
169 return static_cast<QxValidatorX<T> *>(this->getAllValidatorRef().get());
170 }
171#else // _QX_SUPPORT_COVARIANT_RETURN_TYPE
173 {
174 if (! this->getAllValidatorRef()) { this->getAllValidatorRef().reset(new QxValidatorX<T>()); IxClass::getAllValidator(); }
175 return this->getAllValidatorRef().get();
176 }
177#endif // _QX_SUPPORT_COVARIANT_RETURN_TYPE
178
179private:
180
181 void init();
182 IxFunction * insertFct(IxFunction_ptr pFct, const QString & sKey);
183 IxFunction * insertFctStatic(IxFunction_ptr pFct, const QString & sKey);
184
186
188 {
189 static_assert(is_valid_base_class, "is_valid_base_class");
190 QMutexLocker locker(& m_oMutexClass);
192 bool bNeedReg = (! this->isRegistered());
193 this->setRegistered(true);
194 if (bNeedReg) { registerClass(); }
195 }
196
197 template <typename U, typename V, int dummy>
199 {
200 static qx_bool invoke(const QString & sKey, U * pOwner, const QString & params, qx::any * ret, IxFunction_ptr pFct)
201 { return ((pOwner && pFct) ? pFct->invoke(pOwner, params, ret) : QxClass<V>::invoke(sKey, static_cast<V *>(pOwner), params, ret)); }
202
203 static qx_bool invoke(const QString & sKey, U * pOwner, const type_any_params & params, qx::any * ret, IxFunction_ptr pFct)
204 { return ((pOwner && pFct) ? pFct->invoke(pOwner, params, ret) : QxClass<V>::invoke(sKey, static_cast<V *>(pOwner), params, ret)); }
205
206 static qx_bool invoke(const QString & sKey, const QString & params, qx::any * ret, IxFunction_ptr pFct)
207 { return (pFct ? pFct->invoke(params, ret) : QxClass<V>::invokeStatic(sKey, params, ret)); }
208
209 static qx_bool invoke(const QString & sKey, const type_any_params & params, qx::any * ret, IxFunction_ptr pFct)
210 { return (pFct ? pFct->invoke(params, ret) : QxClass<V>::invokeStatic(sKey, params, ret)); }
211 };
212
213 template <typename U, int dummy>
215 {
216 static qx_bool invoke(const QString & sKey, U * pOwner, const QString & params, qx::any * ret, IxFunction_ptr pFct)
217 { Q_UNUSED(sKey); return ((pOwner && pFct) ? pFct->invoke(pOwner, params, ret) : qx_bool(false)); }
218
219 static qx_bool invoke(const QString & sKey, U * pOwner, const type_any_params & params, qx::any * ret, IxFunction_ptr pFct)
220 { Q_UNUSED(sKey); return ((pOwner && pFct) ? pFct->invoke(pOwner, params, ret) : qx_bool(false)); }
221
222 static qx_bool invoke(const QString & sKey, const QString & params, qx::any * ret, IxFunction_ptr pFct)
223 { Q_UNUSED(sKey); return (pFct ? pFct->invoke(params, ret) : qx_bool(false)); }
224
225 static qx_bool invoke(const QString & sKey, const type_any_params & params, qx::any * ret, IxFunction_ptr pFct)
226 { Q_UNUSED(sKey); return (pFct ? pFct->invoke(params, ret) : qx_bool(false)); }
227 };
228
229 template <int dummy>
231 {
232 static qx_bool invoke(const QString & sKey, qx::trait::no_base_class_defined * pOwner, const QString & params, qx::any * ret, IxFunction_ptr pFct)
233 { Q_UNUSED(sKey); Q_UNUSED(pOwner); Q_UNUSED(params); Q_UNUSED(ret); Q_UNUSED(pFct); return qx_bool(false); }
234
235 static qx_bool invoke(const QString & sKey, qx::trait::no_base_class_defined * pOwner, const type_any_params & params, qx::any * ret, IxFunction_ptr pFct)
236 { Q_UNUSED(sKey); Q_UNUSED(pOwner); Q_UNUSED(params); Q_UNUSED(ret); Q_UNUSED(pFct); return qx_bool(false); }
237
238 static qx_bool invoke(const QString & sKey, const QString & params, qx::any * ret, IxFunction_ptr pFct)
239 { Q_UNUSED(sKey); Q_UNUSED(params); Q_UNUSED(ret); Q_UNUSED(pFct); return qx_bool(false); }
240
241 static qx_bool invoke(const QString & sKey, const type_any_params & params, qx::any * ret, IxFunction_ptr pFct)
242 { Q_UNUSED(sKey); Q_UNUSED(params); Q_UNUSED(ret); Q_UNUSED(pFct); return qx_bool(false); }
243 };
244
245 template <int dummy>
247 {
248 static qx_bool invoke(const QString & sKey, QObject * pOwner, const QString & params, qx::any * ret, IxFunction_ptr pFct)
249 { Q_UNUSED(sKey); Q_UNUSED(pOwner); Q_UNUSED(params); Q_UNUSED(ret); Q_UNUSED(pFct); return qx_bool(false); }
250
251 static qx_bool invoke(const QString & sKey, QObject * pOwner, const type_any_params & params, qx::any * ret, IxFunction_ptr pFct)
252 { Q_UNUSED(sKey); Q_UNUSED(pOwner); Q_UNUSED(params); Q_UNUSED(ret); Q_UNUSED(pFct); return qx_bool(false); }
253
254 static qx_bool invoke(const QString & sKey, const QString & params, qx::any * ret, IxFunction_ptr pFct)
255 { Q_UNUSED(sKey); Q_UNUSED(params); Q_UNUSED(ret); Q_UNUSED(pFct); return qx_bool(false); }
256
257 static qx_bool invoke(const QString & sKey, const type_any_params & params, qx::any * ret, IxFunction_ptr pFct)
258 { Q_UNUSED(sKey); Q_UNUSED(params); Q_UNUSED(ret); Q_UNUSED(pFct); return qx_bool(false); }
259 };
260
261private:
262
263 template <typename U, int dummy>
266
267 template <int dummy>
269 { static bool get() { return false; } };
270
271 template <int dummy>
272 struct implementIxPersistable_Helper<QObject, dummy>
273 { static bool get() { return false; } };
274
275};
276
277} // namespace qx
278
279#include "../../inl/QxRegister/QxClass.inl"
280
281#endif // _QX_CLASS_H_
Common interface for all classes registered into QxOrm context.
qx::QxBool qx_bool
Definition QxBool.h:150
Concrete list of class properties registered into QxOrm context.
#define qAssert(x)
Definition QxMacro.h:52
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
Definition IxClass.h:69
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...
Definition IxFunction.h:64
std::vector< qx::any > type_any_params
Definition IxFunction.h:74
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
Definition QxBool.h:71
qx::QxClass<T> : concrete class of type T registered into QxOrm context (this class is a singleton an...
Definition QxClass.h:79
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
Definition QxClass.h:154
IxFunction * fct_2(const typename QxFunction_2< T, R, P1, P2 >::type_fct &fct, const QString &sKey)
virtual IxClass * getBaseClass() const
Definition QxClass.h:162
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
Definition QxClass.h:86
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 &params=QString(), qx::any *ret=NULL)
Definition QxClass.h:148
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
Definition QxClass.h:102
void beforeRegisterClass()
Definition QxClass.h:187
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()
Definition QxClass.h:172
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
Definition QxClass.h:151
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
Definition QxClass.h:103
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
Definition QxClass.h:85
static qx_bool invokeStatic(const QString &sKey, const type_any_params &params, qx::any *ret=NULL)
Definition QxClass.h:149
IxFunctionX * fctStaticX() const
Definition QxClass.h:104
IxFunction::type_any_params type_any_params
Definition QxClass.h:87
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)
virtual ~QxClass()
Definition QxClass.h:98
static qx_bool invoke(const QString &sKey, T *pOwner, const QString &params=QString(), qx::any *ret=NULL)
Definition QxClass.h:146
static qx_bool invoke(const QString &sKey, T *pOwner, const type_any_params &params, qx::any *ret=NULL)
Definition QxClass.h:147
@ is_valid_base_class
Definition QxClass.h:89
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.
Definition QxClass.h:93
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
Definition QxClass.h:158
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)
void registerClass()
Definition QxClass.h:185
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
Definition QxSingleton.h:59
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...
Definition QxClass.h:71
Root namespace for all QxOrm library features.
std::shared_ptr< IxFunction > IxFunction_ptr
Definition IxFunction.h:131
static qx_bool invoke(const QString &sKey, QObject *pOwner, const QString &params, qx::any *ret, IxFunction_ptr pFct)
Definition QxClass.h:248
static qx_bool invoke(const QString &sKey, const QString &params, qx::any *ret, IxFunction_ptr pFct)
Definition QxClass.h:254
static qx_bool invoke(const QString &sKey, QObject *pOwner, const type_any_params &params, qx::any *ret, IxFunction_ptr pFct)
Definition QxClass.h:251
static qx_bool invoke(const QString &sKey, const type_any_params &params, qx::any *ret, IxFunction_ptr pFct)
Definition QxClass.h:257
static qx_bool invoke(const QString &sKey, const QString &params, qx::any *ret, IxFunction_ptr pFct)
Definition QxClass.h:222
static qx_bool invoke(const QString &sKey, U *pOwner, const type_any_params &params, qx::any *ret, IxFunction_ptr pFct)
Definition QxClass.h:219
static qx_bool invoke(const QString &sKey, U *pOwner, const QString &params, qx::any *ret, IxFunction_ptr pFct)
Definition QxClass.h:216
static qx_bool invoke(const QString &sKey, const type_any_params &params, qx::any *ret, IxFunction_ptr pFct)
Definition QxClass.h:225
static qx_bool invoke(const QString &sKey, qx::trait::no_base_class_defined *pOwner, const type_any_params &params, qx::any *ret, IxFunction_ptr pFct)
Definition QxClass.h:235
static qx_bool invoke(const QString &sKey, qx::trait::no_base_class_defined *pOwner, const QString &params, qx::any *ret, IxFunction_ptr pFct)
Definition QxClass.h:232
static qx_bool invoke(const QString &sKey, const QString &params, qx::any *ret, IxFunction_ptr pFct)
Definition QxClass.h:238
static qx_bool invoke(const QString &sKey, const type_any_params &params, qx::any *ret, IxFunction_ptr pFct)
Definition QxClass.h:241
static qx_bool invoke(const QString &sKey, U *pOwner, const type_any_params &params, qx::any *ret, IxFunction_ptr pFct)
Definition QxClass.h:203
static qx_bool invoke(const QString &sKey, const QString &params, qx::any *ret, IxFunction_ptr pFct)
Definition QxClass.h:206
static qx_bool invoke(const QString &sKey, const type_any_params &params, qx::any *ret, IxFunction_ptr pFct)
Definition QxClass.h:209
static qx_bool invoke(const QString &sKey, U *pOwner, const QString &params, qx::any *ret, IxFunction_ptr pFct)
Definition QxClass.h:200
qx::trait::is_ix_persistable<T>::value : return true if T implements qx::IxPersistable interface,...
Definition QxClass.h:63