32#ifndef _QX_FUNCTION_0_H_
33#define _QX_FUNCTION_0_H_
55template <
class Owner,
typename R>
70 template <
class T,
bool bReturnValue >
76 try { pThis->m_fct(
static_cast<Owner *
>(pOwner)); }
87 try { R retTmp = pThis->m_fct(
static_cast<Owner *
>(pOwner));
if (ret) { (* ret) =
qx::any(retTmp); } }
109 template <
class T,
bool bReturnValue >
115 try { pThis->m_fct(); }
126 try { R retTmp = pThis->m_fct();
if (ret) { (* ret) =
qx::any(retTmp); } }
135template <
class Owner,
typename R>
138 typedef std::is_same<Owner, void> qx_verify_owner_tmp;
139 static_assert(qx_verify_owner_tmp::value,
"qx_verify_owner_tmp::value");
140 IxFunction_ptr ptr = std::make_shared<QxFunction_0<void, R> >(fct);
144template <
class Owner,
typename R>
147 typedef std::is_same<Owner, void> qx_verify_owner_tmp;
148 static_assert(! qx_verify_owner_tmp::value,
"! qx_verify_owner_tmp::value");
149 IxFunction_ptr ptr = std::make_shared<QxFunction_0<Owner, R> >(fct);
Common interface for all functions registered into QxOrm context (used by introspection engine)
#define QX_FUNCTION_INVOKE_START_WITHOUT_OWNER()
#define QX_FUNCTION_INVOKE_START_WITH_OWNER()
#define QX_FUNCTION_CATCH_AND_RETURN_INVOKE()
qx::function::detail::get_param_X() : provide some helper functions to retrieve parameters for all qx...
qx::IxFunction : common interface for all functions registered into QxOrm context (used by introspect...
std::vector< qx::any > type_any_params
qx_bool : boolean type with code and description message when an error occured
virtual int getParamCount() const
std::function< R()> type_fct
virtual qx_bool isValidParams(const QString ¶ms) const
virtual qx_bool isValidParams(const type_any_params ¶ms) const
QX_FUNCTION_CLASS_FCT(QxFunction_0)
qx::QxFunction_0<Owner, R> : concrete function registered into QxOrm context defined into class Owner...
QX_FUNCTION_CLASS_MEMBER_FCT(QxFunction_0)
virtual qx_bool isValidParams(const QString ¶ms) const
std::function< R(Owner *)> type_fct
virtual int getParamCount() const
virtual qx_bool isValidParams(const type_any_params ¶ms) const
IxFunction_ptr bind_fct_0(const typename QxFunction_0< Owner, R >::type_fct &fct)
IxFunction_ptr bind_member_fct_0(const typename QxFunction_0< Owner, R >::type_fct &fct)
Root namespace for all QxOrm library features.
std::shared_ptr< IxFunction > IxFunction_ptr
static qx_bool invoke(void *pOwner, const T ¶ms, qx::any *ret, const QxFunction_0 *pThis)
static qx_bool invoke(void *pOwner, const T ¶ms, qx::any *ret, const QxFunction_0 *pThis)
static qx_bool invoke(const T ¶ms, qx::any *ret, const QxFunction_0 *pThis)
static qx_bool invoke(const T ¶ms, qx::any *ret, const QxFunction_0 *pThis)