events: fix coding style

pull/8711/head
Martin Kojtal 2018-11-12 13:23:19 +00:00
parent 70b5772dc4
commit d3e51fc3a0
2 changed files with 21 additions and 6 deletions

View File

@ -185,7 +185,7 @@ public:
#if defined(DOXYGEN_ONLY)
#if defined(DOXYGEN_ONLY)
/** Calls an event on the queue
*
* The specified callback will be executed in the context of the event
@ -266,8 +266,11 @@ public:
* }
* @endcode
*/
// AStyle ignore, not handling correctly below
// *INDENT-OFF*
template <typename T, typename R, typename ...Args>
int call(T *obj, R (T::*method)(Args ...args), Args ...args);
// *INDENT-ON*
/** Calls an event on the queue after a specified delay
*
@ -346,8 +349,11 @@ public:
* }
* @endcode
*/
// AStyle ignore, not handling correctly below
// *INDENT-OFF*
template <typename T, typename R, typename ...Args>
int call_in(int ms, T *obj, R (T::*method)(Args ...args), Args ...args);
// *INDENT-ON*
/** Calls an event on the queue periodically
*
@ -440,8 +446,11 @@ public:
* }
* @endcode
*/
// AStyle ignore, not handling correctly below
// *INDENT-OFF*
template <typename T, typename R, typename ...Args>
int call_every(int ms, T *obj, R (T::*method)(Args ...args), Args ...args);
// *INDENT-ON*
/** Creates an event bound to the event queue
*
@ -483,8 +492,11 @@ public:
* }
* @endcode
*/
// AStyle ignore, not handling correctly below
// *INDENT-OFF*
template <typename R, typename ...BoundArgs, typename ...Args>
Event<void(Args...)> event(R (*func)(BoundArgs...), Args ...args);
// *INDENT-ON*
/** Creates an event bound to the event queue
*
@ -528,8 +540,11 @@ public:
* }
* @endcode
*/
// AStyle ignore, not handling correctly below
// *INDENT-OFF*
template <typename T, typename R, typename ...BoundArgs, typename ...ContextArgs, typename ...Args>
Event<void(Args...)> event(T *obj, R (T::*method)(BoundArgs..., Args...), ContextArgs ...context_args);
// *INDENT-ON*
/** Creates an event bound to the event queue
*
@ -569,7 +584,7 @@ public:
template <typename R, typename ...BoundArgs, typename ...ContextArgs, typename ...Args>
Event<void(Args...)> event(mbed::Callback<R(BoundArgs..., Args...)> cb, ContextArgs ...context_args);
#else
#else
/** Calls an event on the queue
*
@ -2800,10 +2815,10 @@ public:
*/
template <typename R, typename B0, typename B1, typename B2, typename B3, typename B4, typename C0, typename C1, typename C2, typename C3, typename C4, typename A0, typename A1, typename A2, typename A3, typename A4>
Event<void(A0, A1, A2, A3, A4)> event(mbed::Callback<R(B0, B1, B2, B3, B4, A0, A1, A2, A3, A4)> cb, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4);
#endif
#endif
protected:
#if !defined(DOXYGEN_ONLY)
#if !defined(DOXYGEN_ONLY)
template <typename F>
friend class Event;
struct equeue _equeue;
@ -3380,7 +3395,7 @@ protected:
f(c0, c1, c2, c3, c4, a0, a1, a2, a3, a4);
}
};
#endif //!defined(DOXYGEN_ONLY)
#endif //!defined(DOXYGEN_ONLY)
};
}

View File

@ -208,7 +208,7 @@ int equeue_timeleft(equeue_t *q, int id);
// of hardware timers or even other event loops, allowing an event queue to
// be effectively backgrounded.
void equeue_background(equeue_t *queue,
void (*update)(void *timer, int ms), void *timer);
void (*update)(void *timer, int ms), void *timer);
// Chain an event queue onto another event queue
//