Note! This project has moved to github.com/armmbed/mbed-events
Dependents:
SimpleHTTPExample
« Back to documentation index
Event< void(A0)> Class Template Reference
Pendable event class.
More...
#include <Event.h >
Public Member Functions
Event (EventQueue *queue=0, FuncPtr< void(A0)> func=0)
Create an event bound to a queue.
template<typename T , typename M >
Event (EventQueue *queue, T *obj, M method)
Create an event bound to a queue.
void attach (EventQueue *queue)
Attach an event to a queue.
void attach (FuncPtr< void(A0)> func)
Attach a callback to an event.
template<typename T , typename M >
void attach (T *obj, M method)
Attach a callback to an event.
void attach (EventQueue *queue, FuncPtr< void(A0)> func)
Attach a func to an event.
template<typename T , typename M >
void attach (EventQueue *queue, T *obj, M method)
Attach an event to a queue.
void delay (int ms)
Set delay for when the event is dispatched after it is posted.
void period (int ms)
Set event to repeat periodically after it is posted.
void tolerance (int ms)
Set tolerance hint on when the event must be called, defaults to 0.
bool trigger (A0 a0, int ms=-1)
Post the event onto the bound queue.
void call (A0 a0)
Post the event onto the bound queue.
void operator() (A0 a0)
Post the event onto the bound queue.
operator bool () const
Test if event has been bound.
Static Public Member Functions
static void thunk (void *data, A0 a0)
Static thunk for passing as C-style function.
Detailed Description
template<typename A0>
class Event< void(A0)>
Pendable event class.
Definition at line 505 of file Event.h .
Constructor & Destructor Documentation
Event
(
EventQueue *
queue = 0
,
FuncPtr< void(A0)>
func = 0
)
Create an event bound to a queue.
Definition at line 509 of file Event.h .
Create an event bound to a queue.
Definition at line 518 of file Event.h .
Member Function Documentation
Attach an event to a queue.
Definition at line 526 of file Event.h .
void attach
(
FuncPtr< void(A0)>
func )
Attach a callback to an event.
Definition at line 532 of file Event.h .
void attach
(
EventQueue *
queue ,
FuncPtr< void(A0)>
func
)
Attach a func to an event.
Definition at line 545 of file Event.h .
void attach
(
EventQueue *
queue ,
T *
obj ,
M
method
)
Attach an event to a queue.
Definition at line 553 of file Event.h .
void attach
(
T *
obj ,
M
method
)
Attach a callback to an event.
Definition at line 539 of file Event.h .
Post the event onto the bound queue.
Definition at line 591 of file Event.h .
Set delay for when the event is dispatched after it is posted.
Parameters:
Definition at line 561 of file Event.h .
Test if event has been bound.
Definition at line 603 of file Event.h .
void operator()
(
A0
a0 )
Post the event onto the bound queue.
Definition at line 597 of file Event.h .
Set event to repeat periodically after it is posted.
Parameters:
Definition at line 568 of file Event.h .
static void thunk
(
void *
data ,
A0
a0
)
[static]
Static thunk for passing as C-style function.
Parameters:
data Event to dispatch passed as void pointer
Definition at line 610 of file Event.h .
void tolerance
(
int
ms )
Set tolerance hint on when the event must be called, defaults to 0.
Parameters:
ms Tolerance in milliseconds
Definition at line 575 of file Event.h .
bool trigger
(
A0
a0 ,
int
ms = -1
)
Post the event onto the bound queue.
Parameters:
ms Max time to wait if memory is not available in milliseconds
Returns: True if the event was posted successfully
Definition at line 583 of file Event.h .