32#ifndef _QX_FUNCTION_1_H_
33#define _QX_FUNCTION_1_H_
55template <
class Owner,
typename R,
typename P1>
61 typedef std::function<R (Owner *, P1)>
type_fct;
71 template <
class T,
bool bReturnValue >
78 try { pThis->m_fct(
static_cast<Owner *
>(pOwner), p1); }
90 try { R retTmp = pThis->m_fct(
static_cast<Owner *
>(pOwner), p1);
if (ret) { (* ret) =
qx::any(retTmp); } }
97template <
typename R,
typename P1>
113 template <
class T,
bool bReturnValue >
120 try { pThis->m_fct(p1); }
132 try { R retTmp = pThis->m_fct(p1);
if (ret) { (* ret) =
qx::any(retTmp); } }
141template <
class Owner,
typename R,
typename P1>
144 typedef std::is_same<Owner, void> qx_verify_owner_tmp;
145 static_assert(qx_verify_owner_tmp::value,
"qx_verify_owner_tmp::value");
146 IxFunction_ptr ptr = std::make_shared<QxFunction_1<void, R, P1> >(fct);
150template <
class Owner,
typename R,
typename P1>
153 typedef std::is_same<Owner, void> qx_verify_owner_tmp;
154 static_assert(! qx_verify_owner_tmp::value,
"! qx_verify_owner_tmp::value");
155 IxFunction_ptr ptr = std::make_shared<QxFunction_1<Owner, R, P1> >(fct);
Common interface for all functions registered into QxOrm context (used by introspection engine)
#define QX_FUNCTION_FETCH_PARAM(TYPE, VALUE, FCT)
#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
qx::trait::remove_attr< P1, false >::type type_P1
std::function< R(P1)> type_fct
virtual qx_bool isValidParams(const type_any_params ¶ms) const
virtual qx_bool isValidParams(const QString ¶ms) const
virtual int getParamCount() const
QX_FUNCTION_CLASS_FCT(QxFunction_1)
qx::QxFunction_1<Owner, R, P1> : concrete function registered into QxOrm context defined into class O...
virtual qx_bool isValidParams(const type_any_params ¶ms) const
virtual int getParamCount() const
std::function< R(Owner *, P1)> type_fct
QX_FUNCTION_CLASS_MEMBER_FCT(QxFunction_1)
qx::trait::remove_attr< P1, false >::type type_P1
virtual qx_bool isValidParams(const QString ¶ms) const
IxFunction_ptr bind_fct_1(const typename QxFunction_1< Owner, R, P1 >::type_fct &fct)
IxFunction_ptr bind_member_fct_1(const typename QxFunction_1< Owner, R, P1 >::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_1 *pThis)
static qx_bool invoke(void *pOwner, const T ¶ms, qx::any *ret, const QxFunction_1 *pThis)
static qx_bool invoke(const T ¶ms, qx::any *ret, const QxFunction_1 *pThis)
static qx_bool invoke(const T ¶ms, qx::any *ret, const QxFunction_1 *pThis)