|
ETL_CONSTEXPR14 | delegate () |
| Default constructor.
|
|
ETL_CONSTEXPR14 | delegate (const delegate &other)=default |
|
template<typename TLambda , typename = etl::enable_if_t<etl::is_class<TLambda>::value && !is_delegate<TLambda>::value, void>> |
ETL_CONSTEXPR14 | delegate (TLambda &instance) |
|
template<typename TLambda , typename = etl::enable_if_t<etl::is_class<TLambda>::value && !is_delegate<TLambda>::value, void>> |
ETL_CONSTEXPR14 | delegate (const TLambda &instance) |
|
template<typename TLambda , typename = etl::enable_if_t<etl::is_class<TLambda>::value && !etl::is_same<etl::delegate<TReturn(TParams...)>, TLambda>::value, void>> |
ETL_CONSTEXPR14 | delegate (TLambda &&instance)=delete |
|
template<TReturn(*)(TParams...) Method> |
ETL_CONSTEXPR14 void | set () |
| Set from function (Compile time).
|
|
template<typename TLambda , typename = etl::enable_if_t<etl::is_class<TLambda>::value && !is_delegate<TLambda>::value, void>> |
ETL_CONSTEXPR14 void | set (TLambda &instance) |
| Set from Lambda or Functor.
|
|
template<typename TLambda , typename = etl::enable_if_t<etl::is_class<TLambda>::value && !is_delegate<TLambda>::value, void>> |
ETL_CONSTEXPR14 void | set (const TLambda &instance) |
| Set from const Lambda or Functor.
|
|
template<typename T , TReturn(T::*)(TParams...) Method> |
ETL_CONSTEXPR14 void | set (T &instance) |
| Set from instance method (Run time).
|
|
template<typename T , TReturn(T::*)(TParams...) const Method> |
ETL_CONSTEXPR14 void | set (T &instance) |
| Set from const instance method (Run time).
|
|
template<typename T , T & Instance, TReturn(T::*)(TParams...) Method> |
ETL_CONSTEXPR14 void | set () |
| Set from instance method (Compile time).
|
|
template<typename T , TReturn(T::*)(TParams...) Method, T & Instance> |
ETL_CONSTEXPR14 void | set () |
|
template<typename T , T const & Instance, TReturn(T::*)(TParams...) const Method> |
ETL_CONSTEXPR14 void | set () |
| Set from const instance method (Compile time).
|
|
template<typename T , TReturn(T::*)(TParams...) const Method, T const & Instance> |
ETL_CONSTEXPR14 void | set () |
|
ETL_CONSTEXPR14 void | clear () |
| Clear the delegate.
|
|
TReturn | operator() (TParams... args) const |
| Execute the delegate.
|
|
template<typename TRet = TReturn> |
ETL_CONSTEXPR14 etl::enable_if_t< etl::is_same< TRet, void >::value, bool > | call_if (TParams... args) const |
|
template<typename TRet = TReturn> |
ETL_CONSTEXPR14 etl::enable_if_t<!etl::is_same< TRet, void >::value, etl::optional< TReturn > > | call_if (TParams... args) const |
|
template<typename TAlternative > |
TReturn | call_or (TAlternative alternative, TParams... args) const |
|
template<TReturn(*)(TParams...) Method> |
TReturn | call_or (TParams... args) const |
|
delegate & | operator= (const delegate &rhs)=default |
| Assignment.
|
|
template<typename TLambda , typename = etl::enable_if_t<etl::is_class<TLambda>::value && !is_delegate<TLambda>::value, void>> |
ETL_CONSTEXPR14 delegate & | operator= (TLambda &instance) |
| Create from Lambda or Functor.
|
|
template<typename TLambda , typename = etl::enable_if_t<etl::is_class<TLambda>::value && !is_delegate<TLambda>::value, void>> |
ETL_CONSTEXPR14 delegate & | operator= (const TLambda &instance) |
| Create from const Lambda or Functor.
|
|
ETL_NODISCARD ETL_CONSTEXPR14 bool | operator== (const delegate &rhs) const |
| Checks equality.
|
|
ETL_CONSTEXPR14 bool | operator!= (const delegate &rhs) const |
| Returns true if the delegate is valid.
|
|
ETL_NODISCARD ETL_CONSTEXPR14 bool | is_valid () const |
| Returns true if the delegate is valid.
|
|
ETL_NODISCARD ETL_CONSTEXPR14 | operator bool () const |
| Returns true if the delegate is valid.
|
|
|
template<TReturn(*)(TParams...) Method> |
static ETL_NODISCARD ETL_CONSTEXPR14 delegate | create () |
| Create from function (Compile time).
|
|
template<typename TLambda , typename = etl::enable_if_t<etl::is_class<TLambda>::value && !is_delegate<TLambda>::value, void>> |
static ETL_NODISCARD ETL_CONSTEXPR14 delegate | create (TLambda &instance) |
| Create from Lambda or Functor.
|
|
template<typename TLambda , typename = etl::enable_if_t<etl::is_class<TLambda>::value && !is_delegate<TLambda>::value, void>> |
static ETL_NODISCARD ETL_CONSTEXPR14 delegate | create (const TLambda &instance) |
| Create from const Lambda or Functor.
|
|
template<typename T , TReturn(T::*)(TParams...) Method> |
static ETL_NODISCARD ETL_CONSTEXPR14 delegate | create (T &instance) |
| Create from instance method (Run time).
|
|
template<typename T , TReturn(T::*)(TParams...) Method> |
static ETL_NODISCARD ETL_CONSTEXPR14 delegate | create (T &&instance)=delete |
|
template<typename T , TReturn(T::*)(TParams...) const Method> |
static ETL_NODISCARD ETL_CONSTEXPR14 delegate | create (const T &instance) |
| Create from const instance method (Run time).
|
|
template<typename T , TReturn(T::*)(TParams...) const Method> |
static ETL_CONSTEXPR14 delegate | create (T &&instance)=delete |
| Disable create from rvalue instance method (Run time).
|
|
template<typename T , T & Instance, TReturn(T::*)(TParams...) Method> |
static ETL_NODISCARD ETL_CONSTEXPR14 delegate | create () |
| Create from instance method (Compile time).
|
|
template<typename T , TReturn(T::*)(TParams...) Method, T & Instance> |
static ETL_NODISCARD ETL_CONSTEXPR14 delegate | create () |
|
template<typename T , T const & Instance, TReturn(T::*)(TParams...) const Method> |
static ETL_NODISCARD ETL_CONSTEXPR14 delegate | create () |
| Create from const instance method (Compile time).
|
|
template<typename T , TReturn(T::*)(TParams...) const Method, T const & Instance> |
static ETL_NODISCARD ETL_CONSTEXPR14 delegate | create () |
|
template<typename T , T & Instance> |
static ETL_NODISCARD ETL_CONSTEXPR14 delegate | create () |
|
template<
typename TReturn, typename... TParams>
class etl::delegate< TReturn(TParams...)>
Specialisation.