Home | Download | Screen shots | Discussion | Documentation |
---|
Public Types | |
typedef std::set< event_listener * > | listener_set |
Set of event_listeners. | |
Public Member Functions | |
virtual | ~event_emitter ()=0 throw () |
Destroy. | |
const field_value & | value () const throw () |
A reference to the field_value for the event_emitter . | |
const listener_set & | listeners () const throw () |
Registered listeners. | |
double | last_time () const throw () |
The timestamp of the last event emitted. | |
Static Public Member Functions | |
static std::auto_ptr< event_emitter > | create (const field_value &value) throw (std::bad_alloc) |
Create an event_emitter. | |
Protected Member Functions | |
listener_set & | listeners () throw () |
Registered listeners. | |
void | last_time (double t) throw () |
Set the timestamp of the last event emitted. | |
event_emitter (const field_value &value) throw () | |
Construct. | |
Private Member Functions | |
virtual void | emit_event (double timestamp)=0 throw (std::bad_alloc) |
Emit an event. | |
Private Attributes | |
const field_value & | value_ |
A reference to the field_value for the event_emitter. | |
std::set< event_listener * > | listeners_ |
The listeners registered for this emitter. | |
double | last_time_ |
The timestamp of the last event emitted. | |
Friends | |
class | node |
The implementation of node calls event_emitter::emit_event . |
|
Set of event_listeners.
|
|
Destroy.
|
|
Construct.
|
|
Create an event_emitter.
|
|
A reference to the
|
|
Registered listeners.
|
|
The timestamp of the last event emitted.
|
|
Registered listeners.
|
|
Set the timestamp of the last event emitted.
|
|
|
The implementation of
The only things that should be emitting events are |
|
A reference to the field_value for the event_emitter.
For internal use only.
|
|
The listeners registered for this emitter. When emit_event is called, each of the registered listeners will be sent an event. |
|
The timestamp of the last event emitted.
|