@@ -25,15 +25,15 @@ namespace events {
2525 *
2626 * Representation of an event for fine-grain dispatch control
2727 */
28- template <typename A0= void , typename A1= void , typename A2= void , typename A3= void , typename A4= void >
28+ template <typename F >
2929class Event ;
3030
3131/* * Event
3232 *
3333 * Representation of an event for fine-grain dispatch control
3434 */
3535template <>
36- class Event <> {
36+ class Event <void () > {
3737public:
3838 /* * Event lifetime
3939 *
@@ -226,14 +226,15 @@ class Event<> {
226226 * Representation of an event for fine-grain dispatch control
227227 */
228228template <typename A0>
229- class Event <A0 > {
229+ class Event <void (A0) > {
230230public:
231231 /* * Event lifetime
232232 *
233233 * Constructs an event bound to the specified event queue. The specified
234234 * callback acts as the target for the event and is executed in the
235235 * context of the event queue's dispatch loop once posted.
236236 *
237+ * @param q Event queue to dispatch on
237238 * @param f Function to execute when the event is dispatched
238239 * @param a0..a4 Arguments to pass to the callback
239240 */
@@ -418,14 +419,15 @@ class Event<A0> {
418419 * Representation of an event for fine-grain dispatch control
419420 */
420421template <typename A0, typename A1>
421- class Event <A0, A1> {
422+ class Event <void ( A0, A1) > {
422423public:
423424 /* * Event lifetime
424425 *
425426 * Constructs an event bound to the specified event queue. The specified
426427 * callback acts as the target for the event and is executed in the
427428 * context of the event queue's dispatch loop once posted.
428429 *
430+ * @param q Event queue to dispatch on
429431 * @param f Function to execute when the event is dispatched
430432 * @param a0..a4 Arguments to pass to the callback
431433 */
@@ -610,14 +612,15 @@ class Event<A0, A1> {
610612 * Representation of an event for fine-grain dispatch control
611613 */
612614template <typename A0, typename A1, typename A2>
613- class Event <A0, A1, A2> {
615+ class Event <void ( A0, A1, A2) > {
614616public:
615617 /* * Event lifetime
616618 *
617619 * Constructs an event bound to the specified event queue. The specified
618620 * callback acts as the target for the event and is executed in the
619621 * context of the event queue's dispatch loop once posted.
620622 *
623+ * @param q Event queue to dispatch on
621624 * @param f Function to execute when the event is dispatched
622625 * @param a0..a4 Arguments to pass to the callback
623626 */
@@ -802,14 +805,15 @@ class Event<A0, A1, A2> {
802805 * Representation of an event for fine-grain dispatch control
803806 */
804807template <typename A0, typename A1, typename A2, typename A3>
805- class Event <A0, A1, A2, A3> {
808+ class Event <void ( A0, A1, A2, A3) > {
806809public:
807810 /* * Event lifetime
808811 *
809812 * Constructs an event bound to the specified event queue. The specified
810813 * callback acts as the target for the event and is executed in the
811814 * context of the event queue's dispatch loop once posted.
812815 *
816+ * @param q Event queue to dispatch on
813817 * @param f Function to execute when the event is dispatched
814818 * @param a0..a4 Arguments to pass to the callback
815819 */
@@ -994,14 +998,15 @@ class Event<A0, A1, A2, A3> {
994998 * Representation of an event for fine-grain dispatch control
995999 */
9961000template <typename A0, typename A1, typename A2, typename A3, typename A4>
997- class Event {
1001+ class Event < void (A0, A1, A2, A3, A4)> {
9981002public:
9991003 /* * Event lifetime
10001004 *
10011005 * Constructs an event bound to the specified event queue. The specified
10021006 * callback acts as the target for the event and is executed in the
10031007 * context of the event queue's dispatch loop once posted.
10041008 *
1009+ * @param q Event queue to dispatch on
10051010 * @param f Function to execute when the event is dispatched
10061011 * @param a0..a4 Arguments to pass to the callback
10071012 */
@@ -1183,35 +1188,35 @@ class Event {
11831188
11841189
11851190template <typename F>
1186- Event<> EventQueue::event (F f) {
1187- return Event<>(this , f);
1191+ Event<void () > EventQueue::event (F f) {
1192+ return Event<void () >(this , f);
11881193}
11891194
11901195template <typename F, typename A0>
1191- Event<> EventQueue::event (F f, A0 a0) {
1192- return Event<>(this , f, a0);
1196+ Event<void () > EventQueue::event (F f, A0 a0) {
1197+ return Event<void () >(this , f, a0);
11931198}
11941199
11951200template <typename F, typename A0, typename A1>
1196- Event<> EventQueue::event (F f, A0 a0, A1 a1) {
1197- return Event<>(this , f, a0, a1);
1201+ Event<void () > EventQueue::event (F f, A0 a0, A1 a1) {
1202+ return Event<void () >(this , f, a0, a1);
11981203}
11991204
12001205template <typename F, typename A0, typename A1, typename A2>
1201- Event<> EventQueue::event (F f, A0 a0, A1 a1, A2 a2) {
1202- return Event<>(this , f, a0, a1, a2);
1206+ Event<void () > EventQueue::event (F f, A0 a0, A1 a1, A2 a2) {
1207+ return Event<void () >(this , f, a0, a1, a2);
12031208}
12041209
12051210template <typename F, typename A0, typename A1, typename A2, typename A3>
1206- Event<> EventQueue::event (F f, A0 a0, A1 a1, A2 a2, A3 a3) {
1207- return Event<>(this , f, a0, a1, a2, a3);
1211+ Event<void () > EventQueue::event (F f, A0 a0, A1 a1, A2 a2, A3 a3) {
1212+ return Event<void () >(this , f, a0, a1, a2, a3);
12081213}
12091214
12101215template <typename F, typename A0, typename A1, typename A2, typename A3, typename A4>
1211- Event<> EventQueue::event (F f, A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) {
1212- return Event<>(this , f, a0, a1, a2, a3, a4);
1216+ Event<void () > EventQueue::event (F f, A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) {
1217+ return Event<void () >(this , f, a0, a1, a2, a3, a4);
12131218}
12141219
12151220}
12161221
1217- #endif
1222+ #endif
0 commit comments