diff --git a/events/Event.h b/events/Event.h index d1d2ec10528..2ce282a7489 100644 --- a/events/Event.h +++ b/events/Event.h @@ -251,30 +251,142 @@ class Event { /** Create an event * @see Event::Event */ - template - Event(EventQueue *q, T *obj, R(T::*method)(BoundArgTs..., ArgTs...), impl::type_identity_t... context_args) : - Event(q, mbed::callback(obj, method), context_args...) { } + template + Event(EventQueue *q, T *obj, R(T::*method)(B0, ArgTs...), B0 b0) : + Event(q, mbed::callback(obj, method), b0) { } /** Create an event * @see Event::Event */ - template - Event(EventQueue *q, const T *obj, R(T::*method)(BoundArgTs..., ArgTs...) const, impl::type_identity_t... context_args) : - Event(q, mbed::callback(obj, method), context_args...) { } + template + Event(EventQueue *q, const T *obj, R(T::*method)(B0, ArgTs...) const, B0 b0) : + Event(q, mbed::callback(obj, method), b0) { } /** Create an event * @see Event::Event */ - template - Event(EventQueue *q, volatile T *obj, R(T::*method)(BoundArgTs..., ArgTs...) volatile, impl::type_identity_t... context_args) : - Event(q, mbed::callback(obj, method), context_args...) { } + template + Event(EventQueue *q, volatile T *obj, R(T::*method)(B0, ArgTs...) volatile, B0 b0) : + Event(q, mbed::callback(obj, method), b0) { } /** Create an event * @see Event::Event */ - template - Event(EventQueue *q, const volatile T *obj, R(T::*method)(BoundArgTs..., ArgTs...) const volatile, impl::type_identity_t... context_args) : - Event(q, mbed::callback(obj, method), context_args...) { } + template + Event(EventQueue *q, const volatile T *obj, R(T::*method)(B0, ArgTs...) const volatile, B0 b0) : + Event(q, mbed::callback(obj, method), b0) { } + + /** Create an event + * @see Event::Event + */ + template + Event(EventQueue *q, T *obj, R(T::*method)(B0, B1, ArgTs...), B0 b0, B1 b1) : + Event(q, mbed::callback(obj, method), b0, b1) { } + + /** Create an event + * @see Event::Event + */ + template + Event(EventQueue *q, const T *obj, R(T::*method)(B0, B1, ArgTs...) const, B0 b0, B1 b1) : + Event(q, mbed::callback(obj, method), b0, b1) { } + + /** Create an event + * @see Event::Event + */ + template + Event(EventQueue *q, volatile T *obj, R(T::*method)(B0, B1, ArgTs...) volatile, B0 b0, B1 b1) : + Event(q, mbed::callback(obj, method), b0, b1) { } + + /** Create an event + * @see Event::Event + */ + template + Event(EventQueue *q, const volatile T *obj, R(T::*method)(B0, B1, ArgTs...) const volatile, B0 b0, B1 b1) : + Event(q, mbed::callback(obj, method), b0, b1) { } + + /** Create an event + * @see Event::Event + */ + template + Event(EventQueue *q, T *obj, R(T::*method)(B0, B1, B2, ArgTs...), B0 b0, B1 b1, B2 b2) : + Event(q, mbed::callback(obj, method), b0, b1, b2) { } + + /** Create an event + * @see Event::Event + */ + template + Event(EventQueue *q, const T *obj, R(T::*method)(B0, B1, B2, ArgTs...) const, B0 b0, B1 b1, B2 b2) : + Event(q, mbed::callback(obj, method), b0, b1, b2) { } + + /** Create an event + * @see Event::Event + */ + template + Event(EventQueue *q, volatile T *obj, R(T::*method)(B0, B1, B2, ArgTs...) volatile, B0 b0, B1 b1, B2 b2) : + Event(q, mbed::callback(obj, method), b0, b1, b2) { } + + /** Create an event + * @see Event::Event + */ + template + Event(EventQueue *q, const volatile T *obj, R(T::*method)(B0, B1, B2, ArgTs...) const volatile, B0 b0, B1 b1, B2 b2) : + Event(q, mbed::callback(obj, method), b0, b1, b2) { } + + /** Create an event + * @see Event::Event + */ + template + Event(EventQueue *q, T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...), B0 b0, B1 b1, B2 b2, B3 b3) : + Event(q, mbed::callback(obj, method), b0, b1, b2, b3) { } + + /** Create an event + * @see Event::Event + */ + template + Event(EventQueue *q, const T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...) const, B0 b0, B1 b1, B2 b2, B3 b3) : + Event(q, mbed::callback(obj, method), b0, b1, b2, b3) { } + + /** Create an event + * @see Event::Event + */ + template + Event(EventQueue *q, volatile T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...) volatile, B0 b0, B1 b1, B2 b2, B3 b3) : + Event(q, mbed::callback(obj, method), b0, b1, b2, b3) { } + + /** Create an event + * @see Event::Event + */ + template + Event(EventQueue *q, const volatile T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...) const volatile, B0 b0, B1 b1, B2 b2, B3 b3) : + Event(q, mbed::callback(obj, method), b0, b1, b2, b3) { } + + /** Create an event + * @see Event::Event + */ + template + Event(EventQueue *q, T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...), B0 b0, B1 b1, B2 b2, B3 b3, B4 b4) : + Event(q, mbed::callback(obj, method), b0, b1, b2, b3, b4) { } + + /** Create an event + * @see Event::Event + */ + template + Event(EventQueue *q, const T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...) const, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4) : + Event(q, mbed::callback(obj, method), b0, b1, b2, b3, b4) { } + + /** Create an event + * @see Event::Event + */ + template + Event(EventQueue *q, volatile T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...) volatile, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4) : + Event(q, mbed::callback(obj, method), b0, b1, b2, b3, b4) { } + + /** Create an event + * @see Event::Event + */ + template + Event(EventQueue *q, const volatile T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...) const volatile, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4) : + Event(q, mbed::callback(obj, method), b0, b1, b2, b3, b4) { } }; @@ -283,40 +395,220 @@ class Event { // Convenience functions declared here to avoid cyclic // dependency between Event and EventQueue -template -Event EventQueue::event(R(*func)(BoundArgTs..., ArgTs...), impl::type_identity_t... context_args) +template +Event EventQueue::event(R(*func)(ArgTs...)) +{ + return Event(this, func); +} + +template +Event EventQueue::event(T *obj, R(T::*method)(ArgTs...)) +{ + return Event(this, mbed::callback(obj, method)); +} + +template +Event EventQueue::event(const T *obj, R(T::*method)(ArgTs...) const) +{ + return Event(this, mbed::callback(obj, method)); +} + +template +Event EventQueue::event(volatile T *obj, R(T::*method)(ArgTs...) volatile) +{ + return Event(this, mbed::callback(obj, method)); +} + +template +Event EventQueue::event(const volatile T *obj, R(T::*method)(ArgTs...) const volatile) +{ + return Event(this, mbed::callback(obj, method)); +} + +template +Event EventQueue::event(mbed::Callback cb) +{ + return Event(this, cb); +} + +template +Event EventQueue::event(R(*func)(B0, ArgTs...), C0 c0) +{ + return Event(this, func, c0); +} + +template +Event EventQueue::event(T *obj, R(T::*method)(B0, ArgTs...), C0 c0) +{ + return Event(this, mbed::callback(obj, method), c0); +} + +template +Event EventQueue::event(const T *obj, R(T::*method)(B0, ArgTs...) const, C0 c0) +{ + return Event(this, mbed::callback(obj, method), c0); +} + +template +Event EventQueue::event(volatile T *obj, R(T::*method)(B0, ArgTs...) volatile, C0 c0) +{ + return Event(this, mbed::callback(obj, method), c0); +} + +template +Event EventQueue::event(const volatile T *obj, R(T::*method)(B0, ArgTs...) const volatile, C0 c0) +{ + return Event(this, mbed::callback(obj, method), c0); +} + +template +Event EventQueue::event(mbed::Callback cb, C0 c0) +{ + return Event(this, cb, c0); +} + +template +Event EventQueue::event(R(*func)(B0, B1, ArgTs...), C0 c0, C1 c1) +{ + return Event(this, func, c0, c1); +} + +template +Event EventQueue::event(T *obj, R(T::*method)(B0, B1, ArgTs...), C0 c0, C1 c1) +{ + return Event(this, mbed::callback(obj, method), c0, c1); +} + +template +Event EventQueue::event(const T *obj, R(T::*method)(B0, B1, ArgTs...) const, C0 c0, C1 c1) +{ + return Event(this, mbed::callback(obj, method), c0, c1); +} + +template +Event EventQueue::event(volatile T *obj, R(T::*method)(B0, B1, ArgTs...) volatile, C0 c0, C1 c1) +{ + return Event(this, mbed::callback(obj, method), c0, c1); +} + +template +Event EventQueue::event(const volatile T *obj, R(T::*method)(B0, B1, ArgTs...) const volatile, C0 c0, C1 c1) +{ + return Event(this, mbed::callback(obj, method), c0, c1); +} + +template +Event EventQueue::event(mbed::Callback cb, C0 c0, C1 c1) +{ + return Event(this, cb, c0, c1); +} + +template +Event EventQueue::event(R(*func)(B0, B1, B2, ArgTs...), C0 c0, C1 c1, C2 c2) +{ + return Event(this, func, c0, c1, c2); +} + +template +Event EventQueue::event(T *obj, R(T::*method)(B0, B1, B2, ArgTs...), C0 c0, C1 c1, C2 c2) +{ + return Event(this, mbed::callback(obj, method), c0, c1, c2); +} + +template +Event EventQueue::event(const T *obj, R(T::*method)(B0, B1, B2, ArgTs...) const, C0 c0, C1 c1, C2 c2) +{ + return Event(this, mbed::callback(obj, method), c0, c1, c2); +} + +template +Event EventQueue::event(volatile T *obj, R(T::*method)(B0, B1, B2, ArgTs...) volatile, C0 c0, C1 c1, C2 c2) +{ + return Event(this, mbed::callback(obj, method), c0, c1, c2); +} + +template +Event EventQueue::event(const volatile T *obj, R(T::*method)(B0, B1, B2, ArgTs...) const volatile, C0 c0, C1 c1, C2 c2) +{ + return Event(this, mbed::callback(obj, method), c0, c1, c2); +} + +template +Event EventQueue::event(mbed::Callback cb, C0 c0, C1 c1, C2 c2) +{ + return Event(this, cb, c0, c1, c2); +} + +template +Event EventQueue::event(R(*func)(B0, B1, B2, B3, ArgTs...), C0 c0, C1 c1, C2 c2, C3 c3) +{ + return Event(this, func, c0, c1, c2, c3); +} + +template +Event EventQueue::event(T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...), C0 c0, C1 c1, C2 c2, C3 c3) +{ + return Event(this, mbed::callback(obj, method), c0, c1, c2, c3); +} + +template +Event EventQueue::event(const T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...) const, C0 c0, C1 c1, C2 c2, C3 c3) +{ + return Event(this, mbed::callback(obj, method), c0, c1, c2, c3); +} + +template +Event EventQueue::event(volatile T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...) volatile, C0 c0, C1 c1, C2 c2, C3 c3) +{ + return Event(this, mbed::callback(obj, method), c0, c1, c2, c3); +} + +template +Event EventQueue::event(const volatile T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...) const volatile, C0 c0, C1 c1, C2 c2, C3 c3) +{ + return Event(this, mbed::callback(obj, method), c0, c1, c2, c3); +} + +template +Event EventQueue::event(mbed::Callback cb, C0 c0, C1 c1, C2 c2, C3 c3) +{ + return Event(this, cb, c0, c1, c2, c3); +} + +template +Event EventQueue::event(R(*func)(B0, B1, B2, B3, B4, ArgTs...), C0 c0, C1 c1, C2 c2, C3 c3, C4 c4) { - return Event(this, func, context_args...); + return Event(this, func, c0, c1, c2, c3, c4); } -template -Event EventQueue::event(T *obj, R(T::*method)(BoundArgTs..., ArgTs...), impl::type_identity_t... context_args) +template +Event EventQueue::event(T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...), C0 c0, C1 c1, C2 c2, C3 c3, C4 c4) { - return Event(this, mbed::callback(obj, method), context_args...); + return Event(this, mbed::callback(obj, method), c0, c1, c2, c3, c4); } -template -Event EventQueue::event(const T *obj, R(T::*method)(BoundArgTs..., ArgTs...) const, impl::type_identity_t... context_args) +template +Event EventQueue::event(const T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...) const, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4) { - return Event(this, mbed::callback(obj, method), context_args...); + return Event(this, mbed::callback(obj, method), c0, c1, c2, c3, c4); } -template -Event EventQueue::event(volatile T *obj, R(T::*method)(BoundArgTs..., ArgTs...) volatile, impl::type_identity_t... context_args) +template +Event EventQueue::event(volatile T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...) volatile, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4) { - return Event(this, mbed::callback(obj, method), context_args...); + return Event(this, mbed::callback(obj, method), c0, c1, c2, c3, c4); } -template -Event EventQueue::event(const volatile T *obj, R(T::*method)(BoundArgTs..., ArgTs...) const volatile, impl::type_identity_t... context_args) +template +Event EventQueue::event(const volatile T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...) const volatile, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4) { - return Event(this, mbed::callback(obj, method), context_args...); + return Event(this, mbed::callback(obj, method), c0, c1, c2, c3, c4); } -template -Event EventQueue::event(mbed::Callback cb, impl::type_identity_t... context_args) +template +Event EventQueue::event(mbed::Callback cb, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4) { - return Event(this, cb, context_args...); + return Event(this, cb, c0, c1, c2, c3, c4); } } diff --git a/events/EventQueue.h b/events/EventQueue.h index 0bdda931c71..b5d567943a4 100644 --- a/events/EventQueue.h +++ b/events/EventQueue.h @@ -39,17 +39,6 @@ namespace events { */ #define EVENTS_QUEUE_SIZE (32*EVENTS_EVENT_SIZE) -namespace impl { -/* C++20 type identity */ -template -struct type_identity { - using type = T; -}; - -template -using type_identity_t = typename type_identity::type; -} - // Predeclared classes template class Event; @@ -509,8 +498,8 @@ class EventQueue : private mbed::NonCopyable { */ // AStyle ignore, not handling correctly below // *INDENT-OFF* - template - Event event(R (*func)(BoundArgs..., Args...), BoundArgs ...context_args); + template + Event event(R (*func)(BoundArgs..., Args...), ContextArgs ...context_args); // *INDENT-ON* /** Creates an event bound to the event queue @@ -557,8 +546,8 @@ class EventQueue : private mbed::NonCopyable { */ // AStyle ignore, not handling correctly below // *INDENT-OFF* - template - Event event(T *obj, R (T::*method)(BoundArgs..., Args...), BoundArgs ...context_args); + template + Event event(T *obj, R (T::*method)(BoundArgs..., Args...), ContextArgs ...context_args); // *INDENT-ON* /** Creates an event bound to the event queue @@ -596,8 +585,8 @@ class EventQueue : private mbed::NonCopyable { * } * @endcode */ - template - Event event(mbed::Callback cb, BoundArgs ...context_args); + template + Event event(mbed::Callback cb, ContextArgs ...context_args); #else @@ -661,7 +650,7 @@ class EventQueue : private mbed::NonCopyable { * @see EventQueue::call */ template - int call(T *obj, R(T::*method)(ArgTs...), impl::type_identity_t... args) + int call(T *obj, R(T::*method)(ArgTs...), ArgTs... args) { return call(mbed::callback(obj, method), args...); } @@ -670,7 +659,7 @@ class EventQueue : private mbed::NonCopyable { * @see EventQueue::call */ template - int call(const T *obj, R(T::*method)(ArgTs...) const, impl::type_identity_t... args) + int call(const T *obj, R(T::*method)(ArgTs...) const, ArgTs... args) { return call(mbed::callback(obj, method), args...); } @@ -679,7 +668,7 @@ class EventQueue : private mbed::NonCopyable { * @see EventQueue::call */ template - int call(volatile T *obj, R(T::*method)(ArgTs...) volatile, impl::type_identity_t... args) + int call(volatile T *obj, R(T::*method)(ArgTs...) volatile, ArgTs... args) { return call(mbed::callback(obj, method), args...); } @@ -688,7 +677,7 @@ class EventQueue : private mbed::NonCopyable { * @see EventQueue::call */ template - int call(const volatile T *obj, R(T::*method)(ArgTs...) const volatile, impl::type_identity_t... args) + int call(const volatile T *obj, R(T::*method)(ArgTs...) const volatile, ArgTs... args) { return call(mbed::callback(obj, method), args...); } @@ -737,7 +726,7 @@ class EventQueue : private mbed::NonCopyable { * @see EventQueue::call_in */ template - int call_in(int ms, T *obj, R(T::*method)(ArgTs...), impl::type_identity_t... args) + int call_in(int ms, T *obj, R(T::*method)(ArgTs...), ArgTs... args) { return call_in(ms, mbed::callback(obj, method), args...); } @@ -746,7 +735,7 @@ class EventQueue : private mbed::NonCopyable { * @see EventQueue::call_in */ template - int call_in(int ms, const T *obj, R(T::*method)(ArgTs...) const, impl::type_identity_t... args) + int call_in(int ms, const T *obj, R(T::*method)(ArgTs...) const, ArgTs... args) { return call_in(ms, mbed::callback(obj, method), args...); } @@ -755,7 +744,7 @@ class EventQueue : private mbed::NonCopyable { * @see EventQueue::call_in */ template - int call_in(int ms, volatile T *obj, R(T::*method)(ArgTs...) volatile, impl::type_identity_t... args) + int call_in(int ms, volatile T *obj, R(T::*method)(ArgTs...) volatile, ArgTs... args) { return call_in(ms, mbed::callback(obj, method), args...); } @@ -764,7 +753,7 @@ class EventQueue : private mbed::NonCopyable { * @see EventQueue::call_in */ template - int call_in(int ms, const volatile T *obj, R(T::*method)(ArgTs...) const volatile, impl::type_identity_t... args) + int call_in(int ms, const volatile T *obj, R(T::*method)(ArgTs...) const volatile, ArgTs... args) { return call_in(ms, mbed::callback(obj, method), args...); } @@ -817,7 +806,7 @@ class EventQueue : private mbed::NonCopyable { * @see EventQueue::call_every */ template - int call_every(int ms, T *obj, R(T::*method)(ArgTs...), impl::type_identity_t... args) + int call_every(int ms, T *obj, R(T::*method)(ArgTs...), ArgTs... args) { return call_every(ms, mbed::callback(obj, method), args...); } @@ -826,7 +815,7 @@ class EventQueue : private mbed::NonCopyable { * @see EventQueue::call_every */ template - int call_every(int ms, const T *obj, R(T::*method)(ArgTs...) const, impl::type_identity_t... args) + int call_every(int ms, const T *obj, R(T::*method)(ArgTs...) const, ArgTs... args) { return call_every(ms, mbed::callback(obj, method), args...); } @@ -835,7 +824,7 @@ class EventQueue : private mbed::NonCopyable { * @see EventQueue::call_every */ template - int call_every(int ms, volatile T *obj, R(T::*method)(ArgTs...) volatile, impl::type_identity_t... args) + int call_every(int ms, volatile T *obj, R(T::*method)(ArgTs...) volatile, ArgTs... args) { return call_every(ms, mbed::callback(obj, method), args...); } @@ -844,7 +833,7 @@ class EventQueue : private mbed::NonCopyable { * @see EventQueue::call_every */ template - int call_every(int ms, const volatile T *obj, R(T::*method)(ArgTs...) const volatile, impl::type_identity_t... args) + int call_every(int ms, const volatile T *obj, R(T::*method)(ArgTs...) const volatile, ArgTs... args) { return call_every(ms, mbed::callback(obj, method), args...); } @@ -858,38 +847,218 @@ class EventQueue : private mbed::NonCopyable { * @param func Function to execute when the event is dispatched * @return Event that will dispatch on the specific queue */ - template - Event event(R(*func)(BoundArgTs..., ArgTs...), impl::type_identity_t... context_args); + template + Event event(R(*func)(ArgTs...)); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(T *obj, R(T::*method)(ArgTs...)); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(const T *obj, R(T::*method)(ArgTs...) const); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(volatile T *obj, R(T::*method)(ArgTs...) volatile); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(const volatile T *obj, R(T::*method)(ArgTs...) const volatile); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(mbed::Callback cb); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(R(*func)(B0, ArgTs...), C0 c0); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(T *obj, R(T::*method)(B0, ArgTs...), C0 c0); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(const T *obj, R(T::*method)(B0, ArgTs...) const, C0 c0); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(volatile T *obj, R(T::*method)(B0, ArgTs...) volatile, C0 c0); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(const volatile T *obj, R(T::*method)(B0, ArgTs...) const volatile, C0 c0); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(mbed::Callback cb, C0 c0); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(R(*func)(B0, B1, ArgTs...), C0 c0, C1 c1); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(T *obj, R(T::*method)(B0, B1, ArgTs...), C0 c0, C1 c1); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(const T *obj, R(T::*method)(B0, B1, ArgTs...) const, C0 c0, C1 c1); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(volatile T *obj, R(T::*method)(B0, B1, ArgTs...) volatile, C0 c0, C1 c1); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(const volatile T *obj, R(T::*method)(B0, B1, ArgTs...) const volatile, C0 c0, C1 c1); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(mbed::Callback cb, C0 c0, C1 c1); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(R(*func)(B0, B1, B2, ArgTs...), C0 c0, C1 c1, C2 c2); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(T *obj, R(T::*method)(B0, B1, B2, ArgTs...), C0 c0, C1 c1, C2 c2); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(const T *obj, R(T::*method)(B0, B1, B2, ArgTs...) const, C0 c0, C1 c1, C2 c2); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(volatile T *obj, R(T::*method)(B0, B1, B2, ArgTs...) volatile, C0 c0, C1 c1, C2 c2); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(const volatile T *obj, R(T::*method)(B0, B1, B2, ArgTs...) const volatile, C0 c0, C1 c1, C2 c2); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(mbed::Callback cb, C0 c0, C1 c1, C2 c2); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(R(*func)(B0, B1, B2, B3, ArgTs...), C0 c0, C1 c1, C2 c2, C3 c3); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...), C0 c0, C1 c1, C2 c2, C3 c3); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(const T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...) const, C0 c0, C1 c1, C2 c2, C3 c3); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(volatile T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...) volatile, C0 c0, C1 c1, C2 c2, C3 c3); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(const volatile T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...) const volatile, C0 c0, C1 c1, C2 c2, C3 c3); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(mbed::Callback cb, C0 c0, C1 c1, C2 c2, C3 c3); + + /** Creates an event bound to the event queue + * @see EventQueue::event + */ + template + Event event(R(*func)(B0, B1, B2, B3, B4, ArgTs...), C0 c0, C1 c1, C2 c2, C3 c3, C4 c4); /** Creates an event bound to the event queue * @see EventQueue::event */ - template - Event event(T *obj, R(T::*method)(BoundArgTs..., ArgTs...), impl::type_identity_t... context_args); + template + Event event(T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...), C0 c0, C1 c1, C2 c2, C3 c3, C4 c4); /** Creates an event bound to the event queue * @see EventQueue::event */ - template - Event event(const T *obj, R(T::*method)(BoundArgTs..., ArgTs...) const, impl::type_identity_t... context_args); + template + Event event(const T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...) const, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4); /** Creates an event bound to the event queue * @see EventQueue::event */ - template - Event event(volatile T *obj, R(T::*method)(BoundArgTs..., ArgTs...) volatile, impl::type_identity_t... context_args); + template + Event event(volatile T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...) volatile, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4); /** Creates an event bound to the event queue * @see EventQueue::event */ - template - Event event(const volatile T *obj, R(T::*method)(BoundArgTs..., ArgTs...) const volatile, impl::type_identity_t... context_args); + template + Event event(const volatile T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...) const volatile, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4); /** Creates an event bound to the event queue * @see EventQueue::event */ - template - Event event(mbed::Callback cb, impl::type_identity_t... context_args); + template + Event event(mbed::Callback cb, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4); #endif protected: